mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
fixed deprecation warning about ssl
This commit is contained in:
parent
4b80bd8e07
commit
de5a93c2b7
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user