forked from pool/python-websocket-client
Accepting request 238443 from home:rjschwei
- needed by newer version of google-cloud-sdk, generally useful OBS-URL: https://build.opensuse.org/request/show/238443 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websocket-client?expand=0&rev=1
This commit is contained in:
15
webSoc_useSystemCert.patch
Normal file
15
webSoc_useSystemCert.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- websocket/__init__.py.orig
|
||||
+++ websocket/__init__.py
|
||||
@@ -517,8 +517,10 @@ class WebSocket(object):
|
||||
|
||||
if is_secure:
|
||||
if HAVE_SSL:
|
||||
- sslopt = dict(cert_reqs=ssl.CERT_REQUIRED,
|
||||
- ca_certs=os.path.join(os.path.dirname(__file__), "cacert.pem"))
|
||||
+ sslopt = dict(cert_reqs=ssl.CERT_REQUIRED)
|
||||
+ certPath = os.path.join(os.path.dirname(__file__), "cacert.pem")
|
||||
+ if os.path.isfile(certPath):
|
||||
+ sslopt['ca_certs'] = certPath
|
||||
sslopt.update(self.sslopt)
|
||||
self.sock = ssl.wrap_socket(self.sock, **sslopt)
|
||||
match_hostname(self.sock.getpeercert(), hostname)
|
||||
Reference in New Issue
Block a user