You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I got TLSv1.3:
>>> import socket
... import ssl
...
... hostname = 'lebihan.pl'
... context = ssl.create_default_context()
...
... with socket.create_connection((hostname, 443)) as sock:
... with context.wrap_socket(sock, server_hostname=hostname) as ssock:
... print(ssock.version())
...
TLSv1.3
Documentation
Currently the https://docs.python.org/3.15/library/ssl.html#ssl.SSLSocket.version doc states:
I got
TLSv1.3: