Fix Python 3.11 compatibility in KİK v2 client
This commit is contained in:
@@ -41,8 +41,9 @@ class KikV2ApiClient:
|
|||||||
ssl_context.check_hostname = False
|
ssl_context.check_hostname = False
|
||||||
ssl_context.verify_mode = ssl.CERT_NONE
|
ssl_context.verify_mode = ssl.CERT_NONE
|
||||||
|
|
||||||
# Enable legacy server connect option for older SSL implementations
|
# Enable legacy server connect option for older SSL implementations (Python 3.12+)
|
||||||
ssl_context.options |= ssl.OP_LEGACY_SERVER_CONNECT
|
if hasattr(ssl, 'OP_LEGACY_SERVER_CONNECT'):
|
||||||
|
ssl_context.options |= ssl.OP_LEGACY_SERVER_CONNECT
|
||||||
|
|
||||||
# Set broader cipher suite support including legacy ciphers
|
# Set broader cipher suite support including legacy ciphers
|
||||||
ssl_context.set_ciphers('ALL:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA')
|
ssl_context.set_ciphers('ALL:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA')
|
||||||
|
|||||||
Reference in New Issue
Block a user