Merge lp:~jml/lazr.restfulclient/disable-ssl-cert-verification into lp:lazr.restfulclient
| Status: | Merged |
|---|---|
| Merged at revision: | 132 |
| Proposed branch: | lp:~jml/lazr.restfulclient/disable-ssl-cert-verification |
| Merge into: | lp:lazr.restfulclient |
| Diff against target: |
69 lines (+28/-3) 1 file modified
src/lazr/restfulclient/_browser.py (+28/-3) |
| To merge this branch: | bzr merge lp:~jml/lazr.restfulclient/disable-ssl-cert-verification |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Benji York (community) | code | 2012-06-15 | Approve on 2012-06-18 |
|
Review via email:
|
|||
Description of the Change
The SSL certificates for launchpad.dev and dogfood are invalid, but we still want to test against them. Add an environment variable to disable certificate checking.
<jml> oh right.
<jml> I can't seem to use the API against launchpad.dev
<jml> I get an error about SSL.
<wgrant> Yeah, cert verification will break that.
<jml> httplib2.
<jml> wgrant: is there a work around?
<wgrant> I either hack launchpadlib to not verify the cert, or generate a new cert for launchpad.dev and tell it to trust that.
<cjwatson> I often end up hacking httplib2.
<cjwatson> (search for disable_ssl and change False defaults to True)
<cjwatson> I wish there were an environment variable override.
<cjwatson> dogfood has the same problem.
<jml> wgrant, cjwatson: thanks.
<wgrant> jml: In lazr.restfulcli
<jml> wgrant: even better, thanks.
<cjwatson> There are three sites you need to change, IME.
<cjwatson> I always forget the full list.
<cjwatson> Which is why I've started editing httplib2 instead.
<wgrant> Yeah
<wgrant> Trial and error works for me...
<cjwatson> Because not all the call sites are in the same file.
<wgrant> Yep
| Jonathan Lange (jml) wrote : | # |
| Jonathan Lange (jml) wrote : | # |
This needs https:/
| Benji York (benji) wrote : | # |
Looks good.
It's too bad that the environment variable isn't discoverable. Maybe we could annotate SSH certificate errors with a message about how to disable validation. Or we could just whitelist the development sites with known-bad certs and the user won't see the errors to start with.
- 132. By Jonathan Lange on 2012-06-19
-
Make the env var discoverable.
| Benji York (benji) wrote : | # |
The extra info in the exception looks great.

New changes factor the code slightly better. I haven't added tests.