Skip to content

Commit

Permalink
Add host:port printing to SSL/TLS connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Murgeye committed Sep 12, 2022
1 parent 444355a commit 183cdff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/request/httpshandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def create_sock():
sock.close()
except (ssl.SSLError, socket.error, _http_client.BadStatusLine) as ex:
self._tunnel_host = None
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))
logger.debug("SSL connection error occurred for '%s' on '%s:%d' ('%s')" % (_lut[protocol], self.host, self.port, getSafeExString(ex)))

if kb.tlsSNI.get(self.host) is None:
kb.tlsSNI[self.host] = success
Expand All @@ -106,7 +106,7 @@ def create_sock():
sock.close()
except (ssl.SSLError, socket.error, _http_client.BadStatusLine) as ex:
self._tunnel_host = None
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))
logger.debug("SSL connection error occurred for '%s' on '%s:%d' ('%s')" % (_lut[protocol], self.host, self.port, getSafeExString(ex)))

if not success:
errMsg = "can't establish SSL connection"
Expand Down

0 comments on commit 183cdff

Please sign in to comment.