Sun Microsystems GLASSFISH ENTERPRISE 820433510 User Manual

Page 118

Advertising
background image

Import an RFC text-formatted certificate into an NSS certificate database.

certutil -A -a -n ${cert.nickname} -t ${cert.trust.options}

-f ${pass.file} -i ${cert.rfc.file}

-d ${admin.domain.dir}/${admin.domain}/config

Export a certificate from an NSS certificate database in RFC format.

certutil -L -a -n ${cert.nickname} -f ${pass.file}

-d ${admin.domain.dir}/${admin.domain}/config > cert.rfc

Delete a certificate from an NSS certificate database.

certutil -D -n ${cert.nickname} -f ${pass.file}

-d ${admin.domain.dir}/${admin.domain}/config

Move a certificate from an NSS database to JKS format

certutil -L -a -n ${cert.nickname}

-d ${admin.domain.dir}/${admin.domain}/config > cert.rfc

keytool

-import -noprompt -trustcacerts -keystore ${keystore.file}

-storepass ${keystore.pass} -alias ${cert.alias} -file cert.rfc

Importing and Exporting Certificates Using the
pk12util

Utility

The command-line utility used to import and export keys and certificates between the
certificate/key databases and files in PKCS12 format is pk12util. PKCS12 is Public-Key
Cryptography Standards (PKCS) #12, Personal Information Exchange Syntax Standard. More
description of the pk12util utility can be read at

http://www.mozilla.org/projects/security/pki/nss/tools/pk12util.html

.

Import a PKCS12-formatted certificate into an NSS certificate database.

pk12util -i ${cert.pkcs12.file} -k ${certdb.pass.file}

-w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config

Import a PKCS12-formatted certificate into an NSS certificate database token module.

pk12util -i ${cert.pkcs12.file} -h ${token.name} -k ${certdb.pass.file}

-w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config

Export a certificate from an NSS certificate database in PKCS12 format.

pk12util -o -n ${cert.nickname} -k ${pass.file} -w${cert.pass.file}

-d ${admin.domain.dir}/${admin.domain}/config

Export a certificate from an NSS certificate database token module in PKCS12 format
(useful for hardware accelerator configuration).

Using Network Security Services (NSS) Tools

Sun GlassFish Enterprise Server 2.1 Administration Guide • December 2008

118

Advertising