diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-21 01:11:30 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-21 01:11:30 +0200 |
| commit | 2861b7531012319790ae299f73f19ed5f7f42bbf (patch) | |
| tree | 0d0fdf5583589b5f86a596a814a932a5a61f3774 /Doc | |
| parent | c3198c7b1321ba16aa135fb27e0e535d557fbd79 (diff) | |
| download | cpython-2861b7531012319790ae299f73f19ed5f7f42bbf.tar.gz | |
Issue #12551: Provide a get_channel_binding() method on SSL sockets so as
to get channel binding data for the current SSL session (only the
"tls-unique" channel binding is implemented). This allows the
implementation of certain authentication mechanisms such as SCRAM-SHA-1-PLUS.
Patch by Jacek Konieczny.
Diffstat (limited to 'Doc')
| -rw-r--r-- | Doc/library/ssl.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 5342e78897..0ac0ac100e 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -386,6 +386,13 @@ Constants .. versionadded:: 3.2 +.. data:: CHANNEL_BINDING_TYPES + + List of supported TLS channel binding types. Strings in this list + can be used as arguments to :meth:`SSLSocket.get_channel_binding`. + + .. versionadded:: 3.3 + .. data:: OPENSSL_VERSION The version string of the OpenSSL library loaded by the interpreter:: @@ -495,6 +502,18 @@ SSL sockets also have the following additional methods and attributes: version of the SSL protocol that defines its use, and the number of secret bits being used. If no connection has been established, returns ``None``. +.. method:: SSLSocket.get_channel_binding(cb_type="tls-unique") + + Get channel binding data for current connection, as a bytes object. Returns + ``None`` if not connected or the handshake has not been completed. + + The *cb_type* parameter allow selection of the desired channel binding + type. Valid channel binding types are listed in the + :data:`CHANNEL_BINDING_TYPES` list. Currently only the 'tls-unique' channel + binding, defined by :rfc:`5929`, is supported. :exc:`ValueError` will be + raised if an unsupported channel binding type is requested. + + .. versionadded:: 3.3 .. method:: SSLSocket.unwrap() |
