title: Requests requests.exceptions.SSLError: EOF occurred in violation of protocol
body: <p>I'm trying to download files from a website that uses HttpBasicAuth. Everything worked fine on an Ubuntu machine but not when I tried to run my script on a Windows machine. I have problems downloading files from that website using requests. Below is the code relevant to my problem:</p>
  
  <p>Initial code that works on Ubuntu:</p>
  
  <pre><code>url = 'https://abc.example.com'
  s = requests.Session()
  s.verify = False
  s.auth = (creds['user'], creds['passwd'])
  filename = "somefile.txt"
  download_url = url + "/" + filename
  resp = s.get(download_url)  # fails on this line when run in Windows
  </code></pre>
  
  <p>I did a <code>verify=False</code> because I'm having <code>SSL3_GET_SERVER_CERTIFICATE:certificate verify failed.</code> if I don't. I don't understand fully what that means and I would appreciate an explanation. From how I understood it, requests just cannot verify the server's cert. Similarly, it seemed that my browser does not recognize the certificate either as seen below.</p>
  
  <p><a href="https://i.stack.imgur.com/d53yQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d53yQ.png" alt="browser cannot recognize"></a></p>
  
  <p>Anyways, so I ran the script on Windows that has pretty much the same python version (2.7.x) and I got this:</p>
  
  <p><a href="https://i.stack.imgur.com/mn3U4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mn3U4.png" alt="exception shown"></a></p>
  
  <p>I did a quick search and found some fixes <a href="https://stackoverflow.com/questions/14102416/python-requests-requests-exceptions-sslerror-errno-8-ssl-c504-eof-occurred">here</a> and found a <a href="https://github.com/jkbrzt/httpie/issues/315" rel="nofollow noreferrer">github issue here</a>. I followed the first fix and changed my code to:</p>
  
  <pre><code>url = 'https://abc.example.com'
  s = requests.Session()
  s.verify = False
  s.auth = (creds['user'], creds['passwd'])
  s.mount('https://', MyAdapter())
  # .. omitted code similar to the one above ..
  resp = s.get(download_url)
  </code></pre>
  
  <p>I added the class specified in the answer</p>
  
  <pre><code>class MyAdapter(HTTPAdapter):
      def init_poolmanager(self, connections, maxsize, block=False):
          self.poolmanager = PoolManager(num_pools=connections,
                                         maxsize=maxsize,
                                         block=block,
                                         ssl_version=ssl.PROTOCOL_TLSv1)
  </code></pre>
  
  <p>It is still showing the same errors.</p>
  
  <p>From the github issue, they were checking the OpenSSL version, so I did a check on the Windows machine and if I remember correctly it is <code>1.0.2a</code>. I did a check on the Ubuntu machine where the initial version was working, it is <code>1.0.1f</code>.</p>
  
  <p>EDIT:</p>
  
  <p>Python version in Ubuntu: 2.7.6 (works here)</p>
  
  <p>Python version in Windows: 2.7.10 (does not work here)</p>