]>
Commit | Line | Data |
---|---|---|
23102ed6 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
95259824 WB |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> |
3 | Date: Wed, 9 Dec 2015 14:33:34 +0100 | |
23102ed6 | 4 | Subject: [PATCH] ui/spice: default to pve certs unless otherwise specified |
95259824 WB |
5 | |
6 | --- | |
7 | ui/spice-core.c | 15 +++++++++------ | |
8 | 1 file changed, 9 insertions(+), 6 deletions(-) | |
9 | ||
10 | diff --git a/ui/spice-core.c b/ui/spice-core.c | |
6838f038 | 11 | index 05f5958b14..6e1a46d1e5 100644 |
95259824 WB |
12 | --- a/ui/spice-core.c |
13 | +++ b/ui/spice-core.c | |
6838f038 | 14 | @@ -684,32 +684,35 @@ void qemu_spice_init(void) |
95259824 WB |
15 | |
16 | if (tls_port) { | |
17 | x509_dir = qemu_opt_get(opts, "x509-dir"); | |
18 | - if (!x509_dir) { | |
19 | - x509_dir = "."; | |
20 | - } | |
21 | ||
22 | str = qemu_opt_get(opts, "x509-key-file"); | |
23 | if (str) { | |
24 | x509_key_file = g_strdup(str); | |
25 | - } else { | |
26 | + } else if (x509_dir) { | |
27 | x509_key_file = g_strdup_printf("%s/%s", x509_dir, | |
28 | X509_SERVER_KEY_FILE); | |
29 | + } else { | |
30 | + x509_key_file = g_strdup("/etc/pve/local/pve-ssl.key"); | |
31 | } | |
32 | ||
33 | str = qemu_opt_get(opts, "x509-cert-file"); | |
34 | if (str) { | |
35 | x509_cert_file = g_strdup(str); | |
36 | - } else { | |
37 | + } else if (x509_dir) { | |
38 | x509_cert_file = g_strdup_printf("%s/%s", x509_dir, | |
39 | X509_SERVER_CERT_FILE); | |
40 | + } else { | |
41 | + x509_cert_file = g_strdup("/etc/pve/local/pve-ssl.pem"); | |
42 | } | |
43 | ||
44 | str = qemu_opt_get(opts, "x509-cacert-file"); | |
45 | if (str) { | |
46 | x509_cacert_file = g_strdup(str); | |
47 | - } else { | |
48 | + } else if (x509_dir) { | |
49 | x509_cacert_file = g_strdup_printf("%s/%s", x509_dir, | |
50 | X509_CA_CERT_FILE); | |
51 | + } else { | |
52 | + x509_cacert_file = g_strdup("/etc/pve/pve-root-ca.pem"); | |
53 | } | |
54 | ||
55 | x509_key_password = qemu_opt_get(opts, "x509-key-password"); | |
56 | -- | |
45169293 | 57 | 2.11.0 |
95259824 | 58 |