Issue Type: Bug Bug
Affects Versions: JRuby-OSSL 0.7.7
Assignee: Unassigned
Components: OpenSSL
Created: 09/Jun/12 10:07 AM
Description:

Our application uses the OmniAuth gem, which uses the Faraday gem, which uses Net::HTTP.
We run it from JRuby, and use it to talk HTTPS to a server that has a GoDaddy signed cert.
So we end up using which jruby-openssl.
We use the SSL_CERT_DIR to point to the SSL certificates directory, where there is a GoDaddy cert.
On Linux, this works fine.
On Windows (with the ssl certificate directory copied from Linux), this fails with a "certificate verify failed" error.

Test-case code looks like:

ENV['SSL_CERT_DIR']='c:\ssl\certs'
require 'rubygems'
require 'faraday'
response = Faraday.get 'https://www.godaddy.com/'

which results in this error:

OpenSSL::SSL::SSLError: certificate verify failed

The problem is on Lookup.java#L558 where the code constructs a path using a hardcoded slash; the code then tries to lookup "c:\ssl\certs/219d9499.0" which doesn't exist.

The simplest fix is to use the platform-dependent path-separator character instead of the slash, like this patch; I've confirmed that resolves the problem on Windows.

Better yet, instead of handcrafting paths, let Java do that with File.

Environment: Windows 7, JRuby 1.6.3
Project: JRuby
Priority: Major Major
Reporter: Martijn Koster
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to