From dd4fc8aaa669fe6b0735461e6978e3190720d4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20de=20Giessen?= Date: Tue, 19 Mar 2024 15:49:24 +0100 Subject: [PATCH] ssl: Implement SSLSession support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniƫl van de Giessen --- python-stdlib/ssl/ssl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-stdlib/ssl/ssl.py b/python-stdlib/ssl/ssl.py index c61904be7..2d042ea30 100644 --- a/python-stdlib/ssl/ssl.py +++ b/python-stdlib/ssl/ssl.py @@ -31,13 +31,14 @@ def load_verify_locations(self, cafile=None, cadata=None): self._context.load_verify_locations(cadata) def wrap_socket( - self, sock, server_side=False, do_handshake_on_connect=True, server_hostname=None + self, sock, server_side=False, do_handshake_on_connect=True, server_hostname=None, session=None, ): return self._context.wrap_socket( sock, server_side=server_side, do_handshake_on_connect=do_handshake_on_connect, server_hostname=server_hostname, + session=session, ) @@ -50,6 +51,7 @@ def wrap_socket( cadata=None, server_hostname=None, do_handshake=True, + session=None, ): con = SSLContext(PROTOCOL_TLS_SERVER if server_side else PROTOCOL_TLS_CLIENT) if cert or key: @@ -62,4 +64,5 @@ def wrap_socket( server_side=server_side, do_handshake_on_connect=do_handshake, server_hostname=server_hostname, + session=session, )