pki-pkcs12(1)
π pki-pkcs12(1) β PKI PKCS #12 Management Commands
okay bestie, sit down, because this is the pki-pkcs12 page from the PKI manual and it's literally your whole cheat sheet for wrangling certs and keys inside a PKCS #12 file. π
β¨ NAME β¨
pki-pkcs12 β the command-line interface for managing certificates and keys in a PKCS #12 file. that's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
pki [CLI-options] pkcs12
pki [CLI-options] pkcs12-export [command-options]
pki [CLI-options] pkcs12-import [command-options]
pki [CLI-options] pkcs12-cert [command-options]
pki [CLI-options] pkcs12-key [command-options]
π DESCRIPTION π
so the pki pkcs12 commands give you command-line interfaces to manage certificates and keys in a PKCS #12 file. that's the whole assignment, and they ate. π
pki [CLI-options] pkcs12-export [command-options]β this one exports all certificates and keys from an NSS database into a PKCS #12 file. packing up and moving out π§³pki [CLI-options] pkcs12-import [command-options]β this one imports all certificates and keys from a PKCS #12 file into an NSS database. unpacking szn π¦pki [CLI-options] pkcs12-cert [command-options]β this one manages individual certificates in a PKCS #12 file. seepki-pkcs12-cert(1)for the deets.pki [CLI-options] pkcs12-key [command-options]β this one imports individual keys in a PKCS #12 file. seepki-pkcs12-key(1). π
β OPTIONS β
the CLI options are described in pki(1) β go read that one, bestie, it's giving main character energy too.
π¦ OPERATIONS π¦
to see what PKCS #12 commands you actually have, just type pki pkcs12. and to see each command's usage, type pki pkcs12-<command> --help. like pki pkcs12-export --help, iykyk π
all pki pkcs12 commands require a PKCS #12 file and its password. here's the tea:
- the PKCS #12 file goes in with the
--pkcs12-fileparameter. - the password can be given either directly with the
--pkcs12-passwordparameter, or in a file with the--pkcs12-password-fileparameter.
some pki pkcs12 commands also need an NSS database and its password:
- the NSS database location goes with the
-dparameter (default:~/.dogtag/nssdb). - the NSS database password goes with the
-cor the-Cparameter.
π Exporting all certificates and keys into a PKCS #12 file
to export all certificates and keys from an NSS database into a PKCS #12 file:
$ pki <NSS database location> <NSS database password> pkcs12-export \
<PKCS #12 file> <PKCS #12 password> [nicknames...]
- by default the command exports all certificates in the NSS database. if you only want certain ones, pass the certificate nicknames as separate arguments. π
- by default the command always creates a new PKCS #12 file. to export into an existing PKCS #12 file, specify the
--appendparameter. no cap, that's how you don't nuke your old file. - by default the command includes the certificate chain. to export without the certificate chain, specify the
--no-chainparameter. - by default the command includes the key of each certificate. to export without the key, specify the
--no-keyparameter. - by default the command includes the trust flags of each certificate. to export without the trust flags, specify the
--no-trust-flagsparameter.
π Importing certificates and keys from a PKCS #12 file
to import certificates and keys from a PKCS #12 file into an NSS database:
$ pki <NSS database location> <NSS database password> pkcs12-import \
<PKCS #12 file> <PKCS #12 password>
- by default the command includes all certificates in the PKCS #12 file. to import without the CA certificates (aka the certificates without keys), specify the
--no-ca-certsparameter. to import without the user certificates (aka the certificates with keys), specify the--no-user-certsparameter. π§ - by default the command skips a certificate if it already exists in the NSS database. to overwrite the nickname, the key, and the trust flags of existing certificates, specify the
--overwriteparameter. this one is a little spicy, so know what you're doing π₯ - by default the command includes the trust flags of each certificate. to import without the trust flags, specify the
--no-trust-flagsparameter.
π SEE ALSO π
pki-pkcs12-cert(1), pki-pkcs12-key(1)
π AUTHORS π
Endi S. Dewata <edewata@redhat.com>.
π COPYRIGHT π
Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). a copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
and that's the whole page, bestie π«Ά this one's from PKI, dated Oct 28, 2016 β mwah, go export something iconic β¨π
π¦ where this page comes from
- centos-stream 9: idm-pki-tools 11.7.1-1.el9 Β· GPL-2.0-only AND LGPL-2.0-only
- centos-stream 9: pki-tools 11.2.0-0.2.beta1.el9 Β· GPLv2 and LGPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms