From 1cdb55a6a9cc86d08df0df541cec5c76b9505aed Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 13 Nov 2022 01:03:07 -0800 Subject: [PATCH] Set SSLContext.minimum_version to TLSv1.2 `ssl.OP_NO_TLSv1` and `ssl.OP_NO_TLSv1_1` deprecated since Python 3.7 and OpenSSL 1.1.0. Ref: #1870 --- plexpy/webstart.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plexpy/webstart.py b/plexpy/webstart.py index a2d84ec0..3b8a1a90 100644 --- a/plexpy/webstart.py +++ b/plexpy/webstart.py @@ -106,10 +106,7 @@ def initialize(options): purpose=ssl.Purpose.CLIENT_AUTH, cafile=https_cert_chain ) - # Context options: - # PROTOCOL_TLS_SERVER | OP_NO_SSLv2 | OP_NO_SSLv3 | OP_NO_TLSv1 | OP_NO_TLSv1_1 - context.options |= ssl.OP_NO_TLSv1 - context.options |= ssl.OP_NO_TLSv1_1 + context.minimum_version = ssl.TLSVersion.TLSv1_2 context.load_cert_chain(https_cert, https_key) options_dict['server.ssl_context'] = context