mbedtls: TLS/crypto option (initial port)
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
772b9986a1
commit
ea571b808c
9 changed files with 7571 additions and 3 deletions
|
@ -757,6 +757,40 @@ endif
|
|||
CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), mbedtls)
|
||||
ifndef CONFIG_CRYPTO
|
||||
CONFIG_CRYPTO=mbedtls
|
||||
endif
|
||||
ifdef TLS_FUNCS
|
||||
OBJS += ../src/crypto/tls_mbedtls.o
|
||||
LIBS += -lmbedtls
|
||||
ifndef CONFIG_DPP
|
||||
LIBS += -lmbedx509
|
||||
endif
|
||||
endif
|
||||
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
SOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
ifdef NEED_FIPS186_2_PRF
|
||||
OBJS += ../src/crypto/fips_prf_internal.o
|
||||
SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
endif
|
||||
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||
ifdef CONFIG_DPP
|
||||
LIBS += -lmbedx509
|
||||
LIBS_h += -lmbedx509
|
||||
LIBS_n += -lmbedx509
|
||||
LIBS_s += -lmbedx509
|
||||
endif
|
||||
LIBS += -lmbedcrypto
|
||||
LIBS_h += -lmbedcrypto
|
||||
LIBS_n += -lmbedcrypto
|
||||
LIBS_s += -lmbedcrypto
|
||||
# XXX: create a config option?
|
||||
CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), gnutls)
|
||||
ifndef CONFIG_CRYPTO
|
||||
# default to libgcrypt
|
||||
|
@ -936,9 +970,11 @@ endif
|
|||
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-wrap.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_EAX
|
||||
AESOBJS += ../src/crypto/aes-eax.o
|
||||
NEED_AES_CTR=y
|
||||
|
@ -948,38 +984,48 @@ AESOBJS += ../src/crypto/aes-siv.o
|
|||
NEED_AES_CTR=y
|
||||
endif
|
||||
ifdef NEED_AES_CTR
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-ctr.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_ENCBLOCK
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-encblock.o
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-omac1.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_UNWRAP
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
NEED_AES_DEC=y
|
||||
AESOBJS += ../src/crypto/aes-unwrap.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_CBC
|
||||
NEED_AES_DEC=y
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-cbc.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_DEC
|
||||
ifdef CONFIG_INTERNAL_AES
|
||||
AESOBJS += ../src/crypto/aes-internal-dec.o
|
||||
|
@ -994,12 +1040,16 @@ ifneq ($(CONFIG_TLS), openssl)
|
|||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-prf.o
|
||||
endif
|
||||
ifdef CONFIG_INTERNAL_SHA1
|
||||
SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
ifdef NEED_FIPS186_2_PRF
|
||||
|
@ -1008,16 +1058,22 @@ endif
|
|||
endif
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-pbkdf2.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_T_PRF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-tprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_TLS_PRF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NEED_SHA1
|
||||
OBJS += $(SHA1OBJS)
|
||||
|
@ -1027,11 +1083,13 @@ ifneq ($(CONFIG_TLS), openssl)
|
|||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/md5.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NEED_MD5
|
||||
ifdef CONFIG_INTERNAL_MD5
|
||||
|
@ -1070,56 +1128,81 @@ ifneq ($(CONFIG_TLS), openssl)
|
|||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha256.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha256-prf.o
|
||||
endif
|
||||
ifdef CONFIG_INTERNAL_SHA256
|
||||
OBJS += ../src/crypto/sha256-internal.o
|
||||
endif
|
||||
ifdef NEED_TLS_PRF_SHA256
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha256-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_TLS_PRF_SHA384
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA256_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA256_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha256-kdf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA384_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA384_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384-kdf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA512_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA512_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512-kdf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_SHA384
|
||||
CFLAGS += -DCONFIG_SHA384
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384-prf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_SHA512
|
||||
CFLAGS += -DCONFIG_SHA512
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512-prf.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_INTERNAL_SHA384
|
||||
CFLAGS += -DCONFIG_INTERNAL_SHA384
|
||||
|
@ -1164,11 +1247,13 @@ HOBJS += $(SHA1OBJS)
|
|||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
HOBJS += ../src/crypto/md5.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_RADIUS_SERVER
|
||||
CFLAGS += -DRADIUS_SERVER
|
||||
|
@ -1342,7 +1427,9 @@ NOBJS += ../src/utils/trace.o
|
|||
endif
|
||||
|
||||
HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
HOBJS += ../src/crypto/aes-encblock.o
|
||||
endif
|
||||
ifdef CONFIG_INTERNAL_AES
|
||||
HOBJS += ../src/crypto/aes-internal.o
|
||||
HOBJS += ../src/crypto/aes-internal-enc.o
|
||||
|
@ -1365,13 +1452,17 @@ SOBJS += ../src/common/sae.o
|
|||
SOBJS += ../src/common/sae_pk.o
|
||||
SOBJS += ../src/common/dragonfly.o
|
||||
SOBJS += $(AESOBJS)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SOBJS += ../src/crypto/sha256-prf.o
|
||||
SOBJS += ../src/crypto/sha384-prf.o
|
||||
SOBJS += ../src/crypto/sha512-prf.o
|
||||
endif
|
||||
SOBJS += ../src/crypto/dh_groups.o
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SOBJS += ../src/crypto/sha256-kdf.o
|
||||
SOBJS += ../src/crypto/sha384-kdf.o
|
||||
SOBJS += ../src/crypto/sha512-kdf.o
|
||||
endif
|
||||
|
||||
_OBJS_VAR := NOBJS
|
||||
include ../src/objs.mk
|
||||
|
|
|
@ -6,9 +6,21 @@
|
|||
# just setting VARIABLE=n is not disabling that variable.
|
||||
#
|
||||
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
|
||||
# be modified from here. In most cass, these lines should use += in order not
|
||||
# be modified from here. In most cases, these lines should use += in order not
|
||||
# to override previous values of the variables.
|
||||
|
||||
|
||||
# Uncomment following two lines and fix the paths if you have installed TLS
|
||||
# libraries in a non-default location
|
||||
#CFLAGS += -I/usr/local/openssl/include
|
||||
#LIBS += -L/usr/local/openssl/lib
|
||||
|
||||
# Some Red Hat versions seem to include kerberos header files from OpenSSL, but
|
||||
# the kerberos files are not in the default include path. Following line can be
|
||||
# used to fix build issues on such systems (krb5.h not found).
|
||||
#CFLAGS += -I/usr/include/kerberos
|
||||
|
||||
|
||||
# Driver interface for Host AP driver
|
||||
CONFIG_DRIVER_HOSTAP=y
|
||||
|
||||
|
@ -281,6 +293,7 @@ CONFIG_IPV6=y
|
|||
# openssl = OpenSSL (default)
|
||||
# gnutls = GnuTLS
|
||||
# internal = Internal TLSv1 implementation (experimental)
|
||||
# mbedtls = mbed TLS
|
||||
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
|
||||
# none = Empty template
|
||||
#CONFIG_TLS=openssl
|
||||
|
|
4043
src/crypto/crypto_mbedtls.c
Normal file
4043
src/crypto/crypto_mbedtls.c
Normal file
File diff suppressed because it is too large
Load diff
3313
src/crypto/tls_mbedtls.c
Normal file
3313
src/crypto/tls_mbedtls.c
Normal file
File diff suppressed because it is too large
Load diff
24
tests/build/build-wpa_supplicant-mbedtls.config
Normal file
24
tests/build/build-wpa_supplicant-mbedtls.config
Normal file
|
@ -0,0 +1,24 @@
|
|||
CONFIG_TLS=mbedtls
|
||||
|
||||
CONFIG_WPS=y
|
||||
CONFIG_EAP_TLS=y
|
||||
CONFIG_EAP_MSCHAPV2=y
|
||||
|
||||
CONFIG_EAP_PSK=y
|
||||
CONFIG_EAP_GPSK=y
|
||||
CONFIG_EAP_AKA=y
|
||||
CONFIG_EAP_SIM=y
|
||||
CONFIG_EAP_SAKE=y
|
||||
CONFIG_EAP_PAX=y
|
||||
CONFIG_EAP_FAST=y
|
||||
CONFIG_EAP_IKEV2=y
|
||||
|
||||
CONFIG_SAE=y
|
||||
CONFIG_FILS=y
|
||||
CONFIG_FILS_SK_PFS=y
|
||||
CONFIG_OWE=y
|
||||
CONFIG_DPP=y
|
||||
CONFIG_SUITEB=y
|
||||
CONFIG_SUITEB192=y
|
||||
|
||||
CFLAGS += -Werror
|
|
@ -4,6 +4,7 @@ CONFIG_DRIVER_NONE=y
|
|||
CONFIG_DRIVER_NL80211=y
|
||||
CONFIG_RSN_PREAUTH=y
|
||||
|
||||
#CONFIG_TLS=mbedtls
|
||||
#CONFIG_TLS=internal
|
||||
#CONFIG_INTERNAL_LIBTOMMATH=y
|
||||
#CONFIG_INTERNAL_LIBTOMMATH_FAST=y
|
||||
|
@ -39,6 +40,9 @@ endif
|
|||
ifeq ($(CONFIG_TLS), wolfssl)
|
||||
CONFIG_EAP_PWD=y
|
||||
endif
|
||||
ifeq ($(CONFIG_TLS), mbedtls)
|
||||
CONFIG_EAP_PWD=y
|
||||
endif
|
||||
CONFIG_EAP_EKE=y
|
||||
CONFIG_PKCS12=y
|
||||
CONFIG_RADIUS_SERVER=y
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
CONFIG_TLS=openssl
|
||||
#CONFIG_TLS=wolfssl
|
||||
#CONFIG_TLS=mbedtls
|
||||
#CONFIG_TLS=internal
|
||||
#CONFIG_INTERNAL_LIBTOMMATH=y
|
||||
#CONFIG_INTERNAL_LIBTOMMATH_FAST=y
|
||||
|
@ -41,6 +42,9 @@ endif
|
|||
ifeq ($(CONFIG_TLS), wolfssl)
|
||||
CONFIG_EAP_PWD=y
|
||||
endif
|
||||
ifeq ($(CONFIG_TLS), mbedtls)
|
||||
CONFIG_EAP_PWD=y
|
||||
endif
|
||||
|
||||
CONFIG_USIM_SIMULATOR=y
|
||||
CONFIG_SIM_SIMULATOR=y
|
||||
|
|
|
@ -1230,6 +1230,29 @@ endif
|
|||
CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), mbedtls)
|
||||
ifndef CONFIG_CRYPTO
|
||||
CONFIG_CRYPTO=mbedtls
|
||||
endif
|
||||
ifdef TLS_FUNCS
|
||||
OBJS += ../src/crypto/tls_mbedtls.o
|
||||
LIBS += -lmbedtls -lmbedx509
|
||||
endif
|
||||
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
ifdef NEED_FIPS186_2_PRF
|
||||
OBJS += ../src/crypto/fips_prf_internal.o
|
||||
SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
endif
|
||||
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||
LIBS += -lmbedcrypto
|
||||
LIBS_p += -lmbedcrypto
|
||||
# XXX: create a config option?
|
||||
CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), gnutls)
|
||||
ifndef CONFIG_CRYPTO
|
||||
# default to libgcrypt
|
||||
|
@ -1422,9 +1445,11 @@ endif
|
|||
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
NEED_INTERNAL_AES_WRAP=y
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
|
||||
# Seems to be needed at least with BoringSSL
|
||||
NEED_INTERNAL_AES_WRAP=y
|
||||
|
@ -1438,9 +1463,11 @@ endif
|
|||
|
||||
ifdef NEED_INTERNAL_AES_WRAP
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-unwrap.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_EAX
|
||||
AESOBJS += ../src/crypto/aes-eax.o
|
||||
NEED_AES_CTR=y
|
||||
|
@ -1450,35 +1477,45 @@ AESOBJS += ../src/crypto/aes-siv.o
|
|||
NEED_AES_CTR=y
|
||||
endif
|
||||
ifdef NEED_AES_CTR
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-ctr.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_ENCBLOCK
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-encblock.o
|
||||
endif
|
||||
endif
|
||||
NEED_AES_ENC=y
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-omac1.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_WRAP
|
||||
NEED_AES_ENC=y
|
||||
ifdef NEED_INTERNAL_AES_WRAP
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-wrap.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_CBC
|
||||
NEED_AES_ENC=y
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
AESOBJS += ../src/crypto/aes-cbc.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_AES_ENC
|
||||
ifdef CONFIG_INTERNAL_AES
|
||||
AESOBJS += ../src/crypto/aes-internal-enc.o
|
||||
|
@ -1493,12 +1530,16 @@ ifneq ($(CONFIG_TLS), openssl)
|
|||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-prf.o
|
||||
endif
|
||||
ifdef CONFIG_INTERNAL_SHA1
|
||||
SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
ifdef NEED_FIPS186_2_PRF
|
||||
|
@ -1510,29 +1551,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
|
|||
else
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-pbkdf2.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_T_PRF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-tprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_TLS_PRF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA1OBJS += ../src/crypto/sha1-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef CONFIG_FIPS
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
MD5OBJS += ../src/crypto/md5.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_MD5
|
||||
ifdef CONFIG_INTERNAL_MD5
|
||||
MD5OBJS += ../src/crypto/md5-internal.o
|
||||
|
@ -1587,12 +1636,17 @@ ifneq ($(CONFIG_TLS), openssl)
|
|||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA256OBJS += ../src/crypto/sha256.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA256OBJS += ../src/crypto/sha256-prf.o
|
||||
endif
|
||||
ifdef CONFIG_INTERNAL_SHA256
|
||||
SHA256OBJS += ../src/crypto/sha256-internal.o
|
||||
endif
|
||||
|
@ -1605,50 +1659,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
|
|||
SHA256OBJS += ../src/crypto/sha512-internal.o
|
||||
endif
|
||||
ifdef NEED_TLS_PRF_SHA256
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA256OBJS += ../src/crypto/sha256-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_TLS_PRF_SHA384
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
SHA256OBJS += ../src/crypto/sha384-tlsprf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA256_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA256_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha256-kdf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA384_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA384_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384-kdf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_HMAC_SHA512_KDF
|
||||
CFLAGS += -DCONFIG_HMAC_SHA512_KDF
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512-kdf.o
|
||||
endif
|
||||
endif
|
||||
OBJS += $(SHA256OBJS)
|
||||
ifdef NEED_SHA384
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
CFLAGS += -DCONFIG_SHA384
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha384-prf.o
|
||||
endif
|
||||
endif
|
||||
ifdef NEED_SHA512
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), linux)
|
||||
ifneq ($(CONFIG_TLS), gnutls)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
CFLAGS += -DCONFIG_SHA512
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
OBJS += ../src/crypto/sha512-prf.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NEED_ASN1
|
||||
OBJS += ../src/tls/asn1.o
|
||||
|
@ -1823,10 +1895,12 @@ ifdef CONFIG_FIPS
|
|||
CFLAGS += -DCONFIG_FIPS
|
||||
ifneq ($(CONFIG_TLS), openssl)
|
||||
ifneq ($(CONFIG_TLS), wolfssl)
|
||||
ifneq ($(CONFIG_TLS), mbedtls)
|
||||
$(error CONFIG_FIPS=y requires CONFIG_TLS=openssl)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJS += $(SHA1OBJS) $(DESOBJS)
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# to override previous values of the variables.
|
||||
|
||||
|
||||
# Uncomment following two lines and fix the paths if you have installed OpenSSL
|
||||
# or GnuTLS in non-default location
|
||||
# Uncomment following two lines and fix the paths if you have installed TLS
|
||||
# libraries in a non-default location
|
||||
#CFLAGS += -I/usr/local/openssl/include
|
||||
#LIBS += -L/usr/local/openssl/lib
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
|||
# used to fix build issues on such systems (krb5.h not found).
|
||||
#CFLAGS += -I/usr/include/kerberos
|
||||
|
||||
|
||||
# Driver interface for generic Linux wireless extensions
|
||||
# Note: WEXT is deprecated in the current Linux kernel version and no new
|
||||
# functionality is added to it. nl80211-based interface is the new
|
||||
|
@ -329,6 +330,7 @@ CONFIG_BACKEND=file
|
|||
# openssl = OpenSSL (default)
|
||||
# gnutls = GnuTLS
|
||||
# internal = Internal TLSv1 implementation (experimental)
|
||||
# mbedtls = mbed TLS
|
||||
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
|
||||
# none = Empty template
|
||||
#CONFIG_TLS=openssl
|
||||
|
|
Loading…
Add table
Reference in a new issue