summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Arnold2025-02-22 18:40:45 -0500
committerMatt Arnold2025-02-22 18:40:45 -0500
commitc45ff99ac8b44c5f492167425db7ce5f6e83d0b8 (patch)
tree82b15597344c839925c9d541ffbdd7950ee27b98
parente8e53da972309e5ace11bd2a46ba5401593a9c2a (diff)
update code to fix deprecations HEAD master
-rw-r--r--IRC.py4
-rw-r--r--client.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/IRC.py b/IRC.py
index 9be5d26..6df303e 100644
--- a/IRC.py
+++ b/IRC.py
@@ -1,9 +1,7 @@
 # Part of rabbitears See LICENSE for permissions
 # Copyright (C) 2022 Matt Arnold
-import socket
-import sys
+
 import irctokens
-import time
 import base64
 
 
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"])