@@ -674,12 +674,12 @@ def test_ciphers(self):
674
674
@skip_if_broken_ubuntu_ssl
675
675
def test_options (self ):
676
676
ctx = ssl .SSLContext (ssl .PROTOCOL_TLSv1 )
677
- # OP_ALL | OP_NO_SSLv2 is the default value
678
- self .assertEqual (ssl .OP_ALL | ssl .OP_NO_SSLv2 ,
679
- ctx .options )
680
- ctx .options |= ssl .OP_NO_SSLv3
677
+ # OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
681
678
self .assertEqual (ssl .OP_ALL | ssl .OP_NO_SSLv2 | ssl .OP_NO_SSLv3 ,
682
679
ctx .options )
680
+ ctx .options |= ssl .OP_NO_TLSv1
681
+ self .assertEqual (ssl .OP_ALL | ssl .OP_NO_SSLv2 | ssl .OP_NO_SSLv3 | ssl .OP_NO_TLSv1 ,
682
+ ctx .options )
683
683
if can_clear_options ():
684
684
ctx .options = (ctx .options & ~ ssl .OP_NO_SSLv2 ) | ssl .OP_NO_TLSv1
685
685
self .assertEqual (ssl .OP_ALL | ssl .OP_NO_TLSv1 | ssl .OP_NO_SSLv3 ,
@@ -2172,17 +2172,17 @@ def test_protocol_sslv23(self):
2172
2172
" SSL2 client to SSL23 server test unexpectedly failed:\n %s\n "
2173
2173
% str (x ))
2174
2174
if hasattr (ssl , 'PROTOCOL_SSLv3' ):
2175
- try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , True )
2175
+ try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , False )
2176
2176
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv23 , True )
2177
2177
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_TLSv1 , True )
2178
2178
2179
2179
if hasattr (ssl , 'PROTOCOL_SSLv3' ):
2180
- try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , True , ssl .CERT_OPTIONAL )
2180
+ try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , False , ssl .CERT_OPTIONAL )
2181
2181
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv23 , True , ssl .CERT_OPTIONAL )
2182
2182
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_TLSv1 , True , ssl .CERT_OPTIONAL )
2183
2183
2184
2184
if hasattr (ssl , 'PROTOCOL_SSLv3' ):
2185
- try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , True , ssl .CERT_REQUIRED )
2185
+ try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv3 , False , ssl .CERT_REQUIRED )
2186
2186
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_SSLv23 , True , ssl .CERT_REQUIRED )
2187
2187
try_protocol_combo (ssl .PROTOCOL_SSLv23 , ssl .PROTOCOL_TLSv1 , True , ssl .CERT_REQUIRED )
2188
2188
@@ -2214,8 +2214,8 @@ def test_protocol_sslv3(self):
2214
2214
try_protocol_combo (ssl .PROTOCOL_SSLv3 , ssl .PROTOCOL_TLSv1 , False )
2215
2215
if no_sslv2_implies_sslv3_hello ():
2216
2216
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
2217
- try_protocol_combo (ssl .PROTOCOL_SSLv3 , ssl .PROTOCOL_SSLv23 , True ,
2218
- client_options = ssl .OP_NO_SSLv2 )
2217
+ try_protocol_combo (ssl .PROTOCOL_SSLv3 , ssl .PROTOCOL_SSLv23 ,
2218
+ False , client_options = ssl .OP_NO_SSLv2 )
2219
2219
2220
2220
@skip_if_broken_ubuntu_ssl
2221
2221
def test_protocol_tlsv1 (self ):
0 commit comments