From 80cd18781b34cb7012ae52640d9ccbf0e8e8bb6c Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sat, 23 Oct 2021 21:41:13 +0200 Subject: [PATCH] Add WITH_BORINGSSL build flag --- Makefile | 20 +++++++++++++------- uSockets | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ac18361..c0a2a46 100644 --- a/Makefile +++ b/Makefile @@ -17,14 +17,20 @@ ifeq ($(WITH_LIBDEFLATE),1) override LDFLAGS += libdeflate/libdeflate.a endif -# WITH_OPENSSL=1 enables OpenSSL 1.1+ support -ifeq ($(WITH_OPENSSL),1) - # With problems on macOS, make sure to pass needed LDFLAGS required to find these - override LDFLAGS += -lssl -lcrypto +# Heavily prefer boringssl over openssl +ifeq ($(WITH_BORINGSSL),1) + override CFLAGS += -I uSockets/boringssl/include -pthread -DLIBUS_USE_OPENSSL + override LDFLAGS += -pthread uSockets/boringssl/build/ssl/libssl.a uSockets/boringssl/build/crypto/libcrypto.a else - # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) - ifeq ($(WITH_WOLFSSL),1) - override LDFLAGS += -L/usr/local/lib -lwolfssl + # WITH_OPENSSL=1 enables OpenSSL 1.1+ support + ifeq ($(WITH_OPENSSL),1) + # With problems on macOS, make sure to pass needed LDFLAGS required to find these + override LDFLAGS += -lssl -lcrypto + else + # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) + ifeq ($(WITH_WOLFSSL),1) + override LDFLAGS += -L/usr/local/lib -lwolfssl + endif endif endif diff --git a/uSockets b/uSockets index c258d02..c2c1bbf 160000 --- a/uSockets +++ b/uSockets @@ -1 +1 @@ -Subproject commit c258d0291f8e2762976c6a3af985ddfae6b982d6 +Subproject commit c2c1bbfa1644f1f6eb7fc9375650f41c5f9b7b06