mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
This commit is contained in:
commit
73e9bd4d25
3 changed files with 44 additions and 10 deletions
15
Lib/ssl.py
15
Lib/ssl.py
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue