3 ms·
> Hopefully they are all following the 2011 requirement to check only SANs when SANs are present (which they should always be in public certificates). Alas las
by tialaramex 6y ago
> Hopefully they are all following the 2011 requirement to check only SANs when SANs are present (which they should always be in public certificates).
Alas last time I paid attention Python's code was pretty bad. They got themselves into a mess by trying to think about the DNS name as text, and thus Unicode, and so they persuaded themselves they care about Ulabels, which are intended as a presentation system (ie they're about what we show in a user interface so that a random Cambodian peasant and a Russian oligarch both get squiggles that they recognise even though DNS was invented by Americans) rather than only the Alabels (a restricted subset of ASCII used by the DNS backend). So whereas the correct way to check if this site's certificate is for the right name is to compare the bytes that make up the DNS name to the bytes in the SAN dnsName of the certificate, which is trivial, they ended up needing to do a bunch of Unicode conversion work, pulling in libraries of other code, which was obsolete and... it becomes a huge mess.
The end result is Python worked fine for some.name.example but might break for say кц.рф (the Registry for public Russian TLD рф) because, even though it doesn't matter at all, they're trying to turn it into a Unicode string.
Maybe somebody who focuses on this can say if this was fixed? I stopped caring in 2018 after I had explained all this twice to relevant people. Banging your head against a wall is bad for you and the wall doesn't care.