证书的OpenSSL打印OID
我正在面对一个问题,我正在尝试查看证书的EKU的OID。 但是运行时
openssl x509 -in证书.crt -text -noout
我得到
x509v3扩展密钥用法:
TLS Web客户端身份验证,Microsoft SmartCard登录
而不是
1.3.6.1.4.1.311.20.2.2
您知道将其打印到屏幕上的一种方法,我已经看到了另一个帖子,但是使用代码,我只想使用命令行。
我尝试了所有可能有用的 -certopt ,但我没有得到结果。
I'm confronting an issue, I'm trying to see the OIDs of the EKU of a certificate.
But when running
openssl x509 -in certificate.crt -text -noout
I get
X509v3 Extended Key Usage:
TLS Web Client Authentication, Microsoft Smartcard Login
instead of
1.3.6.1.4.1.311.20.2.2
Do you know a way of printing it to the screen, I've seen another post but using code and I want it using command line only.
I've tried all the -certopt that might be useful, but I didn't get the result wanted.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一段时间后,我发现它是用别名替换OID的OpenSL,
因此您只需要手动解码证书即可。
为此,您可以使用任何ASN.1解析器或X509解码器,
我建议cyberchef
gchq.github.io/cyberchef
例如,如果我使用基本的openssl工具:
并且使用cyberchef rfc x509 parser:
如果您想要更多的详细信息,则可以使用RFC ASN.1 Parser.1 Parser.1 Parser 。
After sometime away from the subject, I found that it was OpenSSL that replaces OIDs with aliases
So you just have to decode the certificate manually.
To do that, you can use any ASN.1 parser or x509 decoder,
I recommend CyberChef
gchq.github.io/CyberChef
for example if I use the basic OpenSSL tool :
And with CyberChef rfc x509 parser :
and if you want more detail, you can use the rfc ASN.1 parser.