12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #!/bin/sh
- set -eu
- db=$(ls -1d "$HOME"/.mozilla/firefox/*default*)
- out="${1:-}"
- if test -z "$out"; then
- out="ca-bundle.crt"
- fi
- currentdate=$(date)
- cat > "$out" <<EOF
- EOF
- certutil -L -h 'Builtin Object Token' -d "$db" | \
- grep ' *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$' | \
- sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \
- sort | \
- while read -r nickname; \
- do echo "$nickname" | sed -e "s/Builtin Object Token://g"; \
- eval certutil -d "$db" -L -n "$nickname" -a ; \
- done >> "$out"
|