James Oakley 2012-05-20 17:57:04 +00:00 committed by Git OBS Bridge
parent 83bc7fa8f8
commit d22ba905da
2 changed files with 3 additions and 2 deletions

View File

@ -72,7 +72,7 @@ Features:
%prep %prep
%setup -q -n requests-%{version} %setup -q -n requests-%{version}
%if 0%{?suse_version} && 0%{?suse_version} < 1220 %if 0%{?suse_version} && 0%{?suse_version} >= 1220
%patch0 -p1 %patch0 -p1
%endif %endif

View File

@ -12,7 +12,7 @@ Index: requests-0.12.1/requests/utils.py
import zlib import zlib
from netrc import netrc, NetrcParseError 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 path
return None 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 +# If SSL module can load a directory-based store, use that
+try: +try:
+ _ssl.sslwrap(socket.socket()._sock, False, None, None, ssl.CERT_REQUIRED, ssl.PROTOCOL_SSLv23, "/etc/ssl/certs", None) + _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: +except ssl.SSLError:
+ # if certifi is installed, use its CA bundle; + # if certifi is installed, use its CA bundle;
+ # otherwise, try and use the OS bundle + # otherwise, try and use the OS bundle