Skip to content

Commit 48b7a5c

Browse files
authored
24H1 Updates (#25)
1 parent 8ca63ef commit 48b7a5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+7292
-3289
lines changed

80s.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ if [ "$(uname -o)" = "Msys" ]; then
7171
LIBS="$LIBS -lws2_32 -lmswsock -lcrypt32"
7272
fi
7373

74-
if [ ! -z "$DEBUG_LEVEL" ]; then
75-
DEFINES="$DEFINES -S80_DEBUG_LEVEL=$DEBUG_LEVEL"
74+
if [ "$DEBUG" = "true" ]; then
75+
DEFINES="$DEFINES -DS80_DEBUG=1"
7676
FLAGS="-O2 -ggdb"
7777
fi
7878

90s.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mkdir -p bin
2121
mkdir -p bin/obj
2222

2323
DEFINES="-DS90_SHARED_ORM"
24-
LIBS="-lm -ldl -lpthread -lcrypto -lssl"
24+
LIBS="-lm -ldl -lpthread -lcrypto -lssl -lz -lresolv"
2525

2626
if [ "$(uname -o)" = "Msys" ]; then
2727
SO_EXT="dll"
@@ -30,9 +30,9 @@ if [ "$(uname -o)" = "Msys" ]; then
3030
LIBS="$LIBS -lws2_32 -lmswsock -lcrypt32 -liconv"
3131
fi
3232

33-
if [ "$DEBUG" = "true" ]; then
34-
DEFINES="$DEFINES -DS80_DEBUG=1"
35-
FLAGS="-O2 -ggdb"
33+
if [ ! -z "$DEBUG_LEVEL" ]; then
34+
DEFINES="$DEFINES -DS80_DEBUG_LEVEL=$DEBUG_LEVEL"
35+
FLAGS="-O0 -ggdb"
3636
else
3737
FLAGS="$FLAGS -march=native"
3838
fi
@@ -142,13 +142,15 @@ if [ "$arg" = "pages" ]; then
142142
fi
143143
else
144144
echo "Compiling 90s web server"
145-
FLAGS="$FLAGS $DEFINES"
146-
xmake "$CXX" "$FLAGS" "$LIBS" "bin/lib80s.a" "$OUT" \
147-
src/90s/90s.cpp src/90s/afd.cpp src/90s/context.cpp \
148-
src/90s/httpd/environment.cpp src/90s/httpd/render_context.cpp src/90s/httpd/server.cpp \
149-
src/90s/util/util.cpp \
150-
src/90s/sql/mysql.cpp src/90s/sql/mysql_util.cpp \
151-
src/90s/mail/server.cpp src/90s/mail/parser.cpp src/90s/mail/indexed_mail_storage.cpp \
152-
src/90s/dns/doh.cpp \
153-
src/90s/mail/client.cpp
145+
FLAGS="$FLAGS $DEFINES"
146+
xmake "$CXX" "$FLAGS" "$LIBS" "bin/lib80s.a" "$OUT" \
147+
src/90s/90s.cpp src/90s/afd.cpp src/90s/context.cpp \
148+
src/90s/httpd/environment.cpp src/90s/httpd/render_context.cpp src/90s/httpd/server.cpp \
149+
src/90s/util/util.cpp \
150+
src/90s/sql/mysql.cpp src/90s/sql/mysql_util.cpp \
151+
src/90s/storage/disk_storage.cpp\
152+
src/90s/dns/doh.cpp \
153+
src/90s/dns/resolv.cpp \
154+
src/90s/httpd/client.cpp \
155+
src/90s/actors/actor.cpp
154156
fi

aio/aio.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ end
630630
--- @param fd aiosocket AIO socket to be handled
631631
--- @param ssl lightuserdata global SSL context
632632
--- @param client string|nil true host name if client connection
633+
--- @param skip_tls_verify boolean skip TLS host verification
633634
--- @return aiopromise<aiosocket|{error: string}> connection established promise
634-
function aio:wrap_tls(fd, ssl, client)
635+
function aio:wrap_tls(fd, ssl, client, skip_tls_verify)
635636
local resolve, resolver = aio:prepare_promise()
636637
local on_close = fd.on_close
637638
local raw_write = fd.write
@@ -641,7 +642,7 @@ function aio:wrap_tls(fd, ssl, client)
641642
if not fd.bio then
642643
local bio = nil
643644
if client then
644-
bio = crypto.ssl_bio_new_connect(ssl, client, fd.elfd, fd.fd, KTLS)
645+
bio = crypto.ssl_bio_new_connect(ssl, skip_tls_verify and nil or client, fd.elfd, fd.fd, KTLS)
645646
else
646647
bio = crypto.ssl_bio_new(ssl, fd.elfd, fd.fd, KTLS)
647648
end

0 commit comments

Comments
 (0)