summaryrefslogtreecommitdiff
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-01-07 11:14:26 -0600
committerBenjamin Peterson <benjamin@python.org>2015-01-07 11:14:26 -0600
commit74edad8cfa677608529c23f90bd8b9a5a91c7574 (patch)
treeac7b29012c34bd628b4529aff156b9a9920a463e /Lib/ssl.py
parent8bf46eb1be59f147160c8e2690df157d156bff7a (diff)
downloadcpython-74edad8cfa677608529c23f90bd8b9a5a91c7574.tar.gz
expose the client's cipher suites from the handshake (closes #23186)
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 9264699886..658e8a722d 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -572,6 +572,10 @@ class SSLObject:
ssl_version, secret_bits)``."""
return self._sslobj.cipher()
+ def shared_ciphers(self):
+ """Return the ciphers shared by the client during the handshake."""
+ return self._sslobj.shared_ciphers()
+
def compression(self):
"""Return the current compression algorithm in use, or ``None`` if
compression was not negotiated or not supported by one of the peers."""
@@ -784,6 +788,12 @@ class SSLSocket(socket):
else:
return self._sslobj.cipher()
+ def shared_ciphers(self):
+ self._checkClosed()
+ if not self._sslobj:
+ return None
+ return self._sslobj.shared_ciphers()
+
def compression(self):
self._checkClosed()
if not self._sslobj: