diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-11 00:27:33 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-11 00:27:33 (GMT) |
commit | 73e9bd4d259c3c213347e45d4bb5bf20fb51c7f4 (patch) | |
tree | 881f1d149dd48c3ec278834efd0e7d6f08212d8e /Lib/ssl.py | |
parent | 6d9388faab63343db47e59eb28c926bc3cbe75d1 (diff) | |
parent | 5c89b4ec55bc7ebe799da296e01544a5bcdc4250 (diff) | |
download | cpython-73e9bd4d259c3c213347e45d4bb5bf20fb51c7f4.zip cpython-73e9bd4d259c3c213347e45d4bb5bf20fb51c7f4.tar.gz cpython-73e9bd4d259c3c213347e45d4bb5bf20fb51c7f4.tar.bz2 |
Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -553,16 +553,11 @@ class SSLSocket(socket): SSL channel, and the address of the remote client.""" newsock, addr = socket.accept(self) - return (SSLSocket(sock=newsock, - keyfile=self.keyfile, certfile=self.certfile, - server_side=True, - cert_reqs=self.cert_reqs, - ssl_version=self.ssl_version, - ca_certs=self.ca_certs, - ciphers=self.ciphers, - do_handshake_on_connect= - self.do_handshake_on_connect), - addr) + newsock = self.context.wrap_socket(newsock, + do_handshake_on_connect=self.do_handshake_on_connect, + suppress_ragged_eofs=self.suppress_ragged_eofs, + server_side=True) + return newsock, addr def get_channel_binding(self, cb_type="tls-unique"): """Get channel binding data for current connection. Raise ValueError |