HMAC.new with digest name raises an Exception
---------------------------------------------

                 Key: JRUBY-5024
                 URL: http://jira.codehaus.org/browse/JRUBY-5024
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
    Affects Versions: JRuby-OpenSSL 0.7
         Environment: any
            Reporter: Hiroshi Nakamura
            Assignee: Hiroshi Nakamura


HMAC.new(msg, "SHA1") raises an exception.  Should work as well as 
HMAC.new(msg, Digest::SHA1.new).
{noformat}
% jruby -ropenssl -e 'OpenSSL::HMAC.new("hello", "SHA1")'
HMAC.java:111:in `initialize': java.lang.ClassCastException: 
org.jruby.RubyString cannot be cast to org.jruby.ext.openssl.Digest
        from 
org/jruby/ext/openssl/HMAC$i_method_2_0$RUBYINVOKER$initialize.gen:65535:in 
`call'
        from JavaMethod.java:781:in `call'
        from CachingCallSite.java:339:in `cacheAndCall'
        from CachingCallSite.java:197:in `callBlock'
        from CachingCallSite.java:202:in `call'
        from RubyClass.java:815:in `call'
        from DynamicMethod.java:194:in `call'
        from CachingCallSite.java:329:in `cacheAndCall'
        from CachingCallSite.java:188:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:685:in `runScript'
        from Ruby.java:568:in `runNormally'
        from Ruby.java:414:in `runFromMain'
        from Main.java:286:in `run'
        from Main.java:128:in `run'
        from Main.java:97:in `main'
{noformat}

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