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
Cannot make HTTPS connections on Windows (works on OSX and Linux) #324
Comments
Download newset certs (cacert.pem) from here: https://curl.haxx.se/docs/caextract.html Set enviroment variable to the full path location of the downloaded file. Eg:
To make it permanent, set SSL_CERT_FILE in "Advanced System Settings" |
@dmajkic I've seen those instructions before. My issue is, why do we need to do that ourselves? Is there a reason why the default installation is faulty? |
@duncanmak Ruby is using OpenSSL for securing sockets. It's a third party solution, and Ruby expects that OpenSSL part is working. That is the "download certificates and set enviroment variable" part. That step is to setup OpenSSL to work on Windows. Not Ruby. On Linux, where OpenSSL is system managed solution, this maintenance is done by system itself (cert locations, apt updating to newer version of root certs). On Windows - you must maintain it manually. |
@duncanmak Unfortunately @dmajkic is correct. This has been discussed before on how to handle this automatically, but the decision was basically, A) Don't override Environment Variables that would allow this to work because it might cause conflicts with other versions of OpenSSL, B) Don't patch it because it would change the behavior of the library. So, the result is to handle it ourselves. =/ That being said many libraries ship with CA certificates, including rubygems. If there is a particular problem you're trying to solve we would be glad to help but I don't have a built-in solution for the current inconvenience. |
Didn't work for me. |
Didn't work for me either |
Consider moving to oneclick/rubyinstaller2 which is in active development and addressees this issue. |
@dmajkic unfortunately rubyinstaller2 is too modern for my Windows Server 2008 R2 installation. My setup: |
Do you know if it's an issue with RubyInstaller2 or Ruby 2.4? Would Ruby 2.3.x work? |
will check and report back |
rubyinstaller2 works just fine on my Windows Server 2008 R2 installations. What problem did you experience? |
On Mac and Linux, this works out of the box:
On Windows, however, this error shows up:
We have tried RubyInstaller 2.2.4-x64 as well as older releases, and we see the same error regardless.
The error is similar to the one in the issue involving RubyGems discussed here a year ago, but that has since been fixed (See #261). I can verify that
gem install <gem>
works on WIndows for me without problems.Outside of
gem
, however, I still see a similar error when I try to open SSL connections, i.e. the snippet above.Is there a reason why the one-liner for
GET
an HTTPS resource fails in the default installation on Windows?cc @MSylvia, @Azolo
The text was updated successfully, but these errors were encountered: