File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 82
82
"OP_NO_TLSv1" ,
83
83
"OP_NO_TLSv1_1" ,
84
84
"OP_NO_TLSv1_2" ,
85
+ "OP_NO_TLSv1_3" ,
85
86
"MODE_RELEASE_BUFFERS" ,
86
87
"OP_SINGLE_DH_USE" ,
87
88
"OP_SINGLE_ECDH_USE" ,
188
189
OP_NO_TLSv1 : int = _lib .SSL_OP_NO_TLSv1
189
190
OP_NO_TLSv1_1 : int = _lib .SSL_OP_NO_TLSv1_1
190
191
OP_NO_TLSv1_2 : int = _lib .SSL_OP_NO_TLSv1_2
191
- try :
192
- OP_NO_TLSv1_3 : int = _lib .SSL_OP_NO_TLSv1_3
193
- __all__ .append ("OP_NO_TLSv1_3" )
194
- except AttributeError :
195
- pass
192
+ OP_NO_TLSv1_3 : int = _lib .SSL_OP_NO_TLSv1_3
196
193
197
194
MODE_RELEASE_BUFFERS : int = _lib .SSL_MODE_RELEASE_BUFFERS
198
195
Original file line number Diff line number Diff line change 101
101
SSLEAY_DIR ,
102
102
SSLEAY_PLATFORM ,
103
103
SSLEAY_VERSION ,
104
- TLS1_1_VERSION ,
105
104
TLS1_2_VERSION ,
106
105
TLS1_3_VERSION ,
107
106
TLS_METHOD ,
137
136
except ImportError :
138
137
SSL_ST_INIT = SSL_ST_BEFORE = SSL_ST_OK = SSL_ST_RENEGOTIATE = None
139
138
140
- try :
141
- from OpenSSL .SSL import OP_NO_TLSv1_3
142
- except ImportError :
143
- OP_NO_TLSv1_3 = None
144
-
145
139
from .test_crypto import (
146
140
client_cert_pem ,
147
141
client_key_pem ,
@@ -1007,12 +1001,8 @@ def keylog(conn, line):
1007
1001
assert all (b"CLIENT_RANDOM" in line for conn , line in called )
1008
1002
1009
1003
def test_set_proto_version (self ):
1010
- if OP_NO_TLSv1_3 is None :
1011
- high_version = TLS1_2_VERSION
1012
- low_version = TLS1_1_VERSION
1013
- else :
1014
- high_version = TLS1_3_VERSION
1015
- low_version = TLS1_2_VERSION
1004
+ high_version = TLS1_3_VERSION
1005
+ low_version = TLS1_2_VERSION
1016
1006
1017
1007
server_context = Context (TLS_METHOD )
1018
1008
server_context .use_certificate (
You can’t perform that action at this time.
0 commit comments