我有一个对站点的叶子证书进行编码的 PEM 文件。我想通过查询相关的 OCSP 服务器来检查它是否被撤销,但我不知道要使用哪个 URL。
如何从证书中提取 OCSP URL?
我有一个对站点的叶子证书进行编码的 PEM 文件。我想通过查询相关的 OCSP 服务器来检查它是否被撤销,但我不知道要使用哪个 URL。
如何从证书中提取 OCSP URL?
openssl x509
当您使用以下-text
选项时,此信息会公开:
$ openssl x509 -in cert.pem -noout -text
它在 x509v3 扩展块中可见:
Authority Information Access:
OCSP - URI:http://ocsp.int-x3.letsencrypt.org
CA Issuers - URI:http://cert.int-x3.letsencrypt.org/
如果您只对这些信息感兴趣,您可以直接使用-ocsp_uri
而不是-text
:
$ openssl x509 -in cert.pem -noout -ocsp_uri
http://ocsp.int-x3.letsencrypt.org