Fix deprecated SSLContext() usage (#1271)

This commit is contained in:
Steven B. 2024-11-18 11:49:44 +00:00 committed by GitHub
parent 0d1193ac71
commit 410c3d2623
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,7 +173,7 @@ class SslAesTransport(BaseTransport):
raise DeviceError(msg, error_code=error_code)
def _create_ssl_context(self) -> ssl.SSLContext:
context = ssl.SSLContext()
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.set_ciphers(self.CIPHERS)
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE