We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed05f94 commit 8df3fe3Copy full SHA for 8df3fe3
1 file changed
tests/test_tcp.py
@@ -1616,11 +1616,10 @@ def test_ssl_connect_accepted_socket(self):
1616
if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
1617
server_proto = ssl.PROTOCOL_TLS_SERVER
1618
client_proto = ssl.PROTOCOL_TLS_CLIENT
1619
+ elif hasattr(ssl, 'PROTOCOL_TLS'):
1620
+ client_proto = server_proto = ssl.PROTOCOL_TLS
1621
else:
- if hasattr(ssl, 'PROTOCOL_TLS'):
- client_proto = server_proto = ssl.PROTOCOL_TLS
1622
- else:
1623
- client_proto = server_proto = ssl.PROTOCOL_SSLv23
+ client_proto = server_proto = ssl.PROTOCOL_SSLv23
1624
1625
server_context = ssl.SSLContext(server_proto)
1626
server_context.load_cert_chain(self.ONLYCERT, self.ONLYKEY)
0 commit comments