]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates-etc-certs.patch
8d25f7c38d5c1ffc6ecdba82546232bb1445f8a4
[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,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 @@ -111,24 +111,18 @@
41  
42  sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
43  do
44 -  if ! test -f "$CERTSDIR/$crt"
45 +  if test -f "$CERTSDIR/$crt"
46 +   then
47 +    add "$CERTSDIR/$crt"
48 +  elif test -f "$LOCALCERTSDIR/$crt"
49    then
50 -    echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
51 +    add "$LOCALCERTSDIR/$crt"
52 +  else
53 +    echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
54      continue
55    fi
56 -  add "$CERTSDIR/$crt"
57  done
58  
59 -# Now process certificate authorities installed by the local system
60 -# administrator.
61 -if [ -d "$LOCALCERTSDIR" ]
62 -then
63 -  find -L "$LOCALCERTSDIR" -type f -name '*.crt' | sort | while read crt
64 -  do
65 -    add "$crt"
66 -  done
67 -fi
68 -
69  rm -f "$CERTBUNDLE"
70  
71  ADDED_CNT=$(wc -l < "$ADDED")
This page took 0.035671 seconds and 2 git commands to generate.