frontend: Add tls-cert and tls-key config options

Add tls-cert and tls-key config options in the [rdp] and [vnc] sections
in weston.ini. This allows to statically configure the TLS key and
certificate files instead of requiring them to be supplied via command
line arguments.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Philipp Zabel 2023-07-11 13:54:50 +02:00 committed by Daniel Stone
parent daac6fc91d
commit 19a715b348
1 changed files with 10 additions and 0 deletions

View File

@ -3341,6 +3341,11 @@ load_rdp_backend(struct weston_compositor *c,
weston_config_section_get_int(section, "refresh-rate",
&config.refresh_rate,
RDP_DEFAULT_FREQ);
weston_config_section_get_string(section, "tls-cert",
&config.server_cert,
config.server_cert);
weston_config_section_get_string(section, "tls-key",
&config.server_key, config.server_key);
wet->heads_changed_listener.notify = rdp_heads_changed;
weston_compositor_add_heads_changed_listener(c,
@ -3443,6 +3448,11 @@ load_vnc_backend(struct weston_compositor *c,
weston_config_section_get_int(section, "refresh-rate",
&config.refresh_rate,
VNC_DEFAULT_FREQ);
weston_config_section_get_string(section, "tls-cert",
&config.server_cert,
config.server_cert);
weston_config_section_get_string(section, "tls-key",
&config.server_key, config.server_key);
ret = weston_compositor_load_backend(c, WESTON_BACKEND_VNC,
&config.base);