diff --git a/examples/http-client/Makefile b/examples/http-client/Makefile index 5155a48e..a3a3a1f5 100644 --- a/examples/http-client/Makefile +++ b/examples/http-client/Makefile @@ -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),) diff --git a/examples/http-client/main.c b/examples/http-client/main.c index ab50c4f4..f75c2164 100644 --- a/examples/http-client/main.c +++ b/examples/http-client/main.c @@ -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); }