发布时间:2019-09-22 08:13:30编辑:auto阅读(3752)
from OpenSSL import crypto
# path表示证书路径,file_name表示证书文件名
cert_file = '/path/file_name/'
cert_file = '/path/to/your/certificate'
cert = crypto.load_certificate(crypto.FILETYPE_PEM, open(cert_file).read())
subject = cert.get_subject()
# 得到证书的域名
issued_to = subject.CN
issuer = cert.get_issuer()
# 得到证书颁发机构
issued_by = issuer.CN
上一篇: python 使用sqlite3
下一篇: Python office编程:word
47831
46369
37253
34714
29299
25960
24876
19935
19518
18005
5776°
6401°
5912°
5954°
7054°
5898°
5929°
6425°
6390°
7759°