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

Root certificates? #148

Closed
mcandre opened this issue Jan 31, 2013 · 2 comments
Closed

Root certificates? #148

mcandre opened this issue Jan 31, 2013 · 2 comments

Comments

@mcandre
Copy link

mcandre commented Jan 31, 2013

When I try to use github_api, I get Faraday errors for SSL certificates.

    irb(main):006:0> org_members = m.list(credentials["org_name"])
    Faraday::Error::ConnectionFailed: SSL_connect returned=1 errno=0 state=SSLv3 rea
    d server certificate B: certificate verify failed
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'
            from c:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
            from c:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in `start'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:in `request'
            from c:/Ruby193/lib/ruby/1.9.1/net/http.rb:1026:in `get'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/adapt
    er/net_http.rb:72:in `perform_request'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/adapt
    er/net_http.rb:37:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/respo
    nse.rb:8:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/respo
    nse.rb:8:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/respo
    nse.rb:8:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/respo
    nse.rb:8:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/github_api-0.8.9/lib/github_api
    /request/oauth2.rb:24:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/reque
    st/url_encoded.rb:14:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/reque
    st/multipart.rb:13:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/github_api-0.8.9/lib/github_api
    /request/jsonize.rb:18:in `call'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/conne
    ction.rb:226:in `run_request'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.8.4/lib/faraday/conne
    ction.rb:87:in `get'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/github_api-0.8.9/lib/github_api
    /request.rb:41:in `request'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/github_api-0.8.9/lib/github_api
    /request.rb:11:in `get_request'
            from c:/Ruby193/lib/ruby/gems/1.9.1/gems/github_api-0.8.9/lib/github_api
    /orgs/members.rb:34:in `list'
    irb(main):008:0>

The online guides for this error are all geared towards non-RubyInstaller users. I'd like to continue using RubyInstaller, so I'm at a loss.

Where can a RubyInstaller user drop a root certificate so that Ruby knows how to begin resolving certificate chains?

$ specs ruby os
Specs:

specs 0.2
https://github.com/mcandre/specs#readme

gem --version
1.8.24

ruby --version
ruby 1.9.3p374 (2013-01-15) [i386-mingw32]

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows XP Professional
OS Version:                5.1.2600 Service Pack 3 Build 2600
@mcandre
Copy link
Author

mcandre commented Jan 31, 2013

I was finally able to get Ruby to learn a root certificate:

    $ wget http://curl.haxx.se/ca/cacert.pem
    $ cp cacert.pem /c/Ruby193/
    $ export SSL_CERT_FILE=/c/Ruby193/cacert.pem

I used Git Bash. For Command Prompt, setting SSL_CERT_FILE via System Properties -> ... -> Environment Variables does the job.

Could the next RubyInstaller please setup the root cert by default?

@luislavena
Copy link
Member

Hello,

We don't bundle SSL certs because that is not our job. This was discussed at some point in the mailing list.

Is not our fault that OpenSSL do not use Windows certificate store.

PS: The issue tracker is for actual bugs. if you had questions please use the mailing list: http://groups.google.com/group/rubyinstaller/

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