Bad cast in jruby-openssl X509Utils
-----------------------------------

                 Key: JRUBY-2992
                 URL: http://jira.codehaus.org/browse/JRUBY-2992
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
            Reporter: Charles Oliver Nutter


There appears to be a bad cast in the jruby-openssl code. A bug was reported 
that resulted in the following traces:

{noformat}
org.jruby.ext.openssl.impl.PKCS7Exception: PKCS7[Method: 117, Reason: 117]
org.jruby.ext.openssl.impl.PKCS7Exception: PKCS7[Method: 117, Reason: 117]
        at org.jruby.ext.openssl.impl.PKCS7.verify(PKCS7.java:353)
        at org.jruby.ext.openssl.PKCS7.verify(PKCS7.java:486)
        at 
org.jruby.ext.openssl.PKCS7$i_method_0_0$RUBYINVOKER$verify.call(org/jruby/ext/openssl/PKCS7$i_method_0_0$RUBYINVOKER$verify.gen)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:120)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:292)
...
Caused by: java.lang.ClassCastException: org.bouncycastle.asn1.DERSequence
        at 
org.jruby.ext.openssl.x509store.X509Utils.checkIfIssuedBy(X509Utils.java:253)
        at 
org.jruby.ext.openssl.x509store.StoreContext$4.call(StoreContext.java:1100)
        at 
org.jruby.ext.openssl.x509store.StoreContext.verifyCertificate(StoreContext.java:666)
        at org.jruby.ext.openssl.impl.PKCS7.verify(PKCS7.java:341)
{noformat}

It appears that at this line a cast is made to X509Name, but what's actually 
coming out is a DERSequence.

This is a showstopper for a user, because it breaks HTTPClient and as a result 
they are unable to deploy their application.

-- 
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