mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Patch for an Issue #1434
This commit is contained in:
parent
38541b021a
commit
5ed106ecea
6 changed files with 15 additions and 13 deletions
|
|
@ -11,12 +11,13 @@ import urllib2
|
|||
from lib.core.data import conf
|
||||
|
||||
class HTTPSPKIAuthHandler(urllib2.HTTPSHandler):
|
||||
def __init__(self, key_file):
|
||||
def __init__(self, auth_file):
|
||||
urllib2.HTTPSHandler.__init__(self)
|
||||
self.key_file = key_file
|
||||
self.auth_file = auth_file
|
||||
|
||||
def https_open(self, req):
|
||||
return self.do_open(self.getConnection, req)
|
||||
|
||||
def getConnection(self, host, timeout=None):
|
||||
return httplib.HTTPSConnection(host, key_file=self.key_file, timeout=conf.timeout)
|
||||
# Reference: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_cert_chain
|
||||
return httplib.HTTPSConnection(host, cert_file=self.auth_file, key_file=self.auth_file, timeout=conf.timeout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue