用于检查x509数字证书的OCSP吊销状态的库。
ocsp-checker的Python项目详细描述
OCSP检查器
概述
OCSP Checker是一个基于albandiquet的nassl包装器和python加密机构的cryptography包的python包。依靠web浏览器从一开始就检查x509数字证书hasbeenbroken的吊销状态,在web浏览器之外验证证书是一个手动过程。OCSP Checker旨在通过提供一种自动方法来检查x509数字证书的OCSP吊销状态来解决这个问题。在
先决条件
Python-Python 3.7和3.8(64位)。目前还不支持Python3.9。在
安装
pip install ocsp-checker
使用
>>> from ocspchecker import ocspchecker
>>> ocsp_request = ocspchecker.get_ocsp_status("github.com")
样本输出
下面的输出示例,如果要向输出添加更多字段/信息,请告诉我。在
^{pr2}$请注意:如果您在使用MITM SSL代理的网络上运行此程序,则可能会收到意外结果(请参见下文):
["Error: Certificate Authority Information Access (AIA) Extension Missing. Possible MITM Proxy."]
命令行用法
现在可以在命令行使用OCSP Checker。格式为:
usage: ocsp-checker [-h] --target target [--port port]
Check the OCSP revocation status for a x509 digital certificate.
optional arguments:
-h, --help show this help message and exit
--target target, -t target
The target to test
--port port, -p port The port to test (default is 443)
例如:
ocspchecker -t github.com
反馈
给我发邮件到joe@metlife.com
- 项目
标签: