Error
requests.exceptions.SSLError: HTTPSConnectionPool Max retries exceeded with url: (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Missing Authority Key Identifier (_ssl.c:1028)'))).
Analysis & Solution
Recently, we updated from Python 3.11 to 3.13, which resulted in error above. We did verify AKI = SKI in chain of certificates. Also, imported chain of certificates into certifi.
Nothing worked for us. Seemingly, it is a bug with Python 3.13.
So, we downgraded to Python 3.12 and it started working.
Other problems and solution -
'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))
solution
pip install pip-system-certs
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)
solution
1# openssl s_client -showcerts -connect signin.aws.amazon.com:443 </dev/null 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p' > test-cert.pem
2# python -m certifi
3# cat test-cert.pem |tee -a <path found in #2>
Comments
Post a Comment