python openssl 读取 crl 吊销 证书

import OpenSSL



fp = open('/Users/heyong/Downloads/DZCACrl20130502.crl', 'r')



crl = "".join(fp.readlines())



crl_object = OpenSSL.crypto.load_crl(OpenSSL.crypto.FILETYPE_ASN1, crl)


revoked_objects = crl_object.get_revoked()


for rvk in revoked_objects:

    print rvk.get_serial()


你可能感兴趣的:(python openssl 读取 crl 吊销 证书)