Importing existing key/certificate into NSS (PKCS#11) database

Solution In Progress - Updated -

Environment

Issue

  • Issues importing keystore certificate into PKCS11
  • Importing existing PKCS#12 keystore into my Mozilla Network Security Services (NSS) database

Resolution

You can import your existing PKCS#12 keystore into an Network Security Services (NSS) database for PKCS#11 with:

pk12util -d <NSS database path> -i <PKCS#12 keystore>

If you need to convert your JKS keystore to PKCS#12 you can do that with:

keytool -importkeystore -srckeystore <JKS keystore> -destkeystore <new PKCS#12 filename> -srcstoretype JKS -deststoretype PKCS12 -srcstorepass <password> -deststorepass <password> srcalias <alias> -destalias <alias> -srckeypass <password> -destkeypass <password> -noprompt

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.