Fix SSLError in incoming connection with python 3.10
This commit is contained in:
parent
42995c5ca7
commit
761c95d561
|
@ -190,7 +190,10 @@ class Connection(threading.Thread):
|
||||||
'Initializing TLS connection with %s:%s',
|
'Initializing TLS connection with %s:%s',
|
||||||
self.host_print, self.port)
|
self.host_print, self.port)
|
||||||
|
|
||||||
context = ssl.create_default_context()
|
context = ssl.create_default_context(
|
||||||
|
purpose=ssl.Purpose.CLIENT_AUTH if self.server
|
||||||
|
else ssl.Purpose.SERVER_AUTH
|
||||||
|
)
|
||||||
context.check_hostname = False
|
context.check_hostname = False
|
||||||
context.verify_mode = ssl.CERT_NONE
|
context.verify_mode = ssl.CERT_NONE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user