On 7 December 2011 00:17, gs84 wrote:
Thank you fro your help.

I ve used the :: unless of . and it seem to work so i have the
following lines now:

password = JString.new("changeit")
ks = KeyStore.getInstance("JKS")
ks.load(FileInputStream.new("keys/keystoreCps.jks"),
password.toCharArray())
keyEntry = ks.getEntry("mykey",
KeyStore::PasswordProtection.new(password.toCharArray()))
cert = keyEntry.getCertificate

Then i am now getting the following error for the last line:
"NoMethodError: undefined method `getCertificate' for nil:NilClass"
That means that keyEntry is nil, so presumably your getEntry call failed.
Then i tried
cert = X509Certificate.new
cert = keyEntry.getCertificate
Then i am getting the following error:" TypeError: no public
constructors for Java::JavaSecurityCert::X509Certificate"
Well that error is pretty self explanatory. But that line is not
achieving anything anyway as you are immediately overwriting cert with
something else.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 7 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 6, '11 at 3:12p
activeDec 7, '11 at 1:44p
posts7
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Gs84: 4 posts Colin Law: 3 posts

People

Translate

site design / logo © 2022 Grokbase