]> git.pld-linux.org Git - packages/ca-certificates.git/commitdiff
- allow placing ca certs in /etc/certs (I'm fed up with messing in /usr)
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 1 Nov 2008 18:20:10 +0000 (18:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ca-certificates-etc-certs.patch -> 1.1

ca-certificates-etc-certs.patch [new file with mode: 0644]

diff --git a/ca-certificates-etc-certs.patch b/ca-certificates-etc-certs.patch
new file mode 100644 (file)
index 0000000..d174375
--- /dev/null
@@ -0,0 +1,48 @@
+--- ca-certificates/sbin/update-ca-certificates        2008-11-01 18:39:19.000000000 +0100
++++ ca-certificates/sbin/update-ca-certificates-local  2008-11-01 19:17:39.138384960 +0100
+@@ -37,6 +37,7 @@
+ CERTSCONF=/etc/ca-certificates.conf
+ CERTSDIR=/usr/share/ca-certificates
++LOCALCERTSDIR=/etc/certs
+ CERTBUNDLE=/etc/openssl/ca-certificates.crt
+ ETCCERTSDIR=/etc/openssl/certs
+ cd $ETCCERTSDIR
+@@ -46,6 +47,7 @@
+   do
+      case $(readlink $symlink) in
+      $CERTSDIR*) rm -f $symlink;;
++     $LOCALCERTSDIR*) rm -f $symlink;;
+      esac
+   done
+   find . -type l -print | while read symlink
+@@ -60,7 +62,7 @@
+ removed="$(sed -ne 's/^!//p' $CERTSCONF | while read crt
+ do
+  if test "$crt" = ""; then continue; fi
+- pem=$(basename "$crt" .crt).pem
++ pem=$(basename "$crt" | sed 's/.crt$/.pem/')
+  if test -e "$pem"; then
+   rm -f "$pem"
+   echo "-$ETCCERTSDIR/$pem"
+@@ -70,11 +72,16 @@
+ added="$(sed -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
+ do
+  if test "$crt" = ""; then continue; fi
+- if ! test -f "$CERTSDIR/$crt"; then continue; fi
+- pem=$(basename "$crt" .crt).pem
++ if ! test -f "$CERTSDIR/$crt" && ! test -f "$LOCALCERTSDIR/$crt" ; then continue; fi
++ pem=$(basename "$crt" | sed 's/.crt$/.pem/')
+  if ! test -e "$pem"; then echo "+$ETCCERTSDIR/$pem"; fi
+- ln -sf "$CERTSDIR/$crt" "$pem"
+- cat "$CERTSDIR/$crt" >> "$bundletmp"
++ if test -f "$CERTSDIR/$crt" ; then
++  ln -sf "$CERTSDIR/$crt" "$pem"
++  cat "$CERTSDIR/$crt" >> "$bundletmp"
++ elif test -f "$LOCALCERTSDIR/$crt" ; then
++  ln -sf "$LOCALCERTSDIR/$crt" "$pem"
++  cat "$LOCALCERTSDIR/$crt" >> "$bundletmp"
++ fi
+ done)"
+ chmod 0644 "$bundletmp"
+ mv -f "$bundletmp" "$CERTBUNDLE"
This page took 0.0611 seconds and 4 git commands to generate.