Linux 下谷歌浏览器导入证书

In case database already has been initialised, but still is corrupted then it has to be rebuild:

rm -rf ~/.pki/nssdb/
mkdir ~/.pki/nssdb
chmod 700 ~/.pki/nssdb
执行certutil -d sql:$HOME/.pki/nssdb -N

certutil -d sql:$HOME/.pki/nssdb -N 
Enter a password which will be used to encrypt your keys.
The password should be at least 8 characters long,
and should contain at least one non-alphabetic character.

Enter new password: 
Re-enter password: 
输入密码的地址直接回车就可以

执行 certutil -d sql:$HOME/.pki/nssdb -L
Check if working alright

certutil -d sql:$HOME/.pki/nssdb -L 

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI


Import certificate:
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n GoAgent -i /home/soft/Downloads/CA.crt


Check if working alright:
certutil -d sql:$HOME/.pki/nssdb -L
Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

GoAgent                                                      C,,  

你可能感兴趣的:(linux)