Improved handling of cross signed intermediates. #1
This commit is contained in:
parent
ebe467260a
commit
ba94ceb9cc
@ -187,11 +187,12 @@ def find_intermediate_root(x509_objects, root_issuers):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
# Some intermediates have the *same* subject as some root certificates.
|
# Some intermediates have the *same* subject as some root certificates.
|
||||||
# blacklist them
|
# blacklist them if their issuer and subject name is present in the root
|
||||||
# XXX better use pubkey/hash for that, but can't find the appropriate
|
# bundle
|
||||||
# interface to that at the moment
|
|
||||||
excluded_issuers = [str(x.get_subject()) for x in x509_objects
|
excluded_issuers = [str(x.get_subject()) for x in x509_objects
|
||||||
if x.get_subject() != x.get_issuer()]
|
if x.get_subject() != x.get_issuer()
|
||||||
|
and str(x.get_issuer()) in root_issuers
|
||||||
|
and str(x.get_subject()) in root_issuers]
|
||||||
|
|
||||||
logging.debug('Known root issuers\n\t%s', '\n\t'.join(root_issuers))
|
logging.debug('Known root issuers\n\t%s', '\n\t'.join(root_issuers))
|
||||||
logging.debug('Excluding issuers because of potential intermediates\n\t%s',
|
logging.debug('Excluding issuers because of potential intermediates\n\t%s',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user