]> git.pld-linux.org Git - packages/ca-certificates.git/blame_incremental - ca-certificates-etc-certs.patch
- syntax error :/
[packages/ca-certificates.git] / ca-certificates-etc-certs.patch
... / ...
CommitLineData
1--- ca-certificates/sbin/update-ca-certificates 2008-11-01 18:39:19.000000000 +0100
2+++ ca-certificates/sbin/update-ca-certificates-local 2008-11-01 19:17:39.138384960 +0100
3@@ -37,7 +37,7 @@
4
5 CERTSCONF=/etc/ca-certificates.conf
6 CERTSDIR=/usr/share/ca-certificates
7-LOCALCERTSDIR=/usr/local/share/ca-certificates
8+LOCALCERTSDIR=/etc/certs
9 CERTBUNDLE=ca-certificates.crt
10 ETCCERTSDIR=/etc/openssl/certs
11 cd $ETCCERTSDIR
12@@ -62,7 +62,7 @@
13 # bundle.
14 add() {
15 CERT="$1"
16- PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
17+ PEM="$ETCCERTSDIR/$(basename "$CERT" | sed -e 's/.crt$/.pem/' -e 's/ /_/g' \
18 -e 's/[()]/=/g' \
19 -e 's/,/_/g').pem"
20 if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
21@@ -74,7 +74,7 @@
22
23 remove() {
24 CERT="$1"
25- PEM="$ETCCERTSDIR/$(basename "$CERT" .crt).pem"
26+ PEM="$ETCCERTSDIR/$(basename "$CERT" | sed 's/.crt$/.pem/')"
27 if test -L "$PEM"
28 then
29 rm -f "$PEM"
30@@ -110,24 +110,18 @@
31
32 sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
33 do
34- if ! test -f "$CERTSDIR/$crt"
35+ if test -f "$CERTSDIR/$crt"
36 then
37+ add "$CERTSDIR/$crt"
38+ elif test -f "$LOCALCERTSDIR/$crt"
39+ then
40+ add "$LOCALCERTSDIR/$crt"
41+ else
42- echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
43+ echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
44 continue
45 fi
46- add "$CERTSDIR/$crt"
47 done
48
49-# Now process certificate authorities installed by the local system
50-# administrator.
51-if [ -d "$LOCALCERTSDIR" ]
52-then
53- find -L "$LOCALCERTSDIR" -type f -name '*.crt' | while read crt
54- do
55- add "$crt"
56- done
57-fi
58-
59 chmod 0644 "$TEMPBUNDLE"
60 mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
61
This page took 0.02373 seconds and 4 git commands to generate.