PupySSLClient: fix ssl_auth=False

This commit is contained in:
Oleksii Shevchuk 2019-05-12 19:59:38 +03:00
parent 3c98368a2a
commit 81ae67a476
1 changed files with 5 additions and 1 deletions

View File

@ -161,7 +161,11 @@ class PupySSLClient(PupyTCPClient):
def connect_any(self, host, port):
socket = super(PupySSLClient, self).connect(host, port)
ctx = ssl.create_default_context()
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS)
ctx.verify_mode = ssl.CERT_NONE
ctx.check_hostname = False
return ctx.wrap_socket(
socket,
server_hostname=self.hostname or host