fixed deprecation warning about ssl

This commit is contained in:
Maxim Devaev 2023-03-13 14:05:49 +02:00
parent 4b80bd8e07
commit de5a93c2b7

View File

@ -111,7 +111,7 @@ def valid_ssl_ciphers(arg: Any) -> str:
name = "SSL ciphers"
arg = valid_stripped_string_not_empty(arg, name)
try:
ssl.SSLContext(ssl.PROTOCOL_TLS).set_ciphers(arg)
ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER).set_ciphers(arg)
except Exception as err:
raise ValidatorError(f"The argument {arg!r} is not a valid {name}: {err}")
return arg