]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates-etc-certs.patch
262a987ca4aaf83caabfe5abff9007804cec863f
[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 @@ -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 @@ -111,24 +111,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 +    add "$CERTSDIR/$crt"
56 +  elif test -f "$LOCALCERTSDIR/$crt"
57    then
58 -    echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
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' | sort | while read crt
72 -  do
73 -    add "$crt"
74 -  done
75 -fi
76 -
77  rm -f "$CERTBUNDLE"
78  
79  ADDED_CNT=$(wc -l < "$ADDED")
This page took 0.035153 seconds and 2 git commands to generate.