launchpadlib authentication lib fails on Fedora

Bug #1156907 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Fix Released
Undecided
Unassigned

Bug Description

On Fedora 18, authentication attempts with launchpadlib results in the following error:

  File "/usr/lib/python2.7/site-packages/lazr/restfulclient/_browser.py", line 326, in _request_and_retry
    url, method=method, body=body, headers=headers)
  File "/usr/lib/python2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/__init__.py", line 1597, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/site-packages/launchpadlib/launchpad.py", line 126, in _request
    LaunchpadOAuthAwareHttp, self)._request(*args)
  File "/usr/lib/python2.7/site-packages/lazr/restfulclient/_browser.py", line 153, in _request
    redirections, cachekey)
  File "/usr/lib/python2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/__init__.py", line 1345, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/__init__.py", line 1281, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/__init__.py", line 1013, in connect
    self.disable_ssl_certificate_validation, self.ca_certs)
  File "/usr/lib/python2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/__init__.py", line 80, in _ssl_wrap_socket
    cert_reqs=cert_reqs, ca_certs=ca_certs)
  File "/usr/lib64/python2.7/ssl.py", line 381, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib64/python2.7/ssl.py", line 141, in __init__
    ciphers)
ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

This is caused by lazr/restfulclient/_browser.py attempting to load /etc/ssl/certs/ca-certificates.crt which doesn't exist.

On Fedora 18 the equivalent file is /etc/ssl/certs/ca-bundle.crt

A workaround was to create a symlink

Revision history for this message
poy (poy) wrote :

Thanks a lot!

On Cygwin, the file (installed as part of the ca-certificates package) is at /usr/ssl/certs/ca-bundle.crt so this is the command I had to use:
ln -s /usr/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt

Colin Watson (cjwatson)
affects: lazr.authentication → lazr.restfulclient
Revision history for this message
Colin Watson (cjwatson) wrote :

This was fixed some years ago in lazr.restfulclient 0.13.3:

0.13.3 (2013-03-22)
===================

  - Fall back to httplib2's default certificate path if the
    Debian/Ubuntu one doesn't exist. The default bundle might work,
    but a path that doesn't exist is never going to. New httplib2
    bundles contain the required CA certs.

Changed in lazr.restfulclient:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.