MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / HTTPSPKIAuthHandler

Class HTTPSPKIAuthHandler

lib/request/pkihandler.py:14–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12from thirdparty.six.moves import urllib as _urllib
13
14class HTTPSPKIAuthHandler(_urllib.request.HTTPSHandler):
15 def __init__(self, auth_file):
16 _urllib.request.HTTPSHandler.__init__(self)
17 self.auth_file = auth_file
18
19 def https_open(self, req):
20 return self.do_open(self.getConnection, req)
21
22 def getConnection(self, host, timeout=None):
23 try:
24 # Reference: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_cert_chain
25 return _http_client.HTTPSConnection(host, cert_file=self.auth_file, key_file=self.auth_file, timeout=conf.timeout)
26 except IOError as ex:
27 errMsg = "error occurred while using key "
28 errMsg += "file '%s' ('%s')" % (self.auth_file, getSafeExString(ex))
29 raise SqlmapConnectionException(errMsg)

Callers 1

_setHTTPAuthenticationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…