From 3576f18a82d1a1fb4dfe8b4fe85fc6bbc2ebce87 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 17 Sep 2018 10:47:08 +0100 Subject: [PATCH] Verify server TLS certificates --- IRCServer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IRCServer.py b/IRCServer.py index 0a8829e9..fe77e771 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -85,6 +85,8 @@ class Server(object): context.options |= ssl.OP_NO_SSLv2 context.options |= ssl.OP_NO_SSLv3 context.options |= ssl.OP_NO_TLSv1 + context.load_default_certs() + context.verify_mode = ssl.CERT_REQUIRED self.socket = context.wrap_socket(self.socket) def connect(self):