14
0
Files
python-urllib3/urllib3-ssl-default-context.patch
Jan Matejek d12858beaa Accepting request 345090 from home:matejcik:urllib3tmp
- re-enable tests, re-add relevant dependencies
  in python 2.7.9 and up
- drop %pre section because apparently "egg-info as file" is no longer
  true and this breaks builds

OBS-URL: https://build.opensuse.org/request/show/345090
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=13
2015-11-18 17:46:02 +00:00

14 lines
548 B
Diff

Index: urllib3-1.12/urllib3/util/ssl_.py
===================================================================
--- urllib3-1.12.orig/urllib3/util/ssl_.py
+++ urllib3-1.12/urllib3/util/ssl_.py
@@ -278,6 +278,8 @@ def ssl_wrap_socket(sock, keyfile=None,
if e.errno == errno.ENOENT:
raise SSLError(e)
raise
+ elif cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'):
+ context.set_default_verify_paths()
if certfile:
context.load_cert_chain(certfile, keyfile)