CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate • No root certificate found to verify the cert chain • Commonly caused by corporate proxies.
stores to work with OpenSSL • macOS and Windows don’t do this • Python uses OpenSSL on macOS and Windows… Problem! What should OpenSSL use? • Certifi: Mozilla’s CA bundle repackaged to PyPI
system policy • One trust store per application, tough to maintain • Certificates in trust store are static, no auto updates • PyPI is now a CA certificate distribution channel
https://github.com/sethmlarson/truststore • Provides an SSLContext API • Works on Linux, macOS, and Windows • Tested with urllib3, requests, aiohttp • Requires Python 3.10+