From: Evan Broder Date: Sun, 26 Oct 2008 21:15:01 +0000 (-0400) Subject: Add a script to regenerate the VNC client's certificate store X-Git-Tag: 0.0.1~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-vnc-client.git/commitdiff_plain/a31735dcee7258bfa479950bccd356c68b83d631 Add a script to regenerate the VNC client's certificate store svn path=/trunk/packages/invirt-vnc-client/; revision=1336 --- diff --git a/Makefile b/Makefile index 30654a7..259ee2c 100644 --- a/Makefile +++ b/Makefile @@ -33,15 +33,13 @@ SOURCES = VncViewer.java RfbProto.java AuthPanel.java VncCanvas.java \ InStream.java MemInStream.java ZlibInStream.java \ VNCProxyConnectSocketWrapper.java SocketWrapper.java InvirtTrustManager.java -EXTRAJAR = trust.store - all: $(CLASSES) $(ARCHIVE) $(CLASSES): $(SOURCES) $(JC) $(JCFLAGS) -O $(SOURCES) $(ARCHIVE): $(CLASSES) $(MANIFEST) - $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES) $(EXTRAJAR) + $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES) install: $(CLASSES) $(ARCHIVE) $(CP) $(CLASSES) $(ARCHIVE) $(PAGES) $(INSTALL_DIR) diff --git a/debian/changelog b/debian/changelog index c799420..8b0bd05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ invirt-vnc-client (0.0.1) unstable; urgency=low * sipb-xen-vnc-client -> invirt-vnc-client * SIPBTrustManager -> InvirtTrustManager + * Add a script to regenerate the client's certificate store - -- Evan Broder Sun, 26 Oct 2008 16:05:14 -0400 + -- Evan Broder Sun, 26 Oct 2008 17:14:15 -0400 sipb-xen-vnc-client (1.03) unstable; urgency=low diff --git a/debian/invirt-update-vnc-cert.sh b/debian/invirt-update-vnc-cert.sh new file mode 100755 index 0000000..fa73f27 --- /dev/null +++ b/debian/invirt-update-vnc-cert.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ "$(ls /etc/invirt/vnc-cert.d)" == "" ]; then + echo "E: No certs in /etc/invirt/vnc-cert.d/" >&2 + echo " Put certificates for all Invirt VNC proxy servers in" >&2 + echo " /etc/invirt/vnc-cert.d, then run this script again" >&2 + exit 1 +fi + +TMP_DIR="$(mktemp -d)" +for i in $(ls /etc/invirt/vnc-cert.d/*.crt); do + keytool -noprompt -alias "${i%.crt}" -file "/etc/invirt/vnc-cert.d/$i" \ + -keystore "$TMP_DIR/trust.store" -storepass "foobar" +done + +jar uf /usr/share/invirt-vnc-client/VncViewer.jar -C "$TMP_DIR" trust.store + +rm -rf "$TMP_DIR" diff --git a/debian/invirt-vnc-client.dirs b/debian/invirt-vnc-client.dirs index 65f18e7..e80759d 100644 --- a/debian/invirt-vnc-client.dirs +++ b/debian/invirt-vnc-client.dirs @@ -1 +1,2 @@ +etc/invirt/vnc-cert.d usr/share/invirt-vnc-client diff --git a/debian/invirt-vnc-client.install b/debian/invirt-vnc-client.install new file mode 100644 index 0000000..0f6411b --- /dev/null +++ b/debian/invirt-vnc-client.install @@ -0,0 +1 @@ +debian/invirt-update-vnc-cert.sh usr/sbin/invirt-update-vnc-cert diff --git a/debian/invirt-vnc-client.postinst b/debian/invirt-vnc-client.postinst new file mode 100644 index 0000000..6fede0c --- /dev/null +++ b/debian/invirt-vnc-client.postinst @@ -0,0 +1,42 @@ +#!/bin/sh +# postinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + invirt-update-vnc-cert || true + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/trust.store b/trust.store deleted file mode 100644 index 83e9257..0000000 Binary files a/trust.store and /dev/null differ