Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
python-requests
no-default-cacert.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-default-cacert.patch of Package python-requests
--- MANIFEST.in | 2 +- requests/adapters.py | 12 +++++------- requests/certs.py | 5 +++-- 3 files changed, 9 insertions(+), 10 deletions(-) --- 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 @@ -213,15 +213,13 @@ class HTTPAdapter(BaseAdapter): if verify is not True: cert_loc = verify - 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' - if not os.path.isdir(cert_loc): + if cert_loc is None: + # use default context + conn.ca_certs = None + conn.ca_cert_dir = None + elif not os.path.isdir(cert_loc): conn.ca_certs = cert_loc else: conn.ca_cert_dir = cert_loc --- 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 ca-certificates instead of + # having an another bundle + return '/etc/ssl/ca-bundle.pem' if __name__ == '__main__': print(where())
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor