- release 2
[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"
f8778b79 30@@ -89,6 +89,7 @@
7477ddf9
JR
31 do
32 case $(readlink $symlink) in
33 $CERTSDIR*) rm -f $symlink;;
34+ $LOCALCERTSDIR*) rm -f $symlink;;
35 esac
36 done
37 find . -type l -print | while read symlink
38@@ -110,24 +110,18 @@
156426d3
JR
39
40 sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
70208ba6 41 do
156426d3
JR
42- if ! test -f "$CERTSDIR/$crt"
43+ if test -f "$CERTSDIR/$crt"
44 then
45+ add "$CERTSDIR/$crt"
46+ elif test -f "$LOCALCERTSDIR/$crt"
2ce0e3af 47+ then
156426d3
JR
48+ add "$LOCALCERTSDIR/$crt"
49+ else
50- echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
51+ echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
52 continue
53 fi
54- add "$CERTSDIR/$crt"
55 done
56
57-# Now process certificate authorities installed by the local system
58-# administrator.
59-if [ -d "$LOCALCERTSDIR" ]
60-then
61- find -L "$LOCALCERTSDIR" -type f -name '*.crt' | while read crt
62- do
63- add "$crt"
64- done
65-fi
66-
67 chmod 0644 "$TEMPBUNDLE"
68 mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
69
This page took 0.04057 seconds and 4 git commands to generate.