Turn the exception into a warning

This commit is contained in:
Ruben van Staveren 2022-07-27 14:53:15 +02:00
parent 497c230394
commit d614c1ff06
Signed by: ruben
GPG Key ID: 886F6BECD477A93F

View File

@ -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