Added disable_ssl_certificate_validation #97

Closed
wants to merge 1 commit into
from

Projects

None yet

10 participants

@chrigl
chrigl commented Nov 13, 2011

I am using oauth2 with flattr and like to use ssl, but need to disable the certification validation from httplib2.

@lusun
lusun commented Dec 14, 2011

Can we merge this fix into main?

@creativej

Would love to see this go in too!

@dezza
dezza commented on 30df3d2 Mar 22, 2012

I did your patch, I still get:
http://dpaste.org/U71IK/

Is this related or am I doing something wrong ?

"raise SSLHandshakeError(e)httplib2.SSLHandshakeError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>>>"

Owner

Hi dezza,

you need to tell Client to disable the certification test:

resp, content = client.request('https://oauth.live.com/authorize', "GET", disable_ssl_certificate_validation=True)

@dezza
dezza commented Mar 22, 2012

I did this commit patch, I still get:
http://dpaste.org/U71IK/

Is this related or am I doing something wrong ?

"raise SSLHandshakeError(e)httplib2.SSLHandshakeError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>>>"

@pferreir

+1 for this

@brondsem
brondsem commented May 1, 2012

Another option is make httplib2/oauth2 use a more complete set of certificates from the certifi package. Run pip install certifi and then set the client's ca_certs property, before making any requests. For example:

client = oauth.Client(consumer)
client.ca_certs = certifi.where()
@bjourne
bjourne commented Mar 13, 2013

Another option is to swap out the dependency to httplib2 for python-requests which doesn't have the same problem. The latter reads system installed certificates so it can validate a much larger set sites. And disabling SSL validation for something sensitive like authorization might have very bad consequences.

@602p
602p commented Oct 1, 2014

I would love to see this in main too!

@jetmind
jetmind commented Feb 23, 2015

Will this ever be merged? This is very useful for testing if you have local setup with self-signed cert.

@joestump
Owner

kwargs are now passed onto httplib2. See #136 and commit a1f0bb4 for more.

@joestump joestump closed this Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment