16.6.3.2. 使用 certutil 删除证书
使用 certutil 从数据库中删除证书:
- 打开实例的证书数据库目录。
/var/lib/pki/instance_name/alias
/var/lib/pki/instance_name/aliasCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 使用 -L 选项运行 certutil,列出数据库中的证书。例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 通过使用 -D 选项运行 certutil 来删除证书。
certutil -D -d . -n certificate_nickname
certutil -D -d . -n certificate_nicknameCopy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:certutil -D -d . -n "ServerCert cert-instance_name"
certutil -D -d . -n "ServerCert cert-instance_name"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 再次列出证书,以确认证书已被删除。
certutil -L -d . Certificate Authority - Example Domain CT,c, subsystemCert cert-instance_name u,u,u
certutil -L -d . Certificate Authority - Example Domain CT,c, subsystemCert cert-instance_name u,u,uCopy to Clipboard Copied! Toggle word wrap Toggle overflow
有关使用 certutil 命令的详情请参考 http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html。