SSL handshake error

With the current version, 0.13.5, when I try to get from a page with an unsigned ssl certificate the whole request blocks, so the execution of the normal code is blocked. If I cancel the execution, the error below was generated. Using Python 2.7.2. I used version 0.11.2 before, there everything works.

```
>>> import requests
>>> r = requests.get('https://127.0.0.1:8015/', verify=False)
(nothing happens, no return, unable to execute another statement)
```

Error after Ctrl+C:

```
  File "<stdin>", line 1, in <module>
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/api.py", line 54, in get
    return request('get', url, **kwargs)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/safe_mode.py", line 37, in wrapped
    return function(method, url, **kwargs)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/api.py", line 42, in request
    return s.request(method=method, url=url, **kwargs)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/sessions.py", line 230, in request
    r.send(prefetch=prefetch)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/models.py", line 603, in send
    timeout=self.timeout,
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/packages/urllib3/poolmanager.py", line 153, in urlopen
    return self.proxy_pool.urlopen(method, url, **kw)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 415, in urlopen
    body=body, headers=headers)
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 267, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python2.7/httplib.py", line 955, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/lib/python2.7/httplib.py", line 989, in _send_request
    self.endheaders(body)
  File "/usr/local/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/local/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/local/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/home/darignac/ve/tests/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 101, in connect
    ca_certs=self.ca_certs)
  File "/usr/local/lib/python2.7/ssl.py", line 372, in wrap_socket
    ciphers=ciphers)
  File "/usr/local/lib/python2.7/ssl.py", line 134, in __init__
    self.do_handshake()
  File "/usr/local/lib/python2.7/ssl.py", line 296, in do_handshake
    self._sslobj.do_handshake()
```


Odd, that doesn't seem to be coming from Requests at all.

I don't have the time to spin up a web server and a self-signed cert right now, but if I use https://www.pcwebshop.co.uk/, which is a publicly accessible webpage with a self-signed cert, using Python 2.7.1:

``` python
>>> import requests
>>> r = requests.get('https://www.pcwebshop.co.uk/')
Traceback (most recent call last):
...snip...
SSLError: [Errno 1] certificate verify failed
>>> r = requests.get('https://www.pcwebshop.co.uk/', verify = False)
>>> r.status_code
200
```

Do you show the same behaviour with that site as I do, or do you hang?


Hi Cory, thanks for getting back. I'll check this on monday as I'm not in the office right now.


Whether using verify=True or verify=False, when calling the get method on the pcwebshop site my Python just hangs up, I have to cancel with Ctrl+C an get the error I mentioned before. I waited like 10 minutes before I canceled.


Right, so the most obvious difference between your machine and mine is the Python version. At some point today I'll try to spin up a VM and see if I can reproduce the issue using Python 2.7.2.


Right, I don't get a hang when using 2.7.2 on OS X. Unfortunately, the top of your stack trace is in `_ssl`, which is a library that is a `.so` in my 2.7.2 install.

My suspicion would be that there is something not-quite-right with your Python install. Is 2.7.2 the version that was installed with your machine, or have you changed it recently?


The 2.7.2 install is not the system installation, it's an alternative I once installed a while ago (using Ubuntu 10 with Python 2.6 as default). I'll check the behaviour on a linux with 2.7 as default installation.
Meanwhile, I waited until the "request.get(...)" timed out (which took like forever), the output was

```
requests.exceptions.SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol
```


Ok, I checked it on Ubuntu 12 with Python 2.7.3, there it works. I don't even get the "certificate verify failed" error, which maybe is an error? Usage of verify seems to be ignored, at least there is no difference in requesting with varify=True or varify=False.
So it seems to be an issue on my 2.7.2 installation (althoug the old version did work, weird...) Sorry for bothering you and thanks for the help!