Skip to content

Commit f7072af

Browse files
committed
Fix TLSv1_3 constant bug
1 parent b34b40f commit f7072af

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

wolfssl/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050

5151
from wolfssl._methods import ( # noqa: F401
5252
PROTOCOL_SSLv23, PROTOCOL_SSLv3, PROTOCOL_TLSv1,
53-
PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2, PROTOCOL_TLS,
54-
WolfSSLMethod as _WolfSSLMethod
53+
PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2, PROTOCOL_TLSv1_3,
54+
PROTOCOL_TLS, WolfSSLMethod as _WolfSSLMethod
5555
)
5656

5757
CERT_NONE = 0
@@ -904,10 +904,6 @@ def wrap_socket(sock, keyfile=None, certfile=None, server_side=False,
904904
Which connections succeed will vary depending on the versions of the
905905
ssl providers on both sides of the communication.
906906
907-
Note 2:
908-
For TLS 1.3 connections use PROTOCOL_TLS as there is no dedicated
909-
PROTOCOL constant for just TLS 1.3.
910-
911907
The ciphers parameter sets the available ciphers for this SSL object. It
912908
should be a string in the wolfSSL cipher list format.
913909

wolfssl/_methods.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
PROTOCOL_TLSv1 = 3
3636
PROTOCOL_TLSv1_1 = 4
3737
PROTOCOL_TLSv1_2 = 5
38+
PROTOCOL_TLSv1_3 = 6
3839

3940
_PROTOCOL_LIST = [PROTOCOL_SSLv23, PROTOCOL_SSLv3, PROTOCOL_TLS,
40-
PROTOCOL_TLSv1, PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2]
41+
PROTOCOL_TLSv1, PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2,
42+
PROTOCOL_TLSv1_3]
4143

4244
_DYNAMIC_TYPE_METHOD = 11
4345

0 commit comments

Comments
 (0)