mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Bug fix for HTTPSCertAuthHandler
This commit is contained in:
parent
c0888e92c8
commit
62772125e3
|
@ -7,7 +7,6 @@ See the file 'doc/COPYING' for copying permission
|
||||||
|
|
||||||
import httplib
|
import httplib
|
||||||
import urllib2
|
import urllib2
|
||||||
import sys
|
|
||||||
|
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
|
||||||
|
@ -20,9 +19,5 @@ class HTTPSCertAuthHandler(urllib2.HTTPSHandler):
|
||||||
def https_open(self, req):
|
def https_open(self, req):
|
||||||
return self.do_open(self.getConnection, req)
|
return self.do_open(self.getConnection, req)
|
||||||
|
|
||||||
def getConnection(self, host):
|
def getConnection(self, host, timeout=None):
|
||||||
if sys.version_info >= (2, 6):
|
return httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file, timeout=conf.timeout)
|
||||||
retVal = httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file, timeout=conf.timeout)
|
|
||||||
else:
|
|
||||||
retVal = httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file)
|
|
||||||
return retVal
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user