Make invirt-update-vnc-cert sign the applet if a signing keystore is configured and...
[invirt/packages/invirt-vnc-client.git] / debian / invirt-update-vnc-cert
index 177c39a..869430f 100755 (executable)
@@ -35,6 +35,13 @@ def main():
     check_call(['jar', 'uf', jarfile,
                 '-C', temp_dir, 'trust.store'])
 
+    if config.vnc.has_key("signing_keystore_path") \
+       and os.path.exists(config.vnc.signing_keystore_path):
+        check_call(['jarsigner', '-keystore', 
+                    config.vnc.signing_keystore_path, 
+                    '-storepass', 'changeit', jarfile, 
+                    config.vnc.signing_key_alias])
+
     shutil.move(jarfile, '/usr/share/invirt-vnc-client/VncViewer.jar')
     
     shutil.rmtree(temp_dir)