This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Phus Lu
Recipients Phus Lu
Date 2017-02-21.03:29:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487647747.15.0.370290912125.issue29610@psf.upfronthosting.co.za>
In-reply-to
Content
Background:

I'm working on adding https-proxy[1] support to python-requests https://github.com/phuslu/requests_httpsproxy

Issue:
ssl module(python 2.7) counld establish ssl handshakes over a https-proxy

Reproduce Steps:
I setup a https-proxy in bwg.phus.lu:443

>>> import socket,ssl
>>> sock = ssl.wrap_socket(socket.create_connection(('bwg.phus.lu', 443)))
>>> sock.sendall('CONNECT httpbin.org:443 HTTP/1.0\r\n\r\n')
36
>>> sock.recv()
'HTTP/1.1 200 OK\r\n\r\n'
>>> ssl.wrap_socket(sock)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    ssl.wrap_socket(sock)
  File "/usr/lib/python2.7/ssl.py", line 943, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 611, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 840, in do_handshake
    self._sslobj.do_handshake()
SSLError: [SSL: UNKNOWN_ALERT_TYPE] unknown alert type (_ssl.c:661)


[1] https://www.chromium.org/developers/design-documents/secure-web-proxy
History
Date User Action Args
2017-02-21 03:29:07Phus Lusetrecipients: + Phus Lu
2017-02-21 03:29:07Phus Lusetmessageid: <1487647747.15.0.370290912125.issue29610@psf.upfronthosting.co.za>
2017-02-21 03:29:07Phus Lulinkissue29610 messages
2017-02-21 03:29:05Phus Lucreate