]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu.conf: add vnc_tls_x509_secret_uuid
authorJán Tomko <jtomko@redhat.com>
Mon, 14 Jan 2019 23:09:23 +0000 (00:09 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 22 Jan 2019 11:18:28 +0000 (12:18 +0100)
Add an option that lets the user specify the secret
that unlocks the server TLS key.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/libvirtd_qemu.aug
src/qemu/qemu.conf
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/test_libvirtd_qemu.aug.in

index 28bd851411c784e3c7fef6c923a001fec34ab626..b311f02da6b2a5c8341b1216182572b9612df371 100644 (file)
@@ -35,6 +35,7 @@ module Libvirtd_qemu =
                  | bool_entry "vnc_auto_unix_socket"
                  | bool_entry "vnc_tls"
                  | str_entry "vnc_tls_x509_cert_dir"
+                 | str_entry "vnc_tls_x509_secret_uuid"
                  | bool_entry "vnc_tls_x509_verify"
                  | str_entry "vnc_password"
                  | bool_entry "vnc_sasl"
index 28e51b2c59a1fd8754fb348b304273230b8cc879..c1f12011341cc889412263e56c83afdfc965ff14 100644 (file)
 #vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc"
 
 
+# Uncomment and use the following option to override the default secret
+# UUID provided in the default_tls_x509_secret_uuid parameter.
+#
+#vnc_tls_x509_secret_uuid = "00000000-0000-0000-0000-000000000000"
+
+
 # The default TLS configuration only uses certificates for the server
 # allowing the client to verify the server's identity and establish
 # an encrypted channel.
index 2baf13b1c7038595b0d9930ad7d63914fc76cb7c..8379b5a30d1ca05e0839e497a1aa3403f51e0275 100644 (file)
@@ -361,6 +361,7 @@ static void virQEMUDriverConfigDispose(void *obj)
     VIR_FREE(cfg->defaultTLSx509secretUUID);
 
     VIR_FREE(cfg->vncTLSx509certdir);
+    VIR_FREE(cfg->vncTLSx509secretUUID);
     VIR_FREE(cfg->vncListen);
     VIR_FREE(cfg->vncPassword);
     VIR_FREE(cfg->vncSASLdir);
@@ -458,6 +459,8 @@ virQEMUDriverConfigLoadVNCEntry(virQEMUDriverConfigPtr cfg,
         cfg->vncTLSx509verifyPresent = true;
     if (virConfGetValueString(conf, "vnc_tls_x509_cert_dir", &cfg->vncTLSx509certdir) < 0)
         return -1;
+    if (virConfGetValueString(conf, "vnc_tls_x509_secret_uuid", &cfg->vncTLSx509secretUUID) < 0)
+        return -1;
     if (virConfGetValueString(conf, "vnc_listen", &cfg->vncListen) < 0)
         return -1;
     if (virConfGetValueString(conf, "vnc_password", &cfg->vncPassword) < 0)
@@ -1168,6 +1171,7 @@ virQEMUDriverConfigSetDefaults(virQEMUDriverConfigPtr cfg)
         } \
     } while (0)
 
+    SET_TLS_SECRET_UUID_DEFAULT(vnc);
     SET_TLS_SECRET_UUID_DEFAULT(chardev);
     SET_TLS_SECRET_UUID_DEFAULT(migrate);
 
index bce8364c5aa9763333b596054b74b8891a623574..14c9d15a72d17d6466d4c824fbd8f4e3c38c13b9 100644 (file)
@@ -125,6 +125,7 @@ struct _virQEMUDriverConfig {
     bool vncTLSx509verifyPresent;
     bool vncSASL;
     char *vncTLSx509certdir;
+    char *vncTLSx509secretUUID;
     char *vncListen;
     char *vncPassword;
     char *vncSASLdir;
index f1e8806ad20db1fcf21f20f19588c18865b95889..42354645305d3435a68869da9851cb5300cc8ac1 100644 (file)
@@ -9,6 +9,7 @@ module Test_libvirtd_qemu =
 { "vnc_auto_unix_socket" = "1" }
 { "vnc_tls" = "1" }
 { "vnc_tls_x509_cert_dir" = "/etc/pki/libvirt-vnc" }
+{ "vnc_tls_x509_secret_uuid" = "00000000-0000-0000-0000-000000000000" }
 { "vnc_tls_x509_verify" = "1" }
 { "vnc_password" = "XYZ12345" }
 { "vnc_sasl" = "1" }