Trying to get quick_cert working with JRuby 1.4. The following code
bombs out
keypair = OpenSSL::PKey::RSA.new(1024)
if new_certificate_opts[:password].nil? then
File.open @keypair_file, "w", 0400 do |f| # 0400 = 000 100 000
000 owner read only ??
f << keypair.to_pem
end
else
passwd_cb = proc do
new_certificate_opts[:password]
end
cipher = OpenSSL::Cipher::DES.new(:EDE3, :CBC)
keypair_export = keypair.export(cipher,
new_certificate_opts[:password]) <<<< fails on this line
------error-------------------------------------------------------------
org/jruby/ext/openssl/x509store/PEMInputOutput.java:730:in
writeRSAPrivateKey': java.io.IOException: unknown algorithm in write_DSAPrivateKey (NativeException) from org/jruby/ext/openssl/PKeyRSA.java:418:inexport’
from sun/reflect/NativeMethodAccessorImpl.java:-2:in invoke0' from sun/reflect/NativeMethodAccessorImpl.java:39:ininvoke’
from sun/reflect/DelegatingMethodAccessorImpl.java:25:in
invoke' from java/lang/reflect/Method.java:597:ininvoke’
from
org/jruby/internal/runtime/methods/ReflectedJavaMethod.java:145:in
call' from org/jruby/internal/runtime/methods/DynamicMethod.java:188:incall’
from
org/jruby/internal/runtime/methods/DynamicMethod.java:184:in `call’
Anyone able to offer any advice?
Thanks
Paul F Fraser
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
