Importan RFC text-formatted certicate into an NSS certicate 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
Exporta certicate from an NSS certicate database in RFC format.
certutil -L -a -n ${cert.nickname} -f ${pass.file}
-d ${admin.domain.dir}/${admin.domain}/config > cert.rfc
Deletea certicate from an NSS certicate database.
certutil -D -n ${cert.nickname} -f ${pass.file}
-d ${admin.domain.dir}/${admin.domain}/config
Movea certicate 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 Certicates Using thepk12util Utility
Thecommand-line utility used to import and export keys and certicates between the
certicate/keydatabases and les in PKCS12 format is pk12util. PKCS12 is Public-Key
CryptographyStandards (PKCS) #12, Personal Information Exchange Syntax Standard. More
descriptionof the pk12util utility can be read at
http://www.mozilla.org/projects/security/pki/nss/tools/pk12util.html.
Importa PKCS12-formatted certicate into an NSS certicate database.
pk12util -i ${cert.pkcs12.file} -k ${certdb.pass.file}
-w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config
Importa PKCS12-formatted certicate into an NSS certicate 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
Exporta certicate from an NSS certicate database in PKCS12 format.
pk12util -o -n ${cert.nickname} -k ${pass.file} -w${cert.pass.file}
-d ${admin.domain.dir}/${admin.domain}/config
Exporta certicate from an NSS certicate database token module in PKCS12 format
(usefulfor hardware accelerator conguration).
UsingNetworkSecurit y Services (NSS)Tools
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 2008118