mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Replace deprecated SSLContext constant PROTOCOL_TLS in mqtt (#88214)
Replace deprecated SSLContext constants
This commit is contained in:
@@ -23,7 +23,7 @@ def server_context_modern() -> ssl.SSLContext:
|
||||
https://wiki.mozilla.org/Security/Server_Side_TLS
|
||||
Modern guidelines are followed.
|
||||
"""
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
|
||||
context.options |= (
|
||||
ssl.OP_NO_SSLv2
|
||||
@@ -53,7 +53,7 @@ def server_context_intermediate() -> ssl.SSLContext:
|
||||
https://wiki.mozilla.org/Security/Server_Side_TLS
|
||||
Intermediate guidelines are followed.
|
||||
"""
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
|
||||
context.options |= (
|
||||
ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_CIPHER_SERVER_PREFERENCE
|
||||
|
||||
Reference in New Issue
Block a user