mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
fix oscssl.py not verifying TLS cert verification
use own implementation of HTTPSConnection (myHTTPSConnection) instead the one provided by M2Crypto (httpslib.HTTPConnection) And in proxy case use myProxyHTTPSConnection. all credits go to wfrisch
This commit is contained in:
parent
23c8f19868
commit
1d866351b9
@ -199,13 +199,13 @@ class myHTTPSHandler(M2Crypto.m2urllib2.HTTPSHandler):
|
||||
|
||||
if target_host != host:
|
||||
request_uri = urldefrag(full_url)[0]
|
||||
h = httpslib.ProxyHTTPSConnection(host=host, ssl_context=self.ctx)
|
||||
h = myProxyHTTPSConnection(host=host, ssl_context=self.ctx)
|
||||
else:
|
||||
try: # up to python-3.2
|
||||
request_uri = req.get_selector()
|
||||
except AttributeError: # from python-3.3
|
||||
request_uri = req.selector
|
||||
h = httpslib.HTTPSConnection(host=host, ssl_context=self.ctx)
|
||||
h = myHTTPSConnection(host=host, ssl_context=self.ctx)
|
||||
# End our change
|
||||
h.set_debuglevel(self._debuglevel)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user