e41975ba9d
- Update to 2.8.0. OBS-URL: https://build.opensuse.org/request/show/337534 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=74
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
--- a/MANIFEST.in
|
|
+++ b/MANIFEST.in
|
|
@@ -1 +1 @@
|
|
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
|
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
|
|
--- a/requests/adapters.py
|
|
+++ b/requests/adapters.py
|
|
@@ -180,9 +180,6 @@ class HTTPAdapter(BaseAdapter):
|
|
if not cert_loc:
|
|
cert_loc = DEFAULT_CA_BUNDLE_PATH
|
|
|
|
- if not cert_loc:
|
|
- raise Exception("Could not find a suitable SSL CA certificate bundle.")
|
|
-
|
|
conn.cert_reqs = 'CERT_REQUIRED'
|
|
conn.ca_certs = cert_loc
|
|
else:
|
|
--- a/requests/certs.py
|
|
+++ b/requests/certs.py
|
|
@@ -18,8 +18,9 @@ try:
|
|
except ImportError:
|
|
def where():
|
|
"""Return the preferred certificate bundle."""
|
|
- # vendored bundle inside Requests
|
|
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
|
|
+ # in openSUSE we rely on openssl's default instead of
|
|
+ # hardcoding stuff elsewhere
|
|
+ return None
|
|
|
|
if __name__ == '__main__':
|
|
print(where())
|
|
--- a/requests/packages/urllib3/util/ssl_.py
|
|
+++ b/requests/packages/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 != CERT_NONE:
|
|
+ context.set_default_verify_paths()
|
|
|
|
if certfile:
|
|
context.load_cert_chain(certfile, keyfile)
|