From a1d2ed677c19a7d6bce6471d1491cfbf29d3ecc1 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Sat, 24 Sep 2022 15:51:01 +0100 Subject: [PATCH] packages/ircbot: mod justirc --- packages/servers/ircbot/justirc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/servers/ircbot/justirc.py b/packages/servers/ircbot/justirc.py index 46233bd..1c1e6db 100644 --- a/packages/servers/ircbot/justirc.py +++ b/packages/servers/ircbot/justirc.py @@ -212,8 +212,12 @@ class IRCConnection(EventEmitter): if tls: import ssl - context = ssl.SSLContext() - self.socket = context.wrap_socket(self.socket, server) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + context.check_hostname = False + context.verify_mode = ssl.CERT_NONE + context.minimum_version = ssl.TLSVersion.TLSv1_3 + context.maximum_version = ssl.TLSVersion.TLSv1_3 + self.socket = context.wrap_socket(self.socket) self.lines = self._read_lines() self.emit("connect", _IRCEvent(self))