On Tue, 2014-12-30 at 00:29 -0600, Michael Shuler wrote:

> Will do as as soon as possible. Thanks, Michael.

Please use this version, the first one had syntax errors.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

From b9cfdaac03be0a32adbefe29248c56731bac5179 Mon Sep 17 00:00:00 2001
From: Paul Wise <p...@debian.org>
Date: Tue, 30 Dec 2014 14:18:09 +0800
Subject: [PATCH] Add an option to set the certs in a directory to the defaults

---
 sbin/update-ca-certificates | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
index bc56da5..a0c8f06 100755
--- a/sbin/update-ca-certificates
+++ b/sbin/update-ca-certificates
@@ -23,6 +23,7 @@
 
 verbose=0
 fresh=0
+default=0
 CERTSCONF=/etc/ca-certificates.conf
 CERTSDIR=/usr/share/ca-certificates
 LOCALCERTSDIR=/usr/local/share/ca-certificates
@@ -37,6 +38,9 @@ do
       verbose=1;;
     --fresh|-f)
       fresh=1;;
+    --default|-d)
+      default=1
+      fresh=1;;
     --certsconf)
       shift
       CERTSCONF="$1";;
@@ -125,6 +129,14 @@ fi
 
 echo -n "Updating certificates in $ETCCERTSDIR... "
 
+# Add default certificate authorities if requested
+if [ "$default" = 1 ]; then
+  find -L "$CERTSDIR" -type f -name '*.crt' | sort | while read crt
+  do
+    add "$crt"
+  done
+fi
+
 # Handle certificates that should be removed.  This is an explicit act
 # by prefixing lines in the configuration files with exclamation marks (!).
 sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt
-- 
2.1.4

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to