轉至/home/UserName/.mozilla/firefox
前題是Firefox曾執行過,否則 ".mozilla" 不存在。
在此目錄下,有一個xxxxxxxx.default的目錄,進入去,執行以下命令匯入P12證書到Firefox中
pk12util -i abc_cert.p12 -d ./
Enter password for PKCS12 file: <==如有密碼
pk12util: PKCS12 IMPORT SUCCESSFUL
完成後,證書已被匯入,以下檔案會被更新。
cert8.dbkey3.db
------------------------------------------------------------------------------------------------------------
參考:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Reference/NSS_tools_:_pk12util
-i p12file
Import keys and certificates from a PKCS#12 file into a security database.
-d [sql:]directory
Specify the database directory into which to import to or export from certificates and keys.
pk12util supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: is not used, then the tool assumes that the given databases are in the old format.
-n certname
Specify the nickname of the cert and private key to export.
沒有留言:
發佈留言