@bob…
hi, many thanks 4 your response…
I’m not using Paypal gem, I just run this 2 lines of code (code from
http://asciicasts.com/episodes/141):
signed =
OpenSSL::PKCS7::sign(OpenSSL::X509::Certificate.new(APP_CERT_PEM),
OpenSSL::PKey::RSA.new(APP_KEY_PEM, ‘’), values.map { |k, v| “#{k}=#{v}”
}.join(“\n”), [], OpenSSL::PKCS7::BINARY)
OpenSSL::PKCS7::encrypt([OpenSSL::X509::Certificate.new(PAYPAL_CERT_PEM)],
signed.to_der, OpenSSL::Cipher::Cipher::new(“DES3”),
OpenSSL::PKCS7::BINARY).to_s.gsub(“\n”, “”)
The above code works under ruby MRI but not under JRuby 1.4.0 with
jruby_openssl 0.6 gem.
Calling OpenSSL::Cipher::Cipher::new(“DES3”) I receive the following
error:
LoadError: unsupported cipher algorithm (DES3/CBC/PKCS5Padding)
If I open the gem source (lib/openssl/cipher.rb) I can see that
supported algorithms are: AES CAST5 BF DES IDEA RC2 RC4 RC5
==============================================
VERY SIMPLE TEST:
Under ruby MRI:
irb
require “openssl”
=> true
OpenSSL::Cipher::Cipher::new(“DES3”)
=> #OpenSSL::Cipher::Cipher:0xb7ca5f8c
Under JRuby 1.4.0 with jruby_openssl 0.6 (under torquebox beta 18):
jirb
require “openssl”
=> true
OpenSSL::Cipher::Cipher::new(“DES3”)
LoadError: unsupported cipher algorithm (DES3/CBC/PKCS5Padding)
from (irb):3
I cannot undertand how can I encrypt Paypal messages using DES3 cipher
algorithm under JRuby / jruby_openssl gem…
Many thanks…
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email