在某些情况下,您可能需要导出证书,以便以后可以导入该证书(例如将其导入另一个主机)。您也可以使用 Directory Server 管理控制台执行该任务。
导出证书。
msgcert export-cert [-o OUTPUT_FILE] CERT_ALIAS |
例如:
$ ./msgcert export-cert -o /tmp/first-certificate "First Certificate" $./msgcert export-cert -o /tmp/first-server-certificate Server-Cert Choose the PKCS#12 file password: Confirm the PKCS#12 file password: $ls /tmp first-server-certificate /tmp/first-certificate |
导入证书。
$ msgcert import-cert CERT_FILE |
例如,导入证书
$ msgcert import-cert /tmp/first-server-certificate Enter the PKCS#12 file password: $ |