From c45ff99ac8b44c5f492167425db7ce5f6e83d0b8 Mon Sep 17 00:00:00 2001 From: Matt Arnold Date: Sat, 22 Feb 2025 18:40:45 -0500 Subject: update code to fix deprecations --- client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client.py') diff --git a/client.py b/client.py index c70317c..f0cd359 100644 --- a/client.py +++ b/client.py @@ -22,7 +22,9 @@ with open("config.json") as f: # so you can set up TLS or not as you need it # These provide good defaults. But your mileage may vary oursock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -context = ssl.SSLContext() +context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT) +context.minimum_version = ssl.TLSVersion.TLSv1_2 +context.maximum_version = ssl.TLSVersion.TLSv1_3 context.check_hostname = False context.verify_mode = ssl.CERT_NONE oursock = context.wrap_socket(oursock, server_hostname=config["hostname"]) -- cgit 1.4.1-2-gfad0