OpenSSL Encrypted RSA pem fails on encryption and decryption. Incompatible
with CRuby.
---------------------------------------------------------------------------------------
Key: JRUBY-6044
URL: https://jira.codehaus.org/browse/JRUBY-6044
Project: JRuby
Issue Type: Bug
Components: OpenSSL
Affects Versions: JRuby 1.6.4
Environment: Win32, Java6 and Java7, JCE Unlimited Strength enabled
Reporter: Mark Baran
Priority: Minor
Fix For: JRuby 1.x+
Loading and creating RSA keys from JRuby OpenSSL fails on encrypted RSA pem
with password. Works in CRuby.
Examples:
## Saving Encrypted PEM
pkeys = OpenSSL::PKey::RSA.generate(1024)
cipher = OpenSSL::Cipher::Cipher.new('aes-256-cbc')
pem = pkeys.to_pem(cipher, 'secretpassword') # Fails with
OpenSSL::PKey::RSAError: unknown algorithm `aes/cbc/PKCS5Padding' in
write_DSAPrivateKey
## Reading Encrypted PEM
## pemstring loaded from previously created file)
OpenSSL::Pkey::RSA.new(pemstring, 'secretpassword') # Fails with not pub/priv
key error. Works in CRuby.
--
This message is automatically generated by JIRA.
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