如何识别 x509 标志
有没有办法区分标志后的数据和标志后的子标志之间的区别?在我导出的雅虎证书中,有一个带有 a0 2d a0 2b ...
的部分,其中包含所有标志。另一方面,主题密钥ID是“a0 1e 6e 0c 9b 6e 6a eb d2 ae 5a 4a 18 ff 0e 93 46 1a d6 32”。我如何区分哪个是什么?其他标志(例如 03
、04
和 06
经常这样做)
另外,有人认识字符串 86 29?它既不是标志也不是可读数据(29 是“)”,但这似乎没有任何贡献)
Is there any way to tell the difference between data after flags and sub-flags after the flag? in a yahoo certificate I exported, there is a section with a0 2d a0 2b ...
, where it's all flags. On the other hand, the subject key ID is "a0 1e 6e 0c 9b 6e 6a eb d2 ae 5a 4a 18 ff 0e 93 46 1a d6 32
". How would I tell the difference between which is what? other flags such as 03
, 04
, and 06
do this a lot
Also, does anyone recognize the string 86 29
? its neither a flag nor readable data (the 29 is ")", but that doesnt seem to contribute to anything)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将证书导出到文件中,然后使用 CertUtil.exe -dump 来检查证书的内容。
根据评论更新:由于您在评论中粘贴了很长的字符串,因此评论可能难以阅读。因此,我在这里重复我上一条评论的文字:
解码 X.509 扩展的最简单方法是使用
CryptDecodeObjectEx
和X509_EXTENSIONS
。因此,您将收到CERT_EXTENSIONS
- 一个CERT_EXTENSION
数组(请参阅 msdn.microsoft.com/en-us/library/aa377195.aspx)。扩展由定义扩展的 OID、扩展是否关键的属性(无论您是否真的必须理解它)和可选的附加编码扩展数据(在大多数情况下 BER 编码为 NULL)组成。当然,您可以自己解码对应于 RFC 3280 的 4.2、X.509 PKI 的信息(请参阅 http://www.ietf.org/rfc/rfc3280.txt)。You can export the certificate in a file and then use
CertUtil.exe -dump
to examine contain of the certificate.UPDATED based on the comment: Because of you pasted a long string in the comment, comments can be bad read. So I repeat the text of my last comment here:
The simplest way to decode the X.509 Extensions is using of
CryptDecodeObjectEx
withX509_EXTENSIONS
. As a result you will receiveCERT_EXTENSIONS
- an array ofCERT_EXTENSION
(see msdn.microsoft.com/en-us/library/aa377195.aspx). An extension consist of an OID which define the extension, an attribute whether the extension if critical (whether you really MUST understand it) and an optional additional encoded extension data, which are in the most cases BER encoded NULL. Of cause you can decode the information yourself corresponds to 4.2 of RFC 3280, X.509 PKI (see http://www.ietf.org/rfc/rfc3280.txt).