diff mbox series

[V3,19/21] mongoose: Use mg_file_read for cert/key

Message ID 20240709111440.8215-20-Michael.Glembotzki@iris-sensing.com
State Accepted
Headers show
Series mongoose: Update to version 7.14 | expand

Commit Message

Michael Glembotzki July 9, 2024, 11:08 a.m. UTC
The specification of the cert/key path has been changed. The key/cert
content is now expected as mg_str in tls_opts.cert/tls_opts.key.

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index 2fed8bcd..b47b9f55 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -900,8 +900,8 @@  int start_mongoose(const char *cfgfname, int argc, char *argv[])
 
 #if MG_TLS
 	if (ssl) {
-		tls_opts.cert = opts.ssl_cert;
-		tls_opts.certkey = opts.ssl_key;
+		tls_opts.cert = mg_file_read(&mg_fs_posix, opts.ssl_cert);
+		tls_opts.key = mg_file_read(&mg_fs_posix, opts.ssl_key);
 	}
 #endif