From d22ba905da7e2188b39c808a9fafa73c56d3de5a4f77401914fd454bb36f9088 Mon Sep 17 00:00:00 2001 From: James Oakley Date: Sun, 20 May 2012 17:57:04 +0000 Subject: [PATCH] Fix issues with last checkin OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=19 --- python-requests.spec | 2 +- requests-use_directory_cert_store.patch | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python-requests.spec b/python-requests.spec index 3636843..94ff61c 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -72,7 +72,7 @@ Features: %prep %setup -q -n requests-%{version} -%if 0%{?suse_version} && 0%{?suse_version} < 1220 +%if 0%{?suse_version} && 0%{?suse_version} >= 1220 %patch0 -p1 %endif diff --git a/requests-use_directory_cert_store.patch b/requests-use_directory_cert_store.patch index 3dcf2d9..fedc7e9 100644 --- a/requests-use_directory_cert_store.patch +++ b/requests-use_directory_cert_store.patch @@ -12,7 +12,7 @@ Index: requests-0.12.1/requests/utils.py import zlib from netrc import netrc, NetrcParseError -@@ -51,9 +54,13 @@ def get_os_ca_bundle_path(): +@@ -51,9 +54,14 @@ def get_os_ca_bundle_path(): return path return None @@ -22,6 +22,7 @@ Index: requests-0.12.1/requests/utils.py +# If SSL module can load a directory-based store, use that +try: + _ssl.sslwrap(socket.socket()._sock, False, None, None, ssl.CERT_REQUIRED, ssl.PROTOCOL_SSLv23, "/etc/ssl/certs", None) ++ DEFAULT_CA_BUNDLE_PATH = "/etc/ssl/certs" +except ssl.SSLError: + # if certifi is installed, use its CA bundle; + # otherwise, try and use the OS bundle