diff options
| author | 2018-09-19 14:44:28 +0100 | |
|---|---|---|
| committer | 2018-09-19 14:44:28 +0100 | |
| commit | 7108b05bc0ff2c66650913699157774d09e0fb8a (patch) | |
| tree | beb1e1f79c194d770f4c66f8b9ea8613b823eceb /IRCServer.py | |
| parent | Don't send ducks when they're disabled. (diff) | |
| signature | ||
Only accept PROTOCOL_TLS as SSL handshake version
Diffstat (limited to 'IRCServer.py')
| -rw-r--r-- | IRCServer.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/IRCServer.py b/IRCServer.py index 8c8606ac..8bc2567f 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -6,10 +6,6 @@ THROTTLE_SECONDS = 1 READ_TIMEOUT_SECONDS = 120 PING_INTERVAL_SECONDS = 30 -OUR_TLS_PROTOCOL = ssl.PROTOCOL_SSLv23 -if hasattr(ssl, "PROTOCOL_TLS"): - OUR_TLS_PROTOCOL = ssl.PROTOCOL_TLS - class Server(object): def __init__(self, bot, events, id, alias, hostname, port, password, ipv4, tls, nickname, username, realname): @@ -84,7 +80,7 @@ class Server(object): return self.cached_fileno if fileno == -1 else fileno def tls_wrap(self): - context = ssl.SSLContext(OUR_TLS_PROTOCOL) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_SSLv2 context.options |= ssl.OP_NO_SSLv3 context.options |= ssl.OP_NO_TLSv1 |
