Skip to content

Commit 097bdd6

Browse files
committed
gh-154727: Document that SSLSocket.version() comes from the TLS library
1 parent 2ffab08 commit 097bdd6

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Doc/library/ssl.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,9 +1411,12 @@ SSL sockets also have the following additional methods and attributes:
14111411

14121412
Return the actual SSL protocol version negotiated by the connection
14131413
as a string, or ``None`` if no secure connection is established.
1414-
As of this writing, possible return values include ``"SSLv2"``,
1415-
``"SSLv3"``, ``"TLSv1"``, ``"TLSv1.1"`` and ``"TLSv1.2"``.
1416-
Recent OpenSSL versions may define more return values.
1414+
1415+
The string comes directly from the underlying TLS library. The
1416+
possible values depend on which library and version Python is
1417+
linked against; see `SSL_get_version()
1418+
<https://docs.openssl.org/master/man3/SSL_get_version/#return-values>`_
1419+
for OpenSSL's values.
14171420

14181421
.. versionadded:: 3.5
14191422

0 commit comments

Comments
 (0)