]>
Commit | Line | Data |
---|---|---|
1 | --- ca-certificates-20120212/sbin/update-ca-certificates~ 2012-05-12 11:41:03.000000000 +0300 | |
2 | +++ ca-certificates-20120212/sbin/update-ca-certificates 2012-05-12 11:43:10.517657520 +0300 | |
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 | -CERTBUNDLE=ca-certificates.crt | |
9 | +LOCALCERTSDIR=/etc/certs | |
10 | +CERTBUNDLE=/etc/certs/ca-certificates.crt | |
11 | ETCCERTSDIR=@openssldir@ | |
12 | cd $ETCCERTSDIR | |
13 | @@ -52,7 +52,7 @@ | |
14 | ||
15 | # Helper files. (Some of them are not simple arrays because we spawn | |
16 | # subshells later on.) | |
17 | -TEMPBUNDLE="$(mktemp -t "${CERTBUNDLE}.tmp.XXXXXX")" | |
18 | +TEMPBUNDLE="$(mktemp "${CERTBUNDLE}.tmp.XXXXXX")" | |
19 | ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")" | |
20 | REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")" | |
21 | ||
22 | @@ -62,7 +62,7 @@ | |
23 | # bundle. | |
24 | add() { | |
25 | CERT="$1" | |
26 | - PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \ | |
27 | + PEM="$ETCCERTSDIR/$(basename "$CERT" .pem | sed -e 's/.crt$//' -e 's/ /_/g' \ | |
28 | -e 's/[()]/=/g' \ | |
29 | -e 's/,/_/g').pem" | |
30 | if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] | |
31 | @@ -74,7 +74,7 @@ | |
32 | ||
33 | remove() { | |
34 | CERT="$1" | |
35 | - PEM="$ETCCERTSDIR/$(basename "$CERT" .crt).pem" | |
36 | + PEM="$ETCCERTSDIR/$(basename "$CERT" .pem | sed 's/.crt$//').pem" | |
37 | if test -L "$PEM" | |
38 | then | |
39 | rm -f "$PEM" | |
40 | @@ -89,6 +89,7 @@ | |
41 | do | |
42 | case $(readlink $symlink) in | |
43 | $CERTSDIR*) rm -f $symlink;; | |
44 | + $LOCALCERTSDIR*) rm -f $symlink;; | |
45 | esac | |
46 | done | |
47 | find . -type l -print | while read symlink | |
48 | @@ -110,24 +110,18 @@ | |
49 | ||
50 | sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt | |
51 | do | |
52 | - if ! test -f "$CERTSDIR/$crt" | |
53 | + if test -f "$CERTSDIR/$crt" | |
54 | then | |
55 | - echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2 | |
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 $CERTSCONF." >&2 | |
62 | continue | |
63 | fi | |
64 | - add "$CERTSDIR/$crt" | |
65 | done | |
66 | ||
67 | -# Now process certificate authorities installed by the local system | |
68 | -# administrator. | |
69 | -if [ -d "$LOCALCERTSDIR" ] | |
70 | -then | |
71 | - find -L "$LOCALCERTSDIR" -type f -name '*.crt' | while read crt | |
72 | - do | |
73 | - add "$crt" | |
74 | - done | |
75 | -fi | |
76 | - | |
77 | rm -f "$CERTBUNDLE" | |
78 | ||
79 | ADDED_CNT=$(wc -l < "$ADDED") |