3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

Irc: remove outdated cert/keyfile comment

This commit is contained in:
James Lu 2017-05-28 20:09:26 -07:00 committed by GitHub
parent 9ec3cccaee
commit 1ff027152a

View File

@ -229,8 +229,7 @@ class Irc(utils.DeprecatedAttributesObject):
ip = socket.getaddrinfo(ip, port, stype)[0][-1][0] ip = socket.getaddrinfo(ip, port, stype)[0][-1][0]
log.debug('(%s) Resolving address %s to %s', self.name, old_ip, ip) log.debug('(%s) Resolving address %s to %s', self.name, old_ip, ip)
# Enable SSL if set to do so. This requires a valid keyfile and # Enable SSL if set to do so.
# certfile to be present.
self.ssl = self.serverdata.get('ssl') self.ssl = self.serverdata.get('ssl')
if self.ssl: if self.ssl:
log.info('(%s) Attempting SSL for this connection...', self.name) log.info('(%s) Attempting SSL for this connection...', self.name)
@ -242,6 +241,7 @@ class Irc(utils.DeprecatedAttributesObject):
context.options |= ssl.OP_NO_SSLv2 context.options |= ssl.OP_NO_SSLv2
context.options |= ssl.OP_NO_SSLv3 context.options |= ssl.OP_NO_SSLv3
# Cert and key files are optional, load them if specified.
if certfile and keyfile: if certfile and keyfile:
try: try:
context.load_cert_chain(certfile, keyfile) context.load_cert_chain(certfile, keyfile)