Now I am afraid to get the requests library in order to fulfill a simple GET request to my site with a Allow encryption . Everything is fine with the site, and I can access it from Chrome just fine. (Now I am running OSX El Capitan).
First I tried to make a GET request to the site:
>>> import requests >>> requests.get('https://example.com')
This gives me:
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Then I tried various things, including obtaining a certificate Allow privilege encryption , and the following openssl command validates my site certificate successfully
> openssl s_client -CAfile ./letsencryptauthorityx1.pem -connect example.com:443
The output of which included the following:
... SSL-Session: Protocol : TLSv1 Cipher : DHE-RSA-AES256-SHA Session-ID: ... Session-ID-ctx: Master-Key: ... Key-Arg : None Start Time: 1452865123 Timeout : 300 (sec) Verify return code: 0 (ok)
Perhaps something is missing for me, but it seems to me that my site has been checked in accordance with the Let Encrypt certificate of authority provided by me. So, I happily changed the Python code to:
>>> requests.get('https://example.com', verify='./letsencryptauthorityx1.pem')
But I still get requests.exceptions.SSLError error. I also tried using the DER certificate credential format, but then I get the following error from requests :
requests.exceptions.SSLError: unknown error (_ssl.c:2825)
Can someone possibly teach me how to fix this?