invirt-vnc-server (0.0.2) unstable; urgency=low
* Cleanup the init script to use /lib/init/std-init.sh
+ * Generate the SSL certificates at install-time
- -- Evan Broder <broder@mit.edu> Tue, 28 Oct 2008 20:48:38 -0400
+ -- Evan Broder <broder@mit.edu> Tue, 28 Oct 2008 21:19:14 -0400
invirt-vnc-server (0.0.1) unstable; urgency=low
case "$1" in
configure)
- if [ -z "$2" ]; then
- echo "Please be sure to copy vncproxy.crt and vncproxykey.pem into /usr/share/invirt-vnc-server/"
- fi
mkdir -p /etc/invirt/secrets
+ if ! [ -e /etc/invirt/secrets/vnc.pem ]; then
+ openssl genrsa -out /etc/invirt/secrets/vnc.pem 1024 >/dev/null
+ fi
+
+ if ! [ -e /etc/invirt/secrets/vnc.crt ]; then
+ openssl req -new -x509 -nodes -sha1 -subj '/' -key /etc/invirt/secrets/vnc.pem \
+ > /etc/invirt/secrets/vnc.crt
+ fi
+
if ! [ -e /etc/invirt/secrets/vnc-key ]; then
openssl rand -base64 33 >/etc/invirt/secrets/vnc-key
fi
--- /dev/null
+#!/usr/bin/python
+
+import sys
+
+try:
+ print open('/etc/invirt/secrets/vnc.crt').read()
+except IOError, e:
+ sys.exit(e.errno)
packages = ['invirt.vnc'],
package_dir = {'invirt': 'python'},
- scripts=['invirt-vnc-server', 'invirt-vnc-authtoken']
+ scripts=['invirt-vnc-server', 'invirt-vnc-authtoken', 'invirt-vnc-getcert']
)