]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates-etc-certs.patch
ab1b0d200165d4faa9d87092c0436a99cfdcc644
[packages/ca-certificates.git] / ca-certificates-etc-certs.patch
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
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 +LOCALCERTSDIR=/etc/certs
9  CERTBUNDLE=ca-certificates.crt
10  ETCCERTSDIR=/etc/openssl/certs
11  cd $ETCCERTSDIR
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"
30 @@ -110,24 +110,17 @@
31  
32  sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
33  do
34 -  if ! test -f "$CERTSDIR/$crt"
35 +  if test -f "$CERTSDIR/$crt"
36    then
37 +    add "$CERTSDIR/$crt"
38 +  elif test -f "$LOCALCERTSDIR/$crt"
39 +    add "$LOCALCERTSDIR/$crt"
40 +  else
41 -    echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
42 +    echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
43      continue
44    fi
45 -  add "$CERTSDIR/$crt"
46  done
47  
48 -# Now process certificate authorities installed by the local system
49 -# administrator.
50 -if [ -d "$LOCALCERTSDIR" ]
51 -then
52 -  find -L "$LOCALCERTSDIR" -type f -name '*.crt' | while read crt
53 -  do
54 -    add "$crt"
55 -  done
56 -fi
57 -
58  chmod 0644 "$TEMPBUNDLE"
59  mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
60  
This page took 0.019657 seconds and 2 git commands to generate.