@@ -304,22 +304,21 @@ def main(use_main_net_dcld: str, use_test_net_dcld: str, use_main_net_http: bool
304
304
paa_certificate_object .public_key ().verify (crl_signer_certificate .signature ,
305
305
crl_signer_certificate .tbs_certificate_bytes ,
306
306
ec .ECDSA (crl_signer_certificate .signature_hash_algorithm ))
307
- except Exception as e :
307
+ except Exception :
308
308
logging .warning ("CRL Signer Certificate is not signed by PAA Certificate, continue..." )
309
- logging .error ("Error: " , e )
310
309
continue
311
310
312
311
# 6. Obtain the CRL
313
312
logging .debug (f"Fetching CRL from { revocation_point ['dataURL' ]} " )
314
313
try :
315
314
r = requests .get (revocation_point ["dataURL" ], timeout = 5 )
316
- except Exception as e :
315
+ except Exception :
317
316
logging .error ('Failed to fetch CRL' )
318
317
continue
319
318
320
319
try :
321
320
crl_file = x509 .load_der_x509_crl (r .content )
322
- except Exception as e :
321
+ except Exception :
323
322
logging .error ('Failed to load CRL' )
324
323
continue
325
324
@@ -374,16 +373,10 @@ def main(use_main_net_dcld: str, use_test_net_dcld: str, use_main_net_http: bool
374
373
pass
375
374
376
375
# b.
377
- try :
378
- revoked_cert_authority_key_id = revoked_cert .extensions .get_extension_for_oid (
379
- x509 .OID_AUTHORITY_KEY_IDENTIFIER ).value .key_identifier
380
-
381
- if revoked_cert_authority_key_id is None or revoked_cert_authority_key_id != crl_signer_subject_key_id :
382
- logging .warning ("CRL Authority Key ID is not CRL Signer Subject Key ID, continue..." )
383
- continue
384
- except Exception :
385
- logging .warning ("CRL Authority Key ID not found, continue..." )
386
- continue
376
+ # TODO: Verify that the certificate chain of the entry is linking to the same PAA
377
+ # that issued the CRLSignerCertificate for this entry, including path through
378
+ # CRLSignerDelegator if present. If the PAAs under which were issued the certificate
379
+ # and the CRLSignerCertificate are different, ignore the entry.
387
380
388
381
# c. and d.
389
382
serialnumber_list .append (bytes (str ('{:02X}' .format (revoked_cert .serial_number )), 'utf-8' ).decode ('utf-8' ))
0 commit comments