Merge pull request #1220 from GLolol/drivers/logging

Socket: lower SSL related log level, and reword text to flow better
This commit is contained in:
Valentin Lorentz 2016-02-24 19:31:13 +01:00
commit bf02f79847
1 changed files with 7 additions and 7 deletions

View File

@ -280,7 +280,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
if network_config.ssl():
self.starttls()
elif not network_config.requireStarttls():
drivers.log.critical(('Connection to network %s'
drivers.log.warning(('Connection to network %s '
'does not use SSL/TLS, which makes it vulnerable to '
'man-in-the-middle attacks and passive eavesdropping. '
'You should consider upgrading your connection to SSL/TLS '
@ -378,19 +378,19 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
except getattr(ssl, 'CertificateError', None) as e:
# Default to None for old Python version, which do not have
# CertificateError
drivers.log.critical(('Certificate validation failed when '
drivers.log.error(('Certificate validation failed when '
'connecting to %s: %s\n'
'This means someone is doing a man-in-the-middle attack '
'on your connection, or the server\'s certificate is '
'This means either someone is doing a man-in-the-middle '
'attack on your connection, or the server\'s certificate is '
'not in your trusted fingerprints list.')
% (self.irc.network, e.args[0]))
raise ssl.SSLError('Aborting because of failed certificate '
'verification.')
except ssl.SSLError as e:
drivers.log.critical(('Certificate validation failed when '
drivers.log.error(('Certificate validation failed when '
'connecting to %s: %s\n'
'This means someone is doing a man-in-the-middle attack '
'on your connection, or that the server\'s '
'This means either someone is doing a man-in-the-middle '
'attack on your connection, or the server\'s '
'certificate is not trusted.')
% (self.irc.network, e.args[1]))
raise ssl.SSLError('Aborting because of failed certificate '