summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorGrant Ramsay <grant.ramsay@hotmail.com>2023-11-29 00:15:39 (GMT)
committerGitHub <noreply@github.com>2023-11-29 00:15:39 (GMT)
commite413daf5f6b983bdb4e1965d76b5313cb93b266e (patch)
tree1a6e410e4c910cf75e2016a687668bc4da8843d4 /Lib/ssl.py
parent48dfd74a9db9d4aa9c6f23b4a67b461e5d977173 (diff)
downloadcpython-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 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 36fca9d..d014849 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -116,7 +116,7 @@ except ImportError:
from _ssl import (
HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN, HAS_SSLv2, HAS_SSLv3, HAS_TLSv1,
- HAS_TLSv1_1, HAS_TLSv1_2, HAS_TLSv1_3
+ HAS_TLSv1_1, HAS_TLSv1_2, HAS_TLSv1_3, HAS_PSK
)
from _ssl import _DEFAULT_CIPHERS, _OPENSSL_API_VERSION