Give more information on the current state of processed/remaining certificates

This commit is contained in:
Ruben van Staveren 2022-07-27 11:51:58 +02:00
parent 2931f4809e
commit 5c4f6d2c67
Signed by: ruben
GPG Key ID: 886F6BECD477A93F

View File

@ -257,6 +257,14 @@ def order_x509(x509_objects, root_issuers):
bundle.insert(0, x509_objects.pop(x509_objects.index(sibling[0])))
else:
# Lets complain
logging.error('Certificates remaining data\n\t%s',
'\n\t'.join([f'Subject: {x.get_subject()},'
f' Issuer: {x.get_issuer()}'
for x in x509_objects]))
logging.error('Certificates placed in bundle \n\t%s',
'\n\t'.join([f'Subject: {x.get_subject()},'
f' Issuer: {x.get_issuer()}'
for x in bundle]))
raise CertificateComponentException('Non matching certificates in '
'input:'
' No sibling found for %s'