Commit ebff930a authored by Jason R. Coombs's avatar Jason R. Coombs

Restored tunnel (proxy) support in SSL connections. Fixes #52.

parent 8a33154b
......@@ -25,6 +25,8 @@ CHANGES
install. The script will still fall back to a simple ``urlopen`` on
platforms that do not have these tools.
* Issue #65: Deprecated the ``Features`` functionality.
* Issue #52: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
connection.
-----
0.9.8
......
......@@ -194,6 +194,12 @@ class VerifyingHTTPSConn(HTTPSConnection):
sock = create_connection(
(self.host, self.port), getattr(self,'source_address',None)
)
# Handle the socket if a (proxy) tunnel is present
if hasattr(self, '_tunnel') and getattr(self, '_tunnel_host', None):
self.sock = sock
self._tunnel()
self.sock = ssl.wrap_socket(
sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment