From 0b6229df5b01887a77be08bbdcc9e83eb5e15e5a Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Thu, 24 Aug 2023 10:29:09 +0000 Subject: [PATCH] Add non-tls authentication --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 26626cb..6443580 100644 --- a/src/main.c +++ b/src/main.c @@ -740,7 +740,9 @@ int init_nvnc(struct wayvnc* self, const char* addr, uint16_t port, nvnc_set_name(self->nvnc, "WayVNC"); - if (self->cfg.enable_auth && + if (self->cfg.enable_auth && self->cfg.private_key_file[0] == '\0') { + nvnc_enable_auth2(self->nvnc, on_auth, self); + } else if (self->cfg.enable_auth && nvnc_enable_auth(self->nvnc, self->cfg.private_key_file, self->cfg.certificate_file, on_auth, self) < 0) { nvnc_log(NVNC_LOG_ERROR, "Failed to enable authentication");