sh8 / wunderlist-api

wunderlist-api enable you to operate your wunderlist resources easily with Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Certificate verify failed

krystofspl opened this issue · comments

Hello,
I've been using this gem for a project and recently there has been a problem with most methods. There seems to be a problem with certificate validation.
Code from irb instance:

wl = Wunderlist::API.new({:access_token => '...', :client_id => '...'})
wl.tasks('...list-name...')

The output:

Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:920:in `connect'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:920:in `block in connect'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/timeout.rb:67:in `timeout'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:920:in `connect'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:852:in `start'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:1369:in `request'
    from /home/krystof/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:1128:in `get'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:80:in `perform_request'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in `call'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `get'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/wunderlist-api-1.0.0/lib/wunderlist/api.rb:134:in `get'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/wunderlist-api-1.0.0/lib/wunderlist/api.rb:125:in `request'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/wunderlist-api-1.0.0/lib/wunderlist/api.rb:49:in `lists'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/wunderlist-api-1.0.0/lib/wunderlist/api.rb:202:in `get_list_ids'
    from /home/krystof/.rvm/gems/ruby-2.1.0/gems/wunderlist-api-1.0.0/lib/wunderlist/api.rb:73:in `tasks'
    from (irb):10

Hi, krystofspl.
I'm sorry for my slow reply...

I think this problem is not in wunderlist-api but in openssl, so that please run brew update and then brew upgrade openssl.

I am running the app on (manjaro) linux localhost with the newest version of openssl, as well as on heroku, the problem is the same on both machines, which leads me to think that the problem lies within the gem.

I'm pretty sure there isn't anything the gem could be doing to cause this error. Double check that it isn't still happening? It could also be that Wunderlist changed their https certificate around the time you were having problems.