From 8654e7093fea5ad36b577624c47218539510ad3a Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Mon, 2 Jun 2014 15:26:15 -0700 Subject: [PATCH] require certificates for TLS connections This was being forced for the new Python 3.4-style TLS context wrapping, but not the old code. This change should make the behavior consistent regardless of Python version. --- irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc.py b/irc.py index 854e884..045d564 100755 --- a/irc.py +++ b/irc.py @@ -120,7 +120,7 @@ class Bot(asynchat.async_chat): else: ca_certs = self.ca_certs sock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLSv1, - cert_reqs=ssl.CERT_OPTIONAL, ca_certs=ca_certs) + cert_reqs=ssl.CERT_REQUIRED, ca_certs=ca_certs) # FIXME: this doesn't work with SSL enabled #sock.setblocking(False) self.set_socket(sock)