Fix TLS build

This commit is contained in:
cpq committed 2021-02-13 10:45:27 +00:00
1 parent d5a1d5a5e8
commit 51e3a1304b
2 files changed
+3 -4

No files matched your search

+2 -2
View File
@@ -2,8 +2,8 @@ PROG ?= example
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA)
ifneq ($(MBEDTLS),)
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS_DIR)/include -I/usr/include
CFLAGS += -L$(MBEDTLS_DIR)/lib -lmbedtls -lmbedcrypto -lmbedx509
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
CFLAGS += -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
endif
ifneq ($(OPENSSL),)
+1 -2
View File
@@ -22,8 +22,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
// If s_url is https://, tell client connection to use TLS
if (mg_url_is_ssl(s_url)) {
// struct mg_tls_opts opts = {.ca = "ca.pem", .srvname = host};
struct mg_tls_opts opts = {.ca = "ca.pem", .srvname = mg_str("x")};
struct mg_tls_opts opts = {.ca = "ca.pem", .srvname = host};
mg_tls_init(c, &opts);
}