Skip to content

SSL certificate verify failed - #56

Merged
jdunck merged 3 commits into
masterfrom
a38377d16358054af704e04cb90332875965070e
Jul 10, 2011
Merged

SSL certificate verify failed#56
jdunck merged 3 commits into
masterfrom
a38377d16358054af704e04cb90332875965070e

Conversation

@JNRowe

@JNRowe JNRowe commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

The quickstart example in the documentation fails with

len(github.repos.watchers("ask/python-github2"))
SSLHandshakeError: [Errno 1] _ssl.c:480: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

and I cannot find any information on what to do in either the error message nor the documentation.

@jdunck

jdunck commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

The problem is that httplib2 has recently started requiring SSL certs to be verified, but the list of CAs that it is honoring is not complete.

Options at this point are to pip httplib2 0.6.0 (you can do this by removing the installed one and installing the old version), or making a patch to httplib2 to give it a fuller list of CAs.

You can add to it here:
http://code.google.com/p/httplib2/issues/detail?id=156

@jdunck jdunck closed this Jul 10, 2011
@JNRowe

JNRowe commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

I think I'd like to see an interim fix pushed out to fix this, as it will affect people deploying with pip or testing with tox or ...

Options:

  1. release simply with a hard dependency on 0.6.0
  2. disable cert validation during setup, which is same behaviour as with 0.6.0 but works with 0.7.x
  3. bundle the DigiCert signature in this package for support with 0.7.0+

Any opinions? I've just switched to option 3 for our packages, but I'm not particularly tied to the decision.

Thanks,

James

@JNRowe JNRowe reopened this Jul 10, 2011
@JNRowe

JNRowe commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

The commits attached are for a simple, only lightly tested, option 3. Removes support for httplib2 <0.7, but it would be easy to support both if needed.

@jdunck

jdunck commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

I suppose it doesn't matter in our case since we're only talking to GitHub, but I'll point out that supplying a ca_file to Httplib2 is not additive; that is, only DigiCert certificates will be trusted after this change.

jdunck added a commit that referenced this pull request Jul 10, 2011
Require httplib2 0.7 (which added SSL cert verification) and trust DigiCert (only) which is used by Github.
@jdunck
jdunck merged commit a1119a8 into master Jul 10, 2011
@jdunck

jdunck commented Jul 10, 2011

Copy link
Copy Markdown
Collaborator

By the way, for posterity, the DigiCert root included in this commit can be verified here:
https://www.digicert.com/digicert-root-certificates.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants