summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2018-09-23 06:32:31 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-23 06:32:31 (GMT)
commit9fb051f032c36b9f6086b79086b4d6b7755a3d70 (patch)
tree8beefc83ddbba0c9ec0b76bf60b159eba9e48d65 /Lib/ssl.py
parent4b860fd777e983f5d2a6bd1288e2b53099c6a803 (diff)
downloadcpython-9fb051f032c36b9f6086b79086b4d6b7755a3d70.zip
cpython-9fb051f032c36b9f6086b79086b4d6b7755a3d70.tar.gz
cpython-9fb051f032c36b9f6086b79086b4d6b7755a3d70.tar.bz2
bpo-34670: Add TLS 1.3 post handshake auth (GH-9460)
Add SSLContext.post_handshake_auth and SSLSocket.verify_client_post_handshake for TLS 1.3 post-handshake authentication. Signed-off-by: Christian Heimes <christian@python.org>q https://bugs.python.org/issue34670
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index fa7c152..c7b4932 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -777,6 +777,9 @@ class SSLObject:
current SSL channel. """
return self._sslobj.version()
+ def verify_client_post_handshake(self):
+ return self._sslobj.verify_client_post_handshake()
+
class SSLSocket(socket):
"""This class implements a subtype of socket.socket that wraps
@@ -1094,6 +1097,12 @@ class SSLSocket(socket):
else:
raise ValueError("No SSL wrapper around " + str(self))
+ def verify_client_post_handshake(self):
+ if self._sslobj:
+ return self._sslobj.verify_client_post_handshake()
+ else:
+ raise ValueError("No SSL wrapper around " + str(self))
+
def _real_close(self):
self._sslobj = None
super()._real_close()