]> git.pld-linux.org Git - packages/ca-certificates.git/blame_incremental - ca-certificates.d.patch
remove _outdated_ _intermediate_ Let's Encrypt certs
[packages/ca-certificates.git] / ca-certificates.d.patch
... / ...
CommitLineData
1--- ca-certificates-20140223/sbin/update-ca-certificates 2014-03-14 14:42:21.171246343 +0200
2+++ ca-certificates-20140223/sbin/update-ca-certificates 2014-03-14 14:46:50.556014888 +0200
3@@ -26,6 +26,7 @@ fresh=0
4 default=0
5 DESTDIR=
6 CERTSCONF=/etc/ca-certificates.conf
7+CERTSCONFD=/etc/ca-certificates.d
8 CERTSDIR=/usr/share/ca-certificates
9 LOCALCERTSDIR=/etc/certs
10 CERTBUNDLE=/etc/certs/ca-certificates.crt
11@@ -70,6 +71,7 @@ do
12 done
13
14 CERTSCONF=${DESTDIR}${CERTSCONF}
15+CERTSCONFD=${DESTDIR}${CERTSCONFD}
16 CERTSDIR=${DESTDIR}${CERTSDIR}
17 LOCALCERTSDIR=${DESTDIR}${LOCALCERTSDIR}
18 CERTBUNDLE=${DESTDIR}${CERTBUNDLE}
19@@ -105,25 +106,30 @@
20
21 echo -n "Updating certificates in $ETCCERTSDIR... "
22
23-# Handle certificates that should be removed. This is an explicit act
24-# by prefixing lines in the configuration files with exclamation marks (!).
25-sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt
26-do
27- remove "$CERTSDIR/$crt"
28-done
29+for conf in $CERTSCONF $CERTSCONFD/*.conf; do
30+ # skip inexistent files (matched by glob)
31+ [ -f $conf ] || continue
32+
33+ # Handle certificates that should be removed. This is an explicit act
34+ # by prefixing lines in the configuration files with exclamation marks (!).
35+ sed -n -e '/^$/d' -e 's/^!//p' $conf | while read crt
36+ do
37+ remove "$CERTSDIR/$crt"
38+ done
39
40-sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt
41-do
42- if test -f "$CERTSDIR/$crt"
43- then
44- add "$CERTSDIR/$crt"
45- elif test -f "$LOCALCERTSDIR/$crt"
46- then
47- add "$LOCALCERTSDIR/$crt"
48- else
49- echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
50- continue
51- fi
52+ sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $conf | while read crt
53+ do
54+ if test -f "$CERTSDIR/$crt"
55+ then
56+ add "$CERTSDIR/$crt"
57+ elif test -f "$LOCALCERTSDIR/$crt"
58+ then
59+ add "$LOCALCERTSDIR/$crt"
60+ else
61+ echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $conf." >&2
62+ continue
63+ fi
64+ done
65 done
66
67 rm -f "$CERTBUNDLE"
This page took 0.033588 seconds and 4 git commands to generate.