shazow/urllib3 — pull request #240 by t-8ch (2013-09-04 18:02:31+00:00)
Title: RFC: Introduce SSLHandshakeError

*DO NOT MERGE* (yet)

For the complete rationale see kennethreitz/requests#1570 and linked issues.

Use a dedicated error class to indicate that the SSL handshake failed for technical reasons.
The code is a bit repetitive.
The other possibility would be to trigger the handshake in `connectionpool.py` which would require less duplication.
Keeping the actual handshake inside `ssl_wrap_socket` consistent with the current behaviour.

Another possibility would be to wrap the `ssl_wrap_socket` function inside `utils.py`