4 ms·
Long term one possibility is that Python will defer to your OS (in this case, OS X) to make trust decisions for SSL https://lwn.net/Articles/711954/ https://lw
by tialaramex 10y ago
Long term one possibility is that Python will defer to your OS (in this case, OS X) to make trust decisions for SSL
https://lwn.net/Articles/711954/ https://lwn.net/Articles/711954/
This will involve Python ceasing to use OpenSSL in favour of native SSL APIs (except on the Unix platforms where OpenSSL is the native API).
Right now your Python uses OpenSSL, but nobody at all was responsible for keeping the trust store up-to-date. So, making you responsible was in a sense a step up. Certifi basically bundles the Mozilla NSS trust store, which is also used by the BSDs, Linux distros, Haiku and whatever else isn't Apple or Microsoft. But it won't reflect OS X changes, for better or worse. On the other hand, if that PEP goes ahead and Python trusts the OS X built-in stores, Python code may work on your Mac, but not on some guy's FreeBSD machine, because the different trust stores don't agree about whether to trust a certificate. So, swings and roundabouts.
- vosper 10y agoThanks for info, that's helpful. It seems especially bad with virtualenv, since you have the possibility that different Python environments on the same computer have different certificate sets, depending on when you created the virtualenv or whether you updated certifi in that environment. I think the changes should have been a lot more obvious. The OSX installer should have popped up a big box saying "Warning: This version of Python does not have any SSL certificates and will not be able to connect to secure HTTP connections. Without certificates these connections will fail to work. Please click this button to install the 'certifi' package, and read these VERY IMPORTANT notes to understand the implications of this change"