summaryrefslogtreecommitdiff
path: root/src/compositor-rdp.c
diff options
context:
space:
mode:
authorDavid FORT <contact@hardening-consulting.com>2015-05-19 09:57:37 +0200
committerDavid FORT <contact@hardening-consulting.com>2015-05-21 09:07:59 +0200
commitab3298a976502a312d5796edb890d001d6bb73a1 (patch)
tree0a684b8f16f52ff3dd784d0253c07cb4db07d6a4 /src/compositor-rdp.c
parentb7e70af346af7354a8f95ef97b3b34931c9fe6a1 (diff)
downloadweston-ab3298a976502a312d5796edb890d001d6bb73a1.tar.gz
RDP compositor: enforce certificate and key
The RDP compositor is usable without certificates and key in a very limited number of cases (local usage using xfreerdp), so let's force the presence of keys and certificates. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/compositor-rdp.c')
-rw-r--r--src/compositor-rdp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 3185141f..4091bace 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -1263,5 +1263,11 @@ backend_init(struct wl_display *display, int *argc, char *argv[],
};
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
+ if (!config.rdp_key && (!config.server_cert || !config.server_key)) {
+ weston_log("the RDP compositor requires keys and an optional certificate for RDP or TLS security ("
+ "--rdp4-key or --rdp-tls-cert/--rdp-tls-key)\n");
+ return NULL;
+ }
+
return rdp_compositor_create(display, &config, argc, argv, wconfig);
}