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                      modssl-users@modssl.org
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to