From d614c1ff0650f3b135e766cc25d12dea5707557d Mon Sep 17 00:00:00 2001 From: Ruben van Staveren Date: Wed, 27 Jul 2022 14:53:15 +0200 Subject: [PATCH] Turn the exception into a warning --- sort_certificate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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