diff mbox series

suricatta: Fix nocheckcert configuration

Message ID 20240817092314.171600-1-ezra@easyb.ch
State Accepted
Headers show
Series suricatta: Fix nocheckcert configuration | expand

Commit Message

Ezra Buehler Aug. 17, 2024, 9:23 a.m. UTC
From: Ezra Buehler <ezra.buehler@husqvarnagroup.com>

Without this change, setting `nocheckcert = true`, as found in
examples/configuration/swupdate.cfg, has no effect.

Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com>
---
 corelib/server_utils.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/corelib/server_utils.c b/corelib/server_utils.c
index e3842563..95b72a4f 100644
--- a/corelib/server_utils.c
+++ b/corelib/server_utils.c
@@ -19,6 +19,7 @@ 
 int channel_settings(void *elem, void *data)
 {
 	char tmp[128];
+	bool tmp_bool;
 	channel_data_t *chan = (channel_data_t *)data;
 
 	GET_FIELD_INT(LIBCFG_PARSER, elem, "retry",
@@ -35,6 +36,8 @@  int channel_settings(void *elem, void *data)
 	if (strlen(tmp))
 		chan->retry_sleep =
 			(unsigned int)strtoul(tmp, NULL, 10);
+	GET_FIELD_BOOL(LIBCFG_PARSER, elem, "nocheckcert", &tmp_bool);
+	chan->strictssl = !tmp_bool;
 	GET_FIELD_STRING_RESET(LIBCFG_PARSER, elem, "cafile", tmp);
 	if (strlen(tmp))
 		SETSTRING(chan->cafile, tmp);