http://bugzilla.opensuse.org/show_bug.cgi?id=912903 Bug ID: 912903 Summary: python3-requests crashes with https Classification: openSUSE Product: openSUSE 13.1 Version: Final Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Security Assignee: security-team@suse.de Reporter: jnweiger@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Reproduce ---------- python3
import requests # using python3-requests-2.4.1-17.3.noarch r = requests.get('https://owncloud.com') # produces a stack trace saying '[Errno 21] Is A Directory' multiple times, but does not mention the path name it tried.
Traceback (most recent call last): File "/usr/lib/python3.3/site-packages/requests/packages/urllib3/util/ssl_.py", line 114, in ssl_wrap_socket context.load_verify_locations(ca_certs) IsADirectoryError: [Errno 21] Is a directory .... Workaround ----------
verify='/etc/ssl/ca-bundle.pem' if not os.path.exists(verify): verify='/etc/ssl/certs/ca-certificates.crt' # seen in https://urllib3.readthedocs.org/en/latest/security.html if not os.path.exists(verify): verify=True # default, but fails on python3@openSUSE-13.1 with DEFAULT_CA_BUNDLE_PATH=/etc/ssl/cersts/
requests.get(url, verify=verify) <Response [200]>
# works fine. # Maybe DEFAULT_CA_BUNDLE_PATH should have been '/etc/ssl/ca-bundle.pem' instead? -- You are receiving this mail because: You are on the CC list for the bug.