问题
How can I convert a DER Format certificate x509 into a human readable format in JavaScript?
回答1:
Javascript does not provide a method to parse certificate fields. You need to use a library like forge. I think you need something like this
var certAsn1 = forge.asn1.fromDer(certDer)
var cert = forge.pki.certificateFromAsn1(certAsn1);
console.log(cert.serialNumber);
来源:https://stackoverflow.com/questions/44586556/how-do-i-convert-der-format-certificate-x509-into-human-readable-format