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 If I call "methods" against the entityStore object it returns the following list of methods. Any pointers would be really helpful! aliases getCertificateChain setKeyEntry key_entry set_certificate_entry set_key_entry setCertificateEntry certificate_entry get_entry entry_instance_of get_key entry_instance_of? get_certificate_alias getKey certificate_entry? store is_certificate_entry deleteEntry getEntry delete_entry contains_alias certificateEntry __jcreate! == __jsend! get_certificate getCreationDate get_creation_date provider get_certificate_chain setEntry type is_certificate_entry? get_provider keyEntry is_key_entry? get_type set_entry getType equals getProvider isCertificateEntry contains_alias? load entryInstanceOf isKeyEntry is_key_entry key_entry? containsAlias size getCertificate getCertificateAlias get_class notifyAll notify toString notify_all clone finalize to_string hash_code getClass wait hashCode equals? initialize java_send equal? marshal_dump marshal_load java_method synchronized to_s java_class java_object= java_object to_java_object hash inspect eql? handle_different_imports psych_to_yaml include_class to_yaml java_kind_of? to_yaml_properties java_signature methods define_singleton_method initialize_clone freeze extend nil? tainted? method is_a? instance_variable_defined? instance_variable_get singleton_class instance_variable_set public_method display send private_methods enum_for com to_java public_send instance_of? taint class java_annotation instance_variables !~ org untrust =~ protected_methods trust java_implements tap frozen? initialize_dup java respond_to? === java_package untaint respond_to_missing? java_name to_enum singleton_methods untrusted? <=> kind_of? dup java_require javax public_methods instance_exec __send__ instance_eval object_id __id__ ! != Best Regards, Carl