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
5 CERTSCONF=/etc/ca-certificates.conf
6 CERTSDIR=/usr/share/ca-certificates
7 +LOCALCERTSDIR=/etc/certs
8 CERTBUNDLE=/etc/openssl/ca-certificates.crt
9 ETCCERTSDIR=/etc/openssl/certs
13 case $(readlink $symlink) in
14 $CERTSDIR*) rm -f $symlink;;
15 + $LOCALCERTSDIR*) rm -f $symlink;;
18 find . -type l -print | while read symlink
20 removed="$(sed -ne 's/^!//p' $CERTSCONF | while read crt
22 if test "$crt" = ""; then continue; fi
23 - pem=$(basename "$crt" .crt).pem
24 + pem=$(basename "$crt" | sed 's/.crt$/.pem/')
25 if test -e "$pem"; then
27 echo "-$ETCCERTSDIR/$pem"
29 added="$(sed -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
31 if test "$crt" = ""; then continue; fi
32 - if ! test -f "$CERTSDIR/$crt"; then continue; fi
33 - pem=$(basename "$crt" .crt).pem
34 + if ! test -f "$CERTSDIR/$crt" && ! test -f "$LOCALCERTSDIR/$crt" ; then continue; fi
35 + pem=$(basename "$crt" | sed 's/.crt$/.pem/')
36 if ! test -e "$pem"; then echo "+$ETCCERTSDIR/$pem"; fi
37 - ln -sf "$CERTSDIR/$crt" "$pem"
38 - cat "$CERTSDIR/$crt" >> "$bundletmp"
39 + if test -f "$CERTSDIR/$crt" ; then
40 + ln -sf "$CERTSDIR/$crt" "$pem"
41 + cat "$CERTSDIR/$crt" >> "$bundletmp"
42 + elif test -f "$LOCALCERTSDIR/$crt" ; then
43 + ln -sf "$LOCALCERTSDIR/$crt" "$pem"
44 + cat "$LOCALCERTSDIR/$crt" >> "$bundletmp"
47 chmod 0644 "$bundletmp"
48 mv -f "$bundletmp" "$CERTBUNDLE"