diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-01-07 17:14:26 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-01-07 17:14:26 (GMT) |
commit | 4cb17812d94c57868257743dc163b4c62a1de9d7 (patch) | |
tree | e24551431a302b33124962a68d6b9742de45510c /Lib/ssl.py | |
parent | e5db863c224f32103760d1c745acf9b140a40902 (diff) | |
download | cpython-4cb17812d94c57868257743dc163b4c62a1de9d7.zip cpython-4cb17812d94c57868257743dc163b4c62a1de9d7.tar.gz cpython-4cb17812d94c57868257743dc163b4c62a1de9d7.tar.bz2 |
expose the client's cipher suites from the handshake (closes #23186)
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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: |