Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8945569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:16:43+00:00 2026-06-15T12:16:43+00:00

Today I faced one interesting issue. I’m using the foursquare recommended python library httplib2

  • 0

Today I faced one interesting issue.

I’m using the foursquare recommended python library httplib2 raise

SSLHandshakeError(SSLError(1, '_ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed'),) 

while trying to request an oauth token

response, body = h.request(url, method, headers=headers, body=data)

in

_process_request_with_httplib2 function

does anyone know why this happens?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:16:44+00:00Added an answer on June 15, 2026 at 12:16 pm

    If you know that the site you’re trying to get is a “good guy”, you can try creating your “opener” like this:

    import httplib2
    if __name__ == "__main__":
        h = httplib2.Http(".cache", disable_ssl_certificate_validation=True)
        resp, content = h.request("https://site/whose/certificate/is/bad/", "GET")
    

    (the interesting part is disable_ssl_certificate_validation=True )

    From the docs:
    http://bitworking.org/projects/httplib2/doc/html/libhttplib2.html#httplib2.Http

    EDIT 01:

    Since your question was actually why does this happen, you can check this or this.

    EDIT 02:

    Seeing how this answer has been visited by more people than I expected, I’d like to explain a bit when disabling certificate validation could be useful.

    First, a bit of light background on how these certificates work. There’s quite a lot of information in the links provided above, but here it goes, anyway.

    The SSL certificates need to be verified by a well known (at least, well known to your browser) Certificate Authority. You usually buy the whole certificate from one of those authorities (Symantec, GoDaddy…)

    Broadly speaking, the idea is: Those Certificate Authorities (CA) give you a certificate that also contains the CA information in it. Your browsers have a list of well known CAs, so when your browser receives a certificate, it will do something like: “HmmmMMMmmm…. [the browser makes a supiciuous face here] … I received a certificate, and it says it’s verified by Symantec. Do I know that “Symantec” guy? [the browser then goes to its list of well known CAs and checks for Symantec] Oh, yeah! I do. Ok, the certificate is good!

    You can see that information yourself if you click on the little lock by the URL in your browser:

    Chrome certificate information

    However, there are cases in which you just want to test the HTTPS, and you create your own Certificate Authority using a couple of command line tools and you use that “custom” CA to sign a “custom” certificate that you just generated as well, right? In that case, your browser (which, by the way, in the question is httplib2.Http) is not going to have your “custom” CA among the list of trusted CAs, so it’s going to say that the certificate is invalid. The information is still going to travel encrypted, but what the browser is telling you is that it doesn’t fully trust that is traveling encrypted to the place you are supposing it’s going.

    For instance, let’s say you created a set of custom keys and CAs and all the mambo-jumbo following this tutorial for your localhost FQDN and that your CA certificate file is located in the current directory. You could very well have a server running on https://localhost:4443 using your custom certificates and whatnot. Now, your CA certificate file is located in the current directory, in the file ./ca.crt (in the same directory your Python script is going to be running in). You could use httplib2 like this:

    h = httplib2.Http(ca_certs='./ca.crt')
    response, body = h.request('https://localhost:4443')
    print(response)
    print(body)
    

    … and you wouldn’t see the warning anymore. Why? Because you told httplib2 to go look for the CA’s certificate to ./ca.crt)

    However, since Chrome (to cite a browser) doesn’t know about this CA’s certificate, it will consider it invalid:

    enter image description here

    Also, certificates expire. There’s a chance you are working in a company which uses an internal site with SSL encryption. It works ok for a year, and then your browser starts complaining. You go to the person that is in charge of the security, and ask “Yo!! I get this warning here! What’s happening?” And the answer could very well be “Oh boy!! I forgot to renew the certificate! It’s ok, just accept it from now, until I fix that.” (true story, although there were swearwords in the answer I received 😀 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I faced an interesting problem today. I have 4 strings which I need to
Today I faced one question in interview. Is it possible to apply inheritance concept
Today I faced a problem that there is one memory leak in my iphone
today I faced with very interesting problem. When I try to rewrite xml file.
I'm quite new to using NetBeans and today I faced a problem. I have
Today I faced with one problem. My teammate created branch from master. He developed
Today I encountered interesting issue. That's what I have: 2 images with humanoids on
Today I faced an interesting thing as FF File API and separate files by
Today I faced a strange problem in C#. I have an ASP.NET page where
Today I generated a webservice client with CXF 2.6.1 (latest version), using the tool

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.