There can be a root certificate and a cross signed intermediate certificate with the same subject

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

View File

@ -226,8 +226,7 @@ def order_x509(x509_objects, root_issuers):
logging.warning('Found self signed (root) certificate %s in input',
str(root_crt.get_subject()))
# Double check if our self signed root certificate is not also present
# as an intermediate:
# - It is probably invalid input, and doesn't make sense
# as an cross signed intermediate:
# - It confuses the ordering process
if next((x for x in x509_objects
if x.get_subject() != x.get_issuer()