From 036f34bc013b342dc9d44ba64546cf826cdd227f Mon Sep 17 00:00:00 2001 From: "Jory A. Pratt" Date: Sun, 15 Jan 2012 13:58:29 -0600 Subject: basic script to generate an nss shared db with instructions --- scripts/ca-certificates-2-nssdb | 19 +++++++++++++++++++ scripts/nssdb_passwd | 1 + 2 files changed, 20 insertions(+) create mode 100755 scripts/ca-certificates-2-nssdb create mode 100644 scripts/nssdb_passwd (limited to 'scripts') 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 -- cgit v1.2.3-65-gdbad