[PATCH 2/2] RDP compositor: enforce certificate and key

David FORT rdp.effort at gmail.com
Tue May 19 01:07:40 PDT 2015


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.
---
 src/compositor-rdp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index f1dcda0..261fa4b 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -1278,5 +1278,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);
 }
-- 
1.9.1



More information about the wayland-devel mailing list