Skip to content

Instantly share code, notes, and snippets.

@Flashwalker
Last active June 27, 2026 14:25
Show Gist options
  • Select an option

  • Save Flashwalker/205561835a5e0451ca1ee9058a907d47 to your computer and use it in GitHub Desktop.

Select an option

Save Flashwalker/205561835a5e0451ca1ee9058a907d47 to your computer and use it in GitHub Desktop.
Install certificates to Librewolf
#!/bin/bash
# Usage: Install-cert.sh ~/Downloads/russian_trusted_root_ca_pem.crt ~/Downloads/russian_trusted_sub_ca_pem.crt
certFiles=("$@")
certDatabases=("${HOME}/.librewolf/*default/cert9.db")
for i in "${certFiles[@]}"; do
certname="${i%.crt}"
for certDB in "${certDatabases[@]}"; do
certdir=$(dirname "${certDB}");
certutil -A -n "${certname}" -t "TCu,Cu,Tu" -i "${i}" -d sql:"${certdir}"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment