Problems parsing certificates with non RSA-DSA keys
---------------------------------------------------

                 Key: JRUBY-3920
                 URL: http://jira.codehaus.org/browse/JRUBY-3920
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
    Affects Versions: JRuby-OpenSSL 0.5.1
         Environment: jruby 1.1.6 linux jvm 1.6 jrockit
            Reporter: Dave Garcia
         Attachments: provided-patch.zip

Trying to parse certificates using EC based keys fails. The method halts 
because an "The algorithm EC is unsupported for public keys 
(OpenSSL::X509::CertificateError)" exception. 

This exception is fine and quite equivalent to the behavior on ruby using 
native openssl, but the problem is when this exception is raised. 
On ruby with openssl the exception raises when the public_key method from 
certificate is requested so the rest of the methods are not affected. On jruby 
this is done on parsing time so no operations like checking issuer, subject or 
processing extensions could be done.

Mi proposal is to delay this exception raising to the first call of the 
public_key method. This way the behavior would be the same exposed by ruby's 
native openssl.

I provide a patch with a possible fixing and a certificate with EC public keys 
and one test case that could be run both on ruby and jruby to check the 
equivalence.

Hope it helps :), best regards

Dave

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