diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ca-certificates-2-nssdb | 19 | ||||
-rw-r--r-- | scripts/nssdb_passwd | 1 |
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 |