1

Using Python 3.4 and requests 2.11.1 package to get 'https://www.nfm.com' website, requests throws an SSLError [SSL: UNKNOWN_PROTOCOL]. I'm able to get a valid response from other https sites such as pythonanywhere.com and amazon.com. The error is only encountered trying to requests.get('https://www.nfm.com') or requests.get('https://www.nfm.com', verify=False).

I checked NFM's certificate in Chrome and it's a valid thawte SHA256 SSL CA. Is this a problem with NFM or is there something I need to configure on my end to get a response object from this website?

y2knoproblem
  • 461
  • 6
  • 9
  • It works fine for me, I get `200`when I do `requests.get('https://www.nfm.com')` – noteness Sep 16 '16 at 15:18
  • Works fine for me with python 3.4.3, 3.5.2, 2.7.12, 2.7.6 so there is probably something specific with your system. Please provide OS and openssl version (`ssl.OPENSSL_VERSION`) – Steffen Ullrich Sep 16 '16 at 15:23

1 Answers1

1

According to SSLLabs the server supports only TLS 1.1 and higher. My guess is that you have an older OpenSSL version which is not able to speak this version. Support for TLS 1.1 and TLS 1.2 was added with OpenSSL 1.0.1 years ago but for example Apple ships only the very old version 0.9.8 on Mac OS X which only supports at most TLS 1.0 (which the server does not support).

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172
  • I'm using OSx 10.10.5. Verified the OpenSSL version 0.9.8. How would I go about updating to 1.0.1? Can you recommend a method? – y2knoproblem Sep 16 '16 at 16:35
  • @y2knoproblem: See for example [Updating openssl in python 2.7](http://stackoverflow.com/questions/18752409/updating-openssl-in-python-2-7) or all the other results when searching for [python upgrade openssl mac os x](https://www.google.com/search?q=python+upgrade+openssl+mac+os+x) – Steffen Ullrich Sep 16 '16 at 16:38