如何将DER格式证书x509转换为可读格式? [英] How do I convert DER Format certificate x509 into human readable format?
本文介绍了如何将DER格式证书x509转换为可读格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在JavaScript中将DER格式证书x509转换为人类可读的格式?
How can I convert a DER Format certificate x509 into a human readable format in JavaScript?
推荐答案
Javascript不提供解析证书字段的方法。您需要使用类似 forge 的库。我认为您需要这样的东西
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);
这篇关于如何将DER格式证书x509转换为可读格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文