http://bugzilla.suse.com/show_bug.cgi?id=1007978
Bug ID: 1007978
Summary: python3-reqests missing ca-bundle.pem
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 42.2
Hardware: All
OS: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Other
Assignee: bnc-team-screening@forge.provo.novell.com
Reporter: mvanorder1390@gmail.com
QA Contact: qa-bugs@suse.de
Found By: ---
Blocker: ---
The python3-requests-2.7.0-3.3.noarch package doesn't specify a location for
the certificate, so when trying to use it with the default .pem file it crashes
the application.
Example to duplicate:
python2 -c "import requests; print(requests.get('https://google.com'))"
mvanorder@linux-qsvs:/mnt/linuxdata/home/pirate/dev/dotool> python3 -c "import
requests; print(requests.get('https://google.com'))"
Traceback (most recent call last):
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py",
line 544, in urlopen
body=body, headers=headers)
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py",
line 341, in _make_request
self._validate_conn(conn)
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py",
line 761, in _validate_conn
conn.connect()
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/connection.py",
line 238, in connect
ssl_version=resolved_ssl_version)
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/util/ssl_.py", line
279, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib64/python3.4/ssl.py", line 362, in wrap_socket
_context=self)
File "/usr/lib64/python3.4/ssl.py", line 580, in __init__
self.do_handshake()
File "/usr/lib64/python3.4/ssl.py", line 807, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 367, in
send
timeout=timeout
File
"/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py",
line 574, in urlopen
raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 465, in
request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 573, in
send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 428, in
send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate
verify failed (_ssl.c:600)
There's no location provided for the cert:
python2 -c "import requests; print(requests.certs.where())"
/etc/ssl/ca-bundle.pem
python3 -c "import requests; print(requests.certs.where())"
None
The following is the file that's causing the issue:
diff /usr/lib/python3.4/site-packages/requests/certs.py /usr/lib/python2.7/site-packages/requests/certs.py
0a1
#!/usr/bin/env python
4,5c5,6
< certs.py
< ~~~~~~~~
requests.certs
~~~~~~~~~~~~~~
20,21c21,23
< # vendored bundle inside Requests
< return None
# in openSUSE we rely on ca-certificates instead of
# having an another bundle
return '/etc/ssl/ca-bundle.pem'
--
You are receiving this mail because:
You are on the CC list for the bug.