~xnox/lazr.restfulclient/lp1414055

« back to all changes in this revision

Viewing changes to src/lazr/restfulclient/_browser.py

  • Committer: James Westby
  • Date: 2012-12-06 17:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 134.
  • Revision ID: james.westby@canonical.com-20121206171750-dclw7pd2rnvo0k7s
Override the ca certs path for httplib2 to Ubuntu's system certs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        os.environ.get('LP_DISABLE_SSL_CERTIFICATE_VALIDATION', False))
111
111
 
112
112
 
 
113
SYSTEM_CA_CERTS = '/etc/ssl/certs/ca-certificates.crt'
 
114
 
 
115
 
113
116
class RestfulHttp(Http):
114
117
    """An Http subclass with some custom behavior.
115
118
 
125
128
        cert_disabled = ssl_certificate_validation_disabled()
126
129
        super(RestfulHttp, self).__init__(
127
130
            cache, timeout, proxy_info,
128
 
            disable_ssl_certificate_validation=cert_disabled)
 
131
            disable_ssl_certificate_validation=cert_disabled,
 
132
            ca_certs=SYSTEM_CA_CERTS)
129
133
        self.authorizer = authorizer
130
134
        if self.authorizer is not None:
131
135
            self.authorizer.authorizeSession(self)