users@glassfish.java.net

Re: Migrate SSL App from Apache to GlassFish v3

From: <glassfish_at_javadesktop.org>
Date: Mon, 28 Dec 2009 00:26:42 PST

You can use the same cert. For glassfish you will need to use JDK Keytool to import. Keytool in JDK 6 has the facility to import a keystore.

Alternatively if the KeyPair you have is stored as a PKCS12 file then you can use pkcs12import (pkcs12import.zip)

https://xwss.dev.java.net/servlets/ProjectDocumentList?folderID=6645&expandFolder=6645&folderID=0

java -classpath ./pkcs12import.jar com.sun.xml.wss.tools.PKCS12Import -keystore <glassfish-keystore-file> -alias s1as -file <pkcs12-file> -pass <pkcs12-password> -storepass <glassfish-keystore-password>

it would prompt for key password just hit <return> key so it would use the same password as the storepass

Since the alias s1as already exists you may have to delete the original glassfish s1as alias before running pkcs12import (you can first try it out without deleting).

For https hostname-verification you will have to ensure that the CN of the certificate matches the FQDN of your system.
[Message sent by forum member 'kumarjayanti' (vbkumar.jayanti_at_sun.com)]

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