users@glassfish.java.net

Re: Proper SSL Implentation

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Oct 2007 23:53:51 PDT

Hi zambizzi ,

 Sorry to hear that... But the problems you faced were all due the fact that Keytool in JDK5 did not have an easy way to import a Pair (i.e create an Entry type: keyEntry). So when you were using keytool to export and import from : myks.keystore, what was getting exported and imported was only the certificate and not the private key.

 if you had done a listing of your keystore after the export and import you would see

Alias name: mykeyalias
Creation date: May 25, 2006
Entry type: trustedCertEntry

As Opposed to

Alias name: mykeyalias
Creation date: May 25, 2006
Entry type: keyEntry

And that IMO was the root cause of the error :

java.io.IOException: Alias name mykeyalias does not identify a key entry

 
JDK6 Keytool provides a richer set of options and specifically you can import your entire keystore myks.keystore into another keystore (the GF keystore.jks) using the command

 keytool -importkeystore command.

Thanks.
[Message sent by forum member 'kumarjayanti' (kumarjayanti)]

http://forums.java.net/jive/thread.jspa?messageID=241817