Log nice error message for well-behaving clients

This commit is contained in:
Tarjei Husøy 2016-06-04 00:04:01 -07:00
parent 1cb092dd73
commit 982ef9fca5

View file

@ -202,6 +202,13 @@ class ClientConnection(threading.Thread):
self.socket.close()
self.server_socket.shutdown(socket.SHUT_RDWR)
self.server_socket.close()
except ssl.SSLError as exc:
if exc.reason == 'TLSV1_ALERT_UNKNOWN_CA':
_logger.info('Client had an established trust root, could'
' not intercept details.')
else:
_logger.info('Got TLS error when establishing connection: %s', exc.strerror)
raise
finally:
self.terminate()