Re: Migrating cert from Sun Web Server

SB <[email protected]>
Newsgroups gmane.comp.apache.mod-ssl.user
Message-ID <[email protected]>
On 8/9/05, Phil Ehrens <[email protected]> wrote:

> Look here (search for pk12util):
> 
> http://docs.sun.com/source/816-5682-10/esecurty.htm

Thanks! I actually found it on the Sun Forum too. Apparently it's
kinda tricky to use so here's the process...

# export LD_LIBRARY_PATH=<serverroot>/bin/https/lib
# cd <serverroot>/alias
# ../bin/https/admin/bin/pk12util -o export.pkcs12 -n Server-Cert -d .
-P "https-hostname-hostname-"
Enter Password or Pin for "NSS Certificate DB":
Enter password for PKCS12 file: 
Re-enter password: 
pk12util: PKCS12 EXPORT SUCCESSFUL
# ls -tlra export.pkcs12
-rw-------   1 root     root        3372 Aug  9 12:16 export.pkcs12
#

Then you can extract either the key or the cert...

# openssl pkcs12 -info -in export.pkcs12 
Enter Import Password:
...
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email protected]
Automated List Manager                            [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.