mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-26 20:38:25 +00:00
Merge pull request #1610 from cesanta/http-restful-server
updated SSL build options
This commit is contained in:
2 files changed
+9
-8
No files matched your search
@@ -1,12 +1,13 @@
|
|||||||
PROG ?= example
|
PROG ?= example
|
||||||
|
|
||||||
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1
|
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1
|
||||||
ifneq ($(MBEDTLS_DIR),)
|
SSL = ?
|
||||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS_DIR)/include -I/usr/include
|
|
||||||
CFLAGS += -L$(MBEDTLS_DIR)/lib -lmbedtls -lmbedcrypto -lmbedx509
|
ifeq "$(SSL)" "MBEDTLS"
|
||||||
else ifneq ($(OPENSSL_DIR),)
|
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
||||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL_DIR)/include
|
endif
|
||||||
CFLAGS += -L$(OPENSSL_DIR)/lib -lssl -lcrypto
|
|
||||||
|
ifeq "$(SSL)" "OPENSSL"
|
||||||
|
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// any other URI serves static files from s_root_dir
|
// any other URI serves static files from s_root_dir
|
||||||
//
|
//
|
||||||
// To enable SSL/TLS (using self-signed certificates in PEM files),
|
// 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
|
// 2. curl -k https://127.0.0.1:8443
|
||||||
|
|
||||||
#include "mongoose.h"
|
#include "mongoose.h"
|
||||||
|
|||||||
Reference in new issue
Block a user