aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2012-01-15 13:58:29 -0600
committerJory A. Pratt <anarchy@gentoo.org>2012-01-15 13:58:29 -0600
commit036f34bc013b342dc9d44ba64546cf826cdd227f (patch)
treed51f9abfe8819de02662ca6c09006b4470b8dc6d /scripts
parentmove addpredict for pgo to pkg_setup() (diff)
downloadmozilla-036f34bc013b342dc9d44ba64546cf826cdd227f.tar.gz
mozilla-036f34bc013b342dc9d44ba64546cf826cdd227f.tar.bz2
mozilla-036f34bc013b342dc9d44ba64546cf826cdd227f.zip
basic script to generate an nss shared db with instructions
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ca-certificates-2-nssdb19
-rw-r--r--scripts/nssdb_passwd1
2 files changed, 20 insertions, 0 deletions
diff --git a/scripts/ca-certificates-2-nssdb b/scripts/ca-certificates-2-nssdb
new file mode 100755
index 00000000..219c602a
--- /dev/null
+++ b/scripts/ca-certificates-2-nssdb
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# This file is only intended to generate a shared db for nss
+# in the users home dir. This will be the first step in creating
+# a database that can be shared amongs applications using the sql
+# backend.
+
+PASSWD_FILE="$PWD/nssdb_passwd"
+
+mkdir -p $HOME/.pki/nssdb
+
+certutil -N -f ${PASSWD_FILE} -d sql:.pki/nssdb
+
+for x in `ls /etc/ssl/certs | grep pem`; do
+ certutil -f ${PASSWD_FILE} -d sql:.pki/nssdb -A -t "CT,c,c" -n $x -i /etc/ssl/certs/$x
+done
+
+echo "Please also ensure you add 'export NSS_DEFAULT_DB_TYPE=\"sql\"' via $HOME/.bashrc"
+echo "To see a list of all certificate you may run, 'certutil -L -d $HOME/.pki/nssdb,'"
diff --git a/scripts/nssdb_passwd b/scripts/nssdb_passwd
new file mode 100644
index 00000000..ea20e076
--- /dev/null
+++ b/scripts/nssdb_passwd
@@ -0,0 +1 @@
+GentooF4n