users@glassfish.java.net

Copy private key and certificate

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 Aug 2008 02:49:54 PDT

I am going to move our application server (SJAS9.1) to a new host and need to move/copy the SSL certificate and the private key. I have tried exporting it from mthe cert8.db using the pk12util utility. Then I import it in the new server using the same utility.
When listing the certficates using certutil everything looks fine. But when restarting the server the start fails with an exception (see the end of the post):
The same results occur of I copy the whole cert8.db and key3.db files.

Does anybody know what the problem is and how to solve it?


Exception:
[#|2008-08-07T10:49:32.984+0200|SEVERE|sun-appserver9.1|javax.enterprise.system.
core.security|_ThreadID=10;_ThreadName=main;_RequestID=7351dd65-f55c-43e0-8cd9-7
83f5cbcad59;|SEC8001: Exception in initializing SunPKCS11.
java.security.ProviderException: Library ./nssckbi.dll does not exist
        at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:109)
        at com.sun.enterprise.ee.security.EESecuritySupportImpl.loadSunPKCS11Sto
res(EESecuritySupportImpl.java:245)
        at com.sun.enterprise.ee.security.EESecuritySupportImpl.initNSS(EESecuri
tySupportImpl.java:153)
        at com.sun.enterprise.ee.security.EESecuritySupportImpl.<init>(EESecurit
ySupportImpl.java:95)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[Message sent by forum member 'mikbee' (mikbee)]

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