- syntax error :/
[packages/ca-certificates.git] / ca-certificates-etc-certs.patch
CommitLineData
70208ba6
JR
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
156426d3 3@@ -37,7 +37,7 @@
70208ba6
JR
4
5 CERTSCONF=/etc/ca-certificates.conf
6 CERTSDIR=/usr/share/ca-certificates
156426d3 7-LOCALCERTSDIR=/usr/local/share/ca-certificates
70208ba6 8+LOCALCERTSDIR=/etc/certs
df159834 9 CERTBUNDLE=ca-certificates.crt
70208ba6
JR
10 ETCCERTSDIR=/etc/openssl/certs
11 cd $ETCCERTSDIR
156426d3
JR
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"
2ce0e3af 30@@ -110,24 +110,18 @@
156426d3
JR
31
32 sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
70208ba6 33 do
156426d3
JR
34- if ! test -f "$CERTSDIR/$crt"
35+ if test -f "$CERTSDIR/$crt"
36 then
37+ add "$CERTSDIR/$crt"
38+ elif test -f "$LOCALCERTSDIR/$crt"
2ce0e3af 39+ then
156426d3
JR
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.174943 seconds and 4 git commands to generate.