sock = socket.create_connection((self.host, self.port), self.timeout, self.
    source_address)
if self._tunnel_host:
    self.sock = sock
self._tunnel()
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
    ssl_version=ssl.PROTOCOL_TLSv1)
httplib.HTTPSConnection.connect = connect
opener = urllib.request.build_opener()
f = opener.open('https://www.google.com/')
How to use urllib2 to get a webpage using SSLv3 encryption