|
|
|
@ -48,10 +48,10 @@ def verify(server_cert, crl_path, flag):
|
|
|
|
|
Issuer = certobj.get_issuer().get_components()
|
|
|
|
|
CN, L = None, None
|
|
|
|
|
for i in Issuer:
|
|
|
|
|
if i[0] == 'CN':
|
|
|
|
|
CN = i[1]
|
|
|
|
|
elif i[0] == 'L':
|
|
|
|
|
L = i[1]
|
|
|
|
|
if i[0] == b'CN':
|
|
|
|
|
CN = i[1].decode("UTF-8")
|
|
|
|
|
elif i[0] == b'L':
|
|
|
|
|
L = i[1].decode("UTF-8")
|
|
|
|
|
|
|
|
|
|
if CN and len(CN) > 2:
|
|
|
|
|
crl_file = crl_path + CN
|
|
|
|
@ -148,10 +148,10 @@ def get_CRL(path_to_cert):
|
|
|
|
|
Subject = certobj.get_subject().get_components()
|
|
|
|
|
subj = None
|
|
|
|
|
for subj in Subject:
|
|
|
|
|
if subj[0] == 'L':
|
|
|
|
|
url = "https://" + subj[1] + "/?wsdl"
|
|
|
|
|
if subj[0] == 'CN':
|
|
|
|
|
CN = subj[1]
|
|
|
|
|
if subj[0] == b'L':
|
|
|
|
|
url = "https://" + subj[1].decode("UTF-8") + "/?wsdl"
|
|
|
|
|
if subj[0] == b'CN':
|
|
|
|
|
CN = subj[1].decode("UTF-8")
|
|
|
|
|
|
|
|
|
|
if subj and url:
|
|
|
|
|
from .client_class import Client_suds, HTTPSClientCertTransport
|
|
|
|
@ -198,8 +198,8 @@ def find_ca_in_crl(CRL_path, all_ca_certs_list):
|
|
|
|
|
|
|
|
|
|
Issuer = certobj.get_issuer().get_components()
|
|
|
|
|
for item in Issuer:
|
|
|
|
|
if item[0] == 'CN':
|
|
|
|
|
CN = item[1]
|
|
|
|
|
if item[0] == b'CN':
|
|
|
|
|
CN = item[1].decode("UTF-8")
|
|
|
|
|
break
|
|
|
|
|
else:
|
|
|
|
|
continue
|
|
|
|
@ -214,7 +214,9 @@ def find_ca_in_crl(CRL_path, all_ca_certs_list):
|
|
|
|
|
try:
|
|
|
|
|
crl_object = OpenSSL.crypto.load_crl(OpenSSL.crypto.FILETYPE_PEM,
|
|
|
|
|
crl)
|
|
|
|
|
except OpenSSL.SSL.Error:
|
|
|
|
|
except OpenSSL.SSL.Error as e:
|
|
|
|
|
#debug
|
|
|
|
|
print(e)
|
|
|
|
|
continue
|
|
|
|
|
revoked_objects = crl_object.get_revoked()
|
|
|
|
|
|
|
|
|
|