diff options
author | Paul Wise <pabs@debian.org> | 2014-12-30 14:18:09 +0800 |
---|---|---|
committer | Michael Shuler <michael@pbandjelly.org> | 2015-01-17 13:31:10 -0600 |
commit | 1c8e391506cba83c5b215b72cb83f03738b9321f (patch) | |
tree | 22713244ef250cec248cbb2281c2076476ea4229 | |
parent | fd660d3b75f2b35c84be22e73fad9fae0e401308 (diff) | |
download | ca-certificates-1c8e391506cba83c5b215b72cb83f03738b9321f.tar.gz |
Add an option to set the certs in a directory to the defaults
-rwxr-xr-x | sbin/update-ca-certificates | 12 |
1 files changed, 12 insertions, 0 deletions
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 |