Add OP_NO_TLSv1 and fix a bug created while fixing another bug

This commit is contained in:
jesopo 2017-11-01 14:16:01 +00:00
parent 8a48d0e74c
commit e63438e2bb
2 changed files with 4 additions and 2 deletions

View file

@ -200,6 +200,7 @@ def handle_QUIT(data):
@handler(description="The server is telling us about its capabilities!") @handler(description="The server is telling us about its capabilities!")
def handle_CAP(data): def handle_CAP(data):
capibility_list = []
if len(data.args) > 2: if len(data.args) > 2:
capability_list = data.args[2].split() capability_list = data.args[2].split()
bot.events.on("received").on("cap").call(data=data, bot.events.on("received").on("cap").call(data=data,

View file

@ -45,6 +45,7 @@ class Server(object):
context = ssl.SSLContext(OUR_TLS_PROTOCOL) context = ssl.SSLContext(OUR_TLS_PROTOCOL)
context.options |= ssl.OP_NO_SSLv2 context.options |= ssl.OP_NO_SSLv2
context.options |= ssl.OP_NO_SSLv3 context.options |= ssl.OP_NO_SSLv3
context.options |= ssl.OP_NO_TLSv1
self.socket = context.wrap_socket(self.socket) self.socket = context.wrap_socket(self.socket)
self.cached_fileno = self.socket.fileno() self.cached_fileno = self.socket.fileno()
self.bot.events.on("timer").on("rejoin").hook(self.try_rejoin) self.bot.events.on("timer").on("rejoin").hook(self.try_rejoin)