im trying to do a https get via python requests to a local server and I'm getting a "certificate verify failed: unable to get local issuer certificate" error.
The server uses a self signed certificate and it has basic constraint CA flag as False. I tried using the request's verify option as well. it resulted in same error.
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
Verification with openssl as well failed
error 20 at 0 depth lookup: unable to get local issuer certificate
error cer.pem: verification failed
However When I tried with a different self signed certificate with basic constraint CA flag as True, I'm getting a self signed certificate error and if I use the verify option in python requests, its working properly.
'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)'
Any idea why the self signed certificate with basic constraint CA flag as False is throwing a different error and how to get it accepted by requests module