OpenSSL::X509::Store#add_file method doesnt work with a file URL.
-----------------------------------------------------------------

                 Key: JRUBY-3980
                 URL: http://jira.codehaus.org/browse/JRUBY-3980
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
    Affects Versions: JRuby-OpenSSL 0.5.1
         Environment: Windows 7, jruby-openssl 0.5.1, jruby 1.3.1 (ruby 
1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) Client VM 1.
6.0_15) [x86-java]
            Reporter: Brian Wallace


Bear with me , as I'm still a JRuby newbie -- and this will be the first 
(possible) bug I've ever logged on a public site.

I've been attempting to get my soap4r 1.5.8+http-client 2.1.5.2  script to work 
from within a JAR while accessing an SSL protected web-service.. But I've hit a 
roadblock.

http-client will read in the "cacert.p7s" file from 
...\gems\httpclient-2.1.5.2\lib\httpclient\  when verifying the SSL 
certificate. I copied the soap4r/httpclient gems into the jruby-complete.jar 
here: 
jruby-complete.jar!\META-INF\jruby.home\lib\ruby\gems\1.8\gems\httpclient-2.1.5.2.
 Everything appears to work except for when the ssl_config.rb runs the 
set_trust_ca method to add the cacerts.p7s file to the X509 store.

I've tested in IRB and found that the OpenSSL::X509::Store#add_file method 
won't work with a file URL, which as you know is used for any files that reside 
inside of a jar.

I would provide a patch/test if I were capable. But i'm still very new to this 
... Some day I hope to help out with this project, since I now dream JRuby code 
and have become addicted to this language!

This is the complete stack-trace:

file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dist/lib/jruby-c
omplete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/h
ttpclient/ssl_config.rb:149:in `set_trust_ca': file not found: file:\C:\Users\
dev\Documents\NetBeansProjects\Java and Ruby\dist\lib\jruby-complete.jar!\META
-INF\jruby.home\lib\ruby\gems\1.8\gems\httpclient-2.1.5.2\lib\httpclient\cacert.
p7s (The filename, directory name, or volume label syntax is incorrect) (OpenSSL
::X509::StoreError)
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-
2.1.5.2/lib/httpclient/ssl_config.rb:353:in `load_cacerts'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-
2.1.5.2/lib/httpclient/ssl_config.rb:342:in `each'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-
2.1.5.2/lib/httpclient/ssl_config.rb:342:in `load_cacerts'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-
2.1.5.2/lib/httpclient/ssl_config.rb:85:in `initialize'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/httpclient-
2.1.5.2/lib/httpclient.rb:353:in `initialize'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/soap4r-1.5.
8/lib/wsdl/xmlSchema/importer.rb:66:in `fetch'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/soap4r-1.5.
8/lib/wsdl/xmlSchema/importer.rb:36:in `import'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/soap4r-1.5.
8/lib/wsdl/importer.rb:18:in `import'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/soap4r-1.5.
8/lib/soap/wsdlDriver.rb:146:in `import'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/lib/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/soap4r-1.5.
8/lib/soap/wsdlDriver.rb:32:in `initialize'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/Java_and_Ruby.jar!/scripts/ap.rb:58:in `get_wsdl'
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/Java_and_Ruby.jar!/scripts/ap.rb:331
        from file:/C:/Users/dev/Documents/NetBeansProjects/Java and Ruby/dis
t/Java_and_Ruby.jar!/scripts/ap.rb:1:in `require'
        from -e:1


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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