Merge pull request #1610 from cesanta/http-restful-server

updated SSL build options
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2022-06-30 12:27:25 +01:00
commit 7fc57a3be7
2 files changed
+9 -8

No files matched your search

+8 -7
View File
@@ -1,12 +1,13 @@
PROG ?= example
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1
ifneq ($(MBEDTLS_DIR),)
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS_DIR)/include -I/usr/include
CFLAGS += -L$(MBEDTLS_DIR)/lib -lmbedtls -lmbedcrypto -lmbedx509
else ifneq ($(OPENSSL_DIR),)
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL_DIR)/include
CFLAGS += -L$(OPENSSL_DIR)/lib -lssl -lcrypto
SSL = ?
ifeq "$(SSL)" "MBEDTLS"
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
endif
ifeq "$(SSL)" "OPENSSL"
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
endif
all: $(PROG)
+1 -1
View File
@@ -9,7 +9,7 @@
// any other URI serves static files from s_root_dir
//
// To enable SSL/TLS (using self-signed certificates in PEM files),
// 1. make MBEDTLS_DIR=/path/to/your/mbedtls/installation
// 1. make SSL=OPENSSL or make SSL=MBEDTLS
// 2. curl -k https://127.0.0.1:8443
#include "mongoose.h"