Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add host:port printing to SSL/TLS connection errors
  • Loading branch information
Murgeye committed Sep 16, 2022
commit c2cd94fcaac6299c376dfa64b992f56ae3d09184
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