Em 09-01-2013 16:53, Carl Bourne escreveu:
Hi I'm trying to create a Java Store Key Store using the following code:
entityStore2 = KeyStore.getInstance("JKS")
entityStore2.load(nil, nil)
puts entityStore2.methods
entityStore2.setKeyEntry("Test", privatekey.getPrivate,
String.new("password").to_java.toCharArray, t.getChain)
However, I keep hitting the same NameError whenever I call
the setKeyEntry method:
NameError: no method 'setKeyEntry' for arguments
(org.jruby.RubyString,org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey,org.jruby.java.proxies.ArrayJavaProxy,org.jruby.RubyArray)
on Java::JavaSecurity::KeyStore
entityStore2.setKeyEntry("Test", privatekey.getPrivate,
"password".to_java.toCharArray,
t.getChain.to_java(java.security.cert.Certificate))
hint: I'm not sure what privatekey is, but maybe privatekey.private will
work the same as privatekey.getPrivate on the line above.