establish tls with client even if server connection fails

This commit is contained in:
Maximilian Hils 2015-11-26 23:13:06 +01:00
parent 3eea7f1216
commit 89013eb7af

View File

@ -379,11 +379,10 @@ class TlsLayer(Layer):
return choice return choice
def _establish_tls_with_client_and_server(self): def _establish_tls_with_client_and_server(self):
self.ctx.connect()
# If establishing TLS with the server fails, we try to establish TLS with the client nonetheless # If establishing TLS with the server fails, we try to establish TLS with the client nonetheless
# to send an error message over TLS. # to send an error message over TLS.
try: try:
self.ctx.connect()
self._establish_tls_with_server() self._establish_tls_with_server()
except Exception as e: except Exception as e:
try: try: