mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
turn off ltls by default
This commit is contained in:
12
Makefile
12
Makefile
@@ -17,7 +17,13 @@ LUA_INC ?= 3rd/lua
|
|||||||
$(LUA_STATICLIB) :
|
$(LUA_STATICLIB) :
|
||||||
cd 3rd/lua && $(MAKE) CC='$(CC) -std=gnu99' $(PLAT)
|
cd 3rd/lua && $(MAKE) CC='$(CC) -std=gnu99' $(PLAT)
|
||||||
|
|
||||||
# jemalloc
|
# https : turn on TLS_MODULE to add https support
|
||||||
|
|
||||||
|
# TLS_MODULE=ltls
|
||||||
|
TLS_LIB=
|
||||||
|
TLS_INC=
|
||||||
|
|
||||||
|
# jemalloc
|
||||||
|
|
||||||
JEMALLOC_STATICLIB := 3rd/jemalloc/lib/libjemalloc_pic.a
|
JEMALLOC_STATICLIB := 3rd/jemalloc/lib/libjemalloc_pic.a
|
||||||
JEMALLOC_INC := 3rd/jemalloc/include/jemalloc
|
JEMALLOC_INC := 3rd/jemalloc/include/jemalloc
|
||||||
@@ -47,7 +53,7 @@ update3rd :
|
|||||||
CSERVICE = snlua logger gate harbor
|
CSERVICE = snlua logger gate harbor
|
||||||
LUA_CLIB = skynet \
|
LUA_CLIB = skynet \
|
||||||
client \
|
client \
|
||||||
bson md5 sproto lpeg ltls
|
bson md5 sproto lpeg $(TLS_MODULE)
|
||||||
|
|
||||||
LUA_CLIB_SKYNET = \
|
LUA_CLIB_SKYNET = \
|
||||||
lua-skynet.c lua-seri.c \
|
lua-skynet.c lua-seri.c \
|
||||||
@@ -107,7 +113,7 @@ $(LUA_CLIB_PATH)/sproto.so : lualib-src/sproto/sproto.c lualib-src/sproto/lsprot
|
|||||||
$(CC) $(CFLAGS) $(SHARED) -Ilualib-src/sproto $^ -o $@
|
$(CC) $(CFLAGS) $(SHARED) -Ilualib-src/sproto $^ -o $@
|
||||||
|
|
||||||
$(LUA_CLIB_PATH)/ltls.so : lualib-src/ltls.c | $(LUA_CLIB_PATH)
|
$(LUA_CLIB_PATH)/ltls.so : lualib-src/ltls.c | $(LUA_CLIB_PATH)
|
||||||
$(CC) $(CFLAGS) $(SHARED) -Iskynet-src -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include $^ -o $@ -lssl
|
$(CC) $(CFLAGS) $(SHARED) -Iskynet-src $(TLS_LIB) $(TLS_INC) $^ -o $@ -lssl
|
||||||
|
|
||||||
$(LUA_CLIB_PATH)/lpeg.so : 3rd/lpeg/lpcap.c 3rd/lpeg/lpcode.c 3rd/lpeg/lpprint.c 3rd/lpeg/lptree.c 3rd/lpeg/lpvm.c | $(LUA_CLIB_PATH)
|
$(LUA_CLIB_PATH)/lpeg.so : 3rd/lpeg/lpcap.c 3rd/lpeg/lpcode.c 3rd/lpeg/lpprint.c 3rd/lpeg/lptree.c 3rd/lpeg/lpvm.c | $(LUA_CLIB_PATH)
|
||||||
$(CC) $(CFLAGS) $(SHARED) -I3rd/lpeg $^ -o $@
|
$(CC) $(CFLAGS) $(SHARED) -I3rd/lpeg $^ -o $@
|
||||||
|
|||||||
@@ -394,7 +394,6 @@ void __attribute__((constructor)) ltls_init(void) {
|
|||||||
|
|
||||||
void __attribute__((destructor)) ltls_destory(void) {
|
void __attribute__((destructor)) ltls_destory(void) {
|
||||||
if(TLS_IS_INIT) {
|
if(TLS_IS_INIT) {
|
||||||
ERR_remove_state(0);
|
|
||||||
ENGINE_cleanup();
|
ENGINE_cleanup();
|
||||||
CONF_modules_unload(1);
|
CONF_modules_unload(1);
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
|
|||||||
@@ -29,8 +29,12 @@ end
|
|||||||
local function main()
|
local function main()
|
||||||
dns.server()
|
dns.server()
|
||||||
http_test("http")
|
http_test("http")
|
||||||
print("---------")
|
|
||||||
http_test("https")
|
if not pcall(require,"ltls") then
|
||||||
|
print "No ltls module, https is not supported"
|
||||||
|
else
|
||||||
|
http_test("https")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
skynet.start(function()
|
skynet.start(function()
|
||||||
|
|||||||
Reference in New Issue
Block a user