diff --git a/sort_certificate.py b/sort_certificate.py index 413f39d..98c32dd 100755 --- a/sort_certificate.py +++ b/sort_certificate.py @@ -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'