Created
February 23, 2017 10:19
-
-
Save ThomasLeister/f55fa9c2e85b506ce00ed91f059f0138 to your computer and use it in GitHub Desktop.
Firefox, Thunderbird, Chromium, Chrome Root CA certificate installer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Script installs root.cert.pem to certificate trust store of applications using NSS | |
### (e.g. Firefox, Thunderbird, Chromium) | |
### Mozilla uses cert8, Chromium and Chrome use cert9 | |
### | |
### Requirement: apt install libnss3-tools | |
### | |
### | |
### CA file to install | |
### | |
certfile="root.cert.pem" | |
certname="ADITO Software Root CA" | |
### | |
### For cert8 (legacy - DBM) | |
### | |
for certDB in $(find ~/ -name "cert8.db") | |
do | |
certdir=$(dirname ${certDB}); | |
certutil -A -n "${certname}" -t "TCu,Cu,Tu" -i ${certfile} -d dbm:${certdir} | |
done | |
### | |
### For cert9 (SQL) | |
### | |
for certDB in $(find ~/ -name "cert9.db") | |
do | |
certdir=$(dirname ${certDB}); | |
certutil -A -n "${certname}" -t "TCu,Cu,Tu" -i ${certfile} -d sql:${certdir} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment