Ryosuke Yamazaki created JRUBY-6558: ---------------------------------------
Summary: OpenSSL::Cipher::DES#update throws "OpenSSL::Cipher::CipherError: Wrong key size" Key: JRUBY-6558 URL: https://jira.codehaus.org/browse/JRUBY-6558 Project: JRuby Issue Type: Bug Components: OpenSSL Affects Versions: JRuby 1.6.7 Reporter: Ryosuke Yamazaki Priority: Minor When I try to call OpenSSL::Cipher::DES#update on JRuby 1.6.7 with jruby-openssl 0.7.6.1, it raised "OpenSSL::Cipher::CipherError: Wrong key size". Here's a simple script to reproduce it: {code:title=example.rb} require 'openssl' a = OpenSSL::Cipher::DES.new("EDE3") # not "EDE3-CBC" a.padding = 0 a.key = "a" * a.key_len p a.update("a" * a.block_size) {code} Output of this script is: {code:title=output} % ruby -v example.rb jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] OpenSSL::Cipher::CipherError: Wrong key size update at org/jruby/ext/openssl/Cipher.java:675 (root) at example.rb:6 {code} CRuby worked correctly: {code:title=output of CRuby} % ruby -v example.rb ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-darwin11.3.0] "\xF7\xE4X\xFAp\x81\xBE}" {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.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