Certutil

De Linuxmemo.

Install

sudo apt install libnss3-tools

Utilisation

  • lister les certificats
certutil -L -d .
certutil -L -d . -a -n certname
certutil -L -d . -n certname
  • ajouter des certificats
certutil -A -n certname -t trustargs -d [sql:]directory [-a] [-i input-file]
certutil -A -n "CN=My SSL Certificate" -t ",," -d sql:/home/my/sharednssdb -i /home/example-certs/cert.cer
certutil -E -n "CN=John Smith Email Cert" -t ",P," -d sql:/home/my/sharednssdb -i /home/example-certs/email.cer


-t trustargs
·   p - Valid peer
·   P - Trusted peer (implies p)
·   c - Valid CA
·   C - Trusted CA (implies c)
·   T - trusted CA for client authentication (ssl server only)
The attribute codes for the categories are separated by commas, and the entire set of attributes enclosed by quotation marks. For example:
-t "TC,C,T"
  • Printing the Certificate Chain
Outils personnels