[issue29610] ssl do_handshake fails on https-proxy (aka. https over https-proxy)

2017-02-20 Thread Phus Lu

New submission from Phus Lu:

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 "", line 1, in 
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

--
messages: 288259
nosy: Phus Lu
priority: normal
severity: normal
status: open
title: ssl do_handshake fails on https-proxy (aka. https over https-proxy)
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue29610>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29610] ssl do_handshake fails on https-proxy (aka. https over https-proxy)

2017-02-20 Thread Phus Lu

Changes by Phus Lu :


--
assignee:  -> christian.heimes
components: +SSL
nosy: +christian.heimes
versions: +Python 3.5

___
Python tracker 
<http://bugs.python.org/issue29610>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com