@@ -270,12 +270,14 @@ def get_certificate_authority_details(crl_signer_certificate: x509.Certificate,
270
270
logging .debug ("Using CRL Signer certificate for details" )
271
271
272
272
certificate_authority_name = cert_for_details .subject
273
- certificate_akid = get_skid ( cert_for_details )
274
-
275
- logging .debug (f"Certificate Authority Name: { certificate_authority_name } " )
276
- logging .debug (f"Certificate AKID: { certificate_akid } " )
273
+ try :
274
+ certificate_akid = get_skid ( cert_for_details )
275
+ logging .debug (f"Certificate Authority Name: { certificate_authority_name } " )
276
+ logging .debug (f"Certificate AKID: { certificate_akid } " )
277
277
278
- return certificate_authority_name , certificate_akid
278
+ return certificate_authority_name , certificate_akid
279
+ except ExtensionNotFound :
280
+ logging .warning ("Certificate SKID not found in authoarity certificate." )
279
281
280
282
def get_b64_name (name : x509 .name .Name ) -> str :
281
283
'''
@@ -360,7 +362,7 @@ def get_paa_cert(self, initial_cert: x509.Certificate) -> Optional[x509.Certific
360
362
try :
361
363
akid = get_akid (initial_cert )
362
364
except ExtensionNotFound :
363
- logging .error ('Certificate AKID not found.' )
365
+ logging .warning ('Certificate AKID not found.' )
364
366
return
365
367
paa_certificate = None
366
368
while not paa_certificate :
@@ -379,7 +381,7 @@ def get_paa_cert(self, initial_cert: x509.Certificate) -> Optional[x509.Certific
379
381
try :
380
382
akid = get_akid (issuer_certificate )
381
383
except ExtensionNotFound :
382
- logging .error ('Issuer Certificate AKID not found.' )
384
+ logging .warning ('Issuer Certificate AKID not found.' )
383
385
logging .debug (f"akid: { akid } " )
384
386
if paa_certificate is None :
385
387
logging .warning ("PAA Certificate not found, continue..." )
@@ -578,9 +580,13 @@ def __init__(self, crls: [], dcl_certificates: [], revocation_points_response_fi
578
580
579
581
580
582
def get_lookup_key (self , certificate : x509 .Certificate ) -> str :
581
- base64_name = get_b64_name (certificate .subject )
582
- skid_hex_formatted = self .get_formatted_hex_skid (get_skid (certificate ))
583
- return base64_name + skid_hex_formatted
583
+ base64_name = get_b64_name (certificate .subject )
584
+ try :
585
+ skid = get_skid (certificate )
586
+ skid_hex_formatted = self .get_formatted_hex_skid (skid )
587
+ return base64_name + skid_hex_formatted
588
+ except ExtensionNotFound :
589
+ logging .warning ("CertificateSKID not found, continue..." )
584
590
585
591
586
592
def get_crls (self , unread_crls : []) -> list [x509 .CertificateRevocationList ]:
0 commit comments