Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Certificate validation failure #1

Open
MelchiSalins opened this issue Jan 26, 2016 · 2 comments
Open

SSL Certificate validation failure #1

MelchiSalins opened this issue Jan 26, 2016 · 2 comments

Comments

@MelchiSalins
Copy link

2.2.1 :001 > require 'google_maps_service'
 => true 
2.2.1 :002 > gmaps = GoogleMapsService::Client.new(key: 'Removed_my_key')
 => #<GoogleMapsService::Client:0x007fc3f21ddf68 @key="Removed_my_key", @client_id=nil, @client_secret=nil, @retry_timeout=nil, @queries_per_second=nil, @request_options=nil, @ssl_options=nil, @connection=nil> 
2.2.1 :003 > gmaps.geocode('10 Downing St, London SW1A 2AA, United Kingdom')
Hurley::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `connect'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `block in connect'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `connect'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:852:in `start'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1375:in `request'
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1133:in `get'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:80:in `perform_request'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:15:in `block (2 levels) in call'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/client.rb:252:in `initialize'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:14:in `new'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:14:in `block in call'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:58:in `net_http_connection'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/connection.rb:12:in `call'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/client.rb:122:in `call_with_redirects'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/client.rb:89:in `call'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/hurley-0.2/lib/hurley/client.rb:47:in `get'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/google_maps_service-0.4.1/lib/google_maps_service/client.rb:177:in `block in get'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/retriable-2.1.0/lib/retriable.rb:54:in `block in retriable'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/retriable-2.1.0/lib/retriable.rb:48:in `times'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/retriable-2.1.0/lib/retriable.rb:48:in `retriable'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/google_maps_service-0.4.1/lib/google_maps_service/client.rb:174:in `get'
    from /Users/salinsm/.rvm/gems/ruby-2.2.1@gmaps_sb/gems/google_maps_service-0.4.1/lib/google_maps_service/apis/geocoding.rb:50:in `geocode'
    from (irb):3
    from /Users/salinsm/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `<main>'2.2.1 :004 > 
2.2.1 :005 >   exit
@MelchiSalins
Copy link
Author

Alright, I dug into this further and it looks like Hurley is the issue and the project is dead.

@edwardsamuel
Copy link
Owner

It works on me without any SSL problem. I think Hurley can't load your trusted certificate in your default path. Last time, I also got this kind of error for another project. I just installed the certificate into the default path and no more SSL error.

You can follow this post. Or, you can also install the certificate by running:

sudo wget -O `ruby -r openssl -e "puts OpenSSL::X509::DEFAULT_CERT_FILE"` http://curl.haxx.se/ca/cacert.pem

Yup, you are right. Hurley is shutting down but the gem still alive and not yanked (lostisland/hurley#43). This project needs to change Hurley.

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

No branches or pull requests

2 participants