diff options
author | Christian Heimes <christian@python.org> | 2018-09-23 06:32:31 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-09-23 06:32:31 (GMT) |
commit | 9fb051f032c36b9f6086b79086b4d6b7755a3d70 (patch) | |
tree | 8beefc83ddbba0c9ec0b76bf60b159eba9e48d65 /Lib/ssl.py | |
parent | 4b860fd777e983f5d2a6bd1288e2b53099c6a803 (diff) | |
download | cpython-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.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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() |