diff mbox series

[21/23] mongoose: Use mg_file_read for cert/key

Message ID 20240612144010.470339-22-Michael.Glembotzki@iris-sensing.com
State Changes Requested
Headers show
Series Update Mongoose Version to 7.14 | expand

Commit Message

Michael Glembotzki June 12, 2024, 2:36 p.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 ba69a9bf..fb052ad3 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -904,8 +904,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