fixed deprecation warning

This commit is contained in:
Maxim Devaev 2022-01-06 05:46:09 +03:00
parent a67c20be29
commit 0efd93d496

View File

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