diff options
author | Grant Ramsay <grant.ramsay@hotmail.com> | 2023-11-29 00:15:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 00:15:39 (GMT) |
commit | e413daf5f6b983bdb4e1965d76b5313cb93b266e (patch) | |
tree | 1a6e410e4c910cf75e2016a687668bc4da8843d4 /Doc/library | |
parent | 48dfd74a9db9d4aa9c6f23b4a67b461e5d977173 (diff) | |
download | cpython-e413daf5f6b983bdb4e1965d76b5313cb93b266e.zip cpython-e413daf5f6b983bdb4e1965d76b5313cb93b266e.tar.gz cpython-e413daf5f6b983bdb4e1965d76b5313cb93b266e.tar.bz2 |
gh-112454: Disable TLS-PSK if OpenSSL was built without PSK support (#112491)
If OpenSSL was built without PSK support, the python TLS-PSK
methods will raise "NotImplementedError" if called.
Add a constant "ssl.HAS_PSK" to check if TLS-PSK is supported
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ssl.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 2062945..0db233e 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -908,6 +908,12 @@ Constants .. versionadded:: 3.7 +.. data:: HAS_PSK + + Whether the OpenSSL library has built-in support for TLS-PSK. + + .. versionadded:: 3.13 + .. data:: CHANNEL_BINDING_TYPES List of supported TLS channel binding types. Strings in this list @@ -2050,6 +2056,9 @@ to speed up repeated connections from the same clients. return 'ClientId_1', psk_table.get(hint, b'') context.set_psk_client_callback(callback) + This method will raise :exc:`NotImplementedError` if :data:`HAS_PSK` is + ``False``. + .. versionadded:: 3.13 .. method:: SSLContext.set_psk_server_callback(callback, identity_hint=None) @@ -2092,6 +2101,9 @@ to speed up repeated connections from the same clients. return psk_table.get(identity, b'') context.set_psk_server_callback(callback, 'ServerId_1') + This method will raise :exc:`NotImplementedError` if :data:`HAS_PSK` is + ``False``. + .. versionadded:: 3.13 .. index:: single: certificates |