OPENSSL_LIBS ?= -lssl -lcrypto
_LIBS += $(OPENSSL_LIBS)
- ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/aead.h),)
- OPENSSL := boringssl
- else
- # including libressl
- OPENSSL := openssl
- endif
-
ifneq ($(findstring -srp,$(CFG)),)
ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h),)
# OpenSSL 1.0.1 and later.
endif
endif
SSLLIBS += 1
-else ifneq ($(findstring -wolfssl,$(CFG)),)
+endif
+ifneq ($(findstring -wolfssl,$(CFG)),)
WOLFSSL_PATH ?= $(PROOT)/../wolfssl
CPPFLAGS += -DUSE_WOLFSSL
CPPFLAGS += -DSIZEOF_LONG_LONG=8
CPPFLAGS += -I"$(WOLFSSL_PATH)/include"
_LDFLAGS += -L"$(WOLFSSL_PATH)/lib"
_LIBS += -lwolfssl
- OPENSSL := wolfssl
SSLLIBS += 1
endif
ifneq ($(findstring -mbedtls,$(CFG)),)
CPPFLAGS += -DUSE_NGTCP2
CPPFLAGS += -I"$(NGTCP2_PATH)/include"
_LDFLAGS += -L"$(NGTCP2_PATH)/lib"
- ifneq ($(OPENSSL),)
- NGTCP2_LIBS ?= -lngtcp2_crypto_$(OPENSSL)
+
+ NGTCP2_LIBS ?=
+ ifeq ($(NGTCP2_LIBS),)
+ ifneq ($(findstring -ssl,$(CFG)),)
+ ifneq ($(wildcard $(OPENSSL_INCLUDE)/openssl/aead.h),)
+ NGTCP2_LIBS := -lngtcp2_crypto_boringssl
+ else # including libressl
+ NGTCP2_LIBS := -lngtcp2_crypto_openssl
+ endif
+ else ifneq ($(findstring -wolfssl,$(CFG)),)
+ NGTCP2_LIBS := -lngtcp2_crypto_wolfssl
+ endif
endif
+
_LIBS += -lngtcp2 $(NGTCP2_LIBS)
endif
#define NTLM_NEEDS_NSS_INIT
#endif
-#ifdef USE_WOLFSSL
+#if defined(USE_OPENSSL)
+# include <openssl/ssl.h>
+#elif defined(USE_WOLFSSL)
# include <wolfssl/options.h>
# include <wolfssl/openssl/ssl.h>
-#elif defined(USE_OPENSSL)
-# include <openssl/ssl.h>
#endif
/* Helpers to generate function byte arguments in little endian order */