get_subject_alt_name fails to find subjectAltName data under Python 3
mjs opened this issue · comments
Menno Finlay-Smits commented
Under Python 3, extension names come back as bytes but get_subject_alt_name
compares the name to a unicode string so the comparison fails.
I noticed the problem when connecting to imap.mail.yahoo.com. The commonName
has *.imap.mail.yahoo.com
which doesn't match the hostname and one of the subjectAltName
entries is imap.mail.yahoo.com
so that is the entry that's required. Under Python 3, the hostname check fails but it works under Python 2.
This should be easy enough to fix but I don't have time right now so I'm just filing the bug for now.
Menno Finlay-Smits commented