summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/firefox-certs-import.sh14
-rwxr-xr-xscripts/firefox-certs-reload.sh14
-rwxr-xr-xscripts/firefox-certs-remove.sh1
3 files changed, 29 insertions, 0 deletions
diff --git a/scripts/firefox-certs-import.sh b/scripts/firefox-certs-import.sh
index 59119cb..94504e0 100755
--- a/scripts/firefox-certs-import.sh
+++ b/scripts/firefox-certs-import.sh
@@ -35,6 +35,20 @@ AtoB $CERTS/ca.pem $CERTS/ca.crt
certutil -A -d $FIREFOX_DIR/$PROFILE -n "$CA_CERT_NAME" -i $CERTS/ca.pem -t CT,C,C
################################################################################
+# Importing server certificate
+################################################################################
+
+SERVER_CERT_NAME="Server-Cert cert-$CA_INSTANCE_NAME"
+SERVER_CERT_DIR=/var/lib/pki/$CA_INSTANCE_NAME/alias
+
+# export server cert
+certutil -L -d $CA_CERT_DIR -n "$SERVER_CERT_NAME" -a > $CERTS/server.pem
+AtoB $CERTS/server.pem $CERTS/server.crt
+
+# import server cert
+certutil -A -d $FIREFOX_DIR/$PROFILE -n "$SERVER_CERT_NAME" -i $CERTS/server.pem -t CT,C,C
+
+################################################################################
# Importing CA admin certificate
################################################################################
diff --git a/scripts/firefox-certs-reload.sh b/scripts/firefox-certs-reload.sh
new file mode 100755
index 0000000..08100a2
--- /dev/null
+++ b/scripts/firefox-certs-reload.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -x
+
+user=$1
+
+if [ "$user" == "" ]; then
+ home=$HOME
+else
+ home=/home/$user
+fi
+
+echo HOME=$home
+
+./firefox-certs-remove.sh $user
+./firefox-certs-import.sh $user
diff --git a/scripts/firefox-certs-remove.sh b/scripts/firefox-certs-remove.sh
index 553f32f..5458919 100755
--- a/scripts/firefox-certs-remove.sh
+++ b/scripts/firefox-certs-remove.sh
@@ -17,6 +17,7 @@ cd $FIREFOX_DIR/$PROFILE
certutil -D -n "admin" -d .
certutil -D -n "caadmin" -d .
certutil -D -n "kraadmin" -d .
+certutil -D -n "Server-Cert cert-$CA_INSTANCE_NAME" -d .
certutil -D -n "caSigningCert cert-$CA_INSTANCE_NAME" -d .
certutil -D -n "$HOSTNAME" -d .
certutil -D -n "$HOSTNAME #2" -d .