From 097bdd6f6fd147b066709fa2dddcf6ddbb573a7d Mon Sep 17 00:00:00 2001 From: mimi89999 Date: Tue, 28 Jul 2026 16:14:00 +0200 Subject: [PATCH] gh-154727: Document that SSLSocket.version() comes from the TLS library --- Doc/library/ssl.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 66fe6c7aee48626..eaffefc9a471468 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -1411,9 +1411,12 @@ SSL sockets also have the following additional methods and attributes: Return the actual SSL protocol version negotiated by the connection as a string, or ``None`` if no secure connection is established. - As of this writing, possible return values include ``"SSLv2"``, - ``"SSLv3"``, ``"TLSv1"``, ``"TLSv1.1"`` and ``"TLSv1.2"``. - Recent OpenSSL versions may define more return values. + + The string comes directly from the underlying TLS library. The + possible values depend on which library and version Python is + linked against; see `SSL_get_version() + `_ + for OpenSSL's values. .. versionadded:: 3.5