Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Normal SSL not working? #67

Dagnan opened this Issue · 3 comments

3 participants



I'm trying to connect my app to Foursquare's API, and I cannot get the plugin to work. It blocks on an SSL issue:

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):

I don't use a certificate, but when creating a request by hand I normally use:

http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

Am I missing something?

Thanks :)


There should not be any issues. net/http defaults to verify none [1]. You can read more on ssl certs here [2]. Please hit up the mailing list [3] with a simple script shows the issue you are having so others can look at/help. Issues should be only for confirmed things. Thanks.

  1. ca8c13b
@ntalbott ntalbott referenced this issue from a commit in ntalbott/httparty
@sandro sandro Set verify_mode to VERIFY_NONE when using ssl
Closes gh-67

Hi Guys,

I've actually re-encountered this exact same issue on ruby 1.9.3p194

When I actually write out the HTTP Request by hand and set http.verify_mode = OpenSSL::SSL::VERIFY_NONE, the response is received. Otherwise I receive the certificate error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed


response = HTTParty.get(url + "?" + paramaters)


    uri = URI.parse(url + "?" + paramaters)
    http =, 443)
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    http.use_ssl = true
    request =
    response = JSON.parse(http.request(request).body)

Using verify mode of none is dangerous. Check out this article for more on how to setup certificates and do ssl correctly:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.