PKICertImport(1)
π PKICertImport π
okay so bestie, welcome to PKICertImport β the PKI certificate import tool that's literally here to safely validate and import your certificates into the NSS database. no cap, it's giving "trust but verify" main character energy. π
β¨ NAME β¨
PKICertImport β used to safely validate and import certificates into the NSS database. periodt. π
πΈ SYNOPSIS πΈ
PKICertImport -d NSS-database -i certificate -n nickname -t trust -u usage [-h token] [-f password-file] [-a]
Validate and import a certificate into the specified NSS database. It verifies signature, trust chain, trust, and usage flags. If a certificate is not valid, it will not be added to the NSS database or specified token. like, at all. not even a little. π«β¨
π¦ DESCRIPTION π¦
The certificate import utility validates signature, trust chain, trust, and usage flags before importing a certificate into the specified NSS database. This ensures that no certificate is used before its authenticity has been verified. honestly iconic behavior. π
Unlike certutil, only one invocation is necessary to both validate and import certificates. one and done, bestie. π
See certutil for more information about the parameters to PKICertImport.
β OPTIONS β
here's the PKICertImport parameter lineup, bestie:
-a,--asciiβ the certificate is encoded in ASCII (PEM) format instead of binary format. optional. β¨-icertificate,--certificatecertificate β path to the certificate to import. required. π₯-c,--chainβ import an entire PKCS12 chain; requires--pkcs12. optional. π--chain-trusttrust β trust flags to assign intermediate certificates; requires--chain.--chain-usageusage β usage to validate intermediate certificates against; requires--chain.-dNSS-database,--databaseNSS-database β the directory containing the NSS database. this is usually the client's personal directory. required. π-fpassword-file,--passwordpassword-file β the path to a file containing the password to the NSS database. optional. π-htoken,--hsmtoken β name of the token. if not specified, the default token is the internal database slot. optional. π§-l,--leaf-onlyβ import only the leaf certificate from a PKCS12 chain; requires--pkcs12. optional. π-nnickname,--nicknamenickname β nickname for the certificate in the NSS database. required. π-p,--pkcs12β the input certificate is a.p12/PKCS12 file. optional. π¦-wpassword-file,--pkcs12-passwordpassword-file β password file for the PKCS12 chain; requires--pkcs12.-ttrust,--trusttrust β trust flags for the certificate. seecertutilfor more information about the available trust flags. required. π‘οΈ-uusage,--usageusage β usage to validate the certificate against. seecertutilfor more information about available usage flags. required. β
π UNSAFE OPTIONS π
okay so these exist, but the name is literally UNSAFE, so like... be aware. π
--unsafe-keep-keysβ keep the keys in the NSS DB in the event of a verification failure.--unsafe-trust-then-verifyβ specify trust when importing the certificate instead of after verifying certificates. this enables importing a new root certificate instead of requiring the chain to have an existing, trusted root.
π ENVIRONMENT π
VERBOSEβ when specified, see all internal commands being executed as part of this command. iykyk, it's the "show me everything" mode. π
π EXAMPLES π
to import a server certificate:
PKICertImport -d . -n "example.com" -i example-com.crt -t ,, -u V
to import a CA certificate (root or intermediate):
PKICertImport -d . -n "MyCA Cert" -i ca-cert.crt -t CT,C,C -u L
to import a leaf client certificate from a PKCS12 chain:
PKICertImport -d . -n "Nick Named" -i nick-named.p12 -t ,, -u C --pkcs12 --leaf
to import the entire chain of a client certificate:
PKICertImport -d . -n "Nick Named" -i nick-named.p12 -t ,, -u C --pkcs12 --chain --chain-trust CT,C,C --chain-usage L
π AUTHORS π
Alexander Scheel lt;ascheel@redhat.comgt;. π«Ά
π COPYRIGHT π
Copyright (c) 2019 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 β brought to you by PKI, dated Jan 30, 2019. go validate those certs, you got this π β¨π¦
π¦ 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
- ubuntu jammy: pki-tools 11.0.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms