]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates-etc-certs.patch
rediff patches; rel 3
[packages/ca-certificates.git] / ca-certificates-etc-certs.patch
1 --- ca-certificates-20140223/sbin/update-ca-certificates~       2014-03-14 12:55:24.000000000 +0200
2 +++ ca-certificates-20140223/sbin/update-ca-certificates        2014-03-14 14:38:31.587876211 +0200
3 @@ -37,8 +37,8 @@
4  default=0
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  HOOKSDIR=/etc/ca-certificates/update.d
13  
14 @@ -52,7 +52,7 @@
15  
16  # Helper files.  (Some of them are not simple arrays because we spawn
17  # subshells later on.)
18 -TEMPBUNDLE="$(mktemp -t "${CERTBUNDLE}.tmp.XXXXXX")"
19 +TEMPBUNDLE="$(mktemp "${CERTBUNDLE}.tmp.XXXXXX")"
20  ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
21  REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
22  
23 @@ -62,7 +62,7 @@
24  # bundle.
25  add() {
26    CERT="$1"
27 -  PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
28 +  PEM="$ETCCERTSDIR/$(basename "$CERT" .pem | sed -e 's/.crt$//' -e 's/ /_/g' \
29                                                    -e 's/[()]/=/g' \
30                                                    -e 's/,/_/g').pem"
31    if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
32 @@ -74,7 +74,7 @@
33  
34  remove() {
35    CERT="$1"
36 -  PEM="$ETCCERTSDIR/$(basename "$CERT" .crt).pem"
37 +  PEM="$ETCCERTSDIR/$(basename "$CERT" .pem | sed 's/.crt$//').pem"
38    if test -L "$PEM"
39    then
40      rm -f "$PEM"
41 @@ -111,24 +111,18 @@
42  
43  sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt
44  do
45 -  if ! test -f "$CERTSDIR/$crt"
46 +  if test -f "$CERTSDIR/$crt"
47 +   then
48 +    add "$CERTSDIR/$crt"
49 +  elif test -f "$LOCALCERTSDIR/$crt"
50    then
51 -    echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
52 +    add "$LOCALCERTSDIR/$crt"
53 +  else
54 +    echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
55      continue
56    fi
57 -  add "$CERTSDIR/$crt"
58  done
59  
60 -# Now process certificate authorities installed by the local system
61 -# administrator.
62 -if [ -d "$LOCALCERTSDIR" ]
63 -then
64 -  find -L "$LOCALCERTSDIR" -type f -name '*.crt' | sort | while read crt
65 -  do
66 -    add "$crt"
67 -  done
68 -fi
69 -
70  rm -f "$CERTBUNDLE"
71  
72  ADDED_CNT=$(wc -l < "$ADDED")
This page took 0.039485 seconds and 3 git commands to generate.