diff --git a/sort_certificate.py b/sort_certificate.py index 1658a2e..5115007 100755 --- a/sort_certificate.py +++ b/sort_certificate.py @@ -227,13 +227,13 @@ def order_x509(x509_objects, root_issuers): str(root_crt.get_subject())) # Double check if our self signed root certificate is not also present # as an cross signed intermediate: - # - It confuses the ordering process + # - It might confuse the ordering process if next((x for x in x509_objects if x.get_subject() != x.get_issuer() and x.get_subject() == root_crt.get_subject()), None): - raise CertificateComponentException('Both present as intermediate ' - 'and root certificate: %s' % - str(root_crt.get_subject())) + logging.warning('Both present as intermediate ' + 'and root certificate: %s' % + str(root_crt.get_subject())) else: # Get intermediate cert signed by any root from bundle as anchor, and # make that our root