Replace CONFIG_NO_AES_EXTRAS with auto-detection during build

There is no need to do this manually since it is possible to figure
out automatically which AES extra files need to be included in the
build.
This commit is contained in:
Jouni Malinen 2009-10-11 22:23:50 +03:00
parent 34c9910dc7
commit bd4e9d033b
3 changed files with 34 additions and 12 deletions

View file

@ -190,6 +190,7 @@ ifdef CONFIG_EAP_SIM
CFLAGS += -DEAP_SERVER_SIM CFLAGS += -DEAP_SERVER_SIM
OBJS += ../src/eap_server/eap_sim.o OBJS += ../src/eap_server/eap_sim.o
CONFIG_EAP_SIM_COMMON=y CONFIG_EAP_SIM_COMMON=y
NEED_AES_CBC=y
endif endif
ifdef CONFIG_EAP_AKA ifdef CONFIG_EAP_AKA
@ -197,6 +198,7 @@ CFLAGS += -DEAP_SERVER_AKA
OBJS += ../src/eap_server/eap_aka.o OBJS += ../src/eap_server/eap_aka.o
CONFIG_EAP_SIM_COMMON=y CONFIG_EAP_SIM_COMMON=y
NEED_SHA256=y NEED_SHA256=y
NEED_AES_CBC=y
endif endif
ifdef CONFIG_EAP_AKA_PRIME ifdef CONFIG_EAP_AKA_PRIME
@ -220,6 +222,9 @@ endif
ifdef CONFIG_EAP_PSK ifdef CONFIG_EAP_PSK
CFLAGS += -DEAP_SERVER_PSK CFLAGS += -DEAP_SERVER_PSK
OBJS += ../src/eap_server/eap_psk.o ../src/eap_common/eap_psk_common.o OBJS += ../src/eap_server/eap_psk.o ../src/eap_common/eap_psk_common.o
NEED_AES_OMAC1=y
NEED_AES_ENCBLOCK=y
NEED_AES_EAX=y
endif endif
ifdef CONFIG_EAP_SAKE ifdef CONFIG_EAP_SAKE
@ -234,6 +239,7 @@ ifdef CONFIG_EAP_GPSK_SHA256
CFLAGS += -DEAP_SERVER_GPSK_SHA256 CFLAGS += -DEAP_SERVER_GPSK_SHA256
endif endif
NEED_SHA256=y NEED_SHA256=y
NEED_AES_OMAC1=y
endif endif
ifdef CONFIG_EAP_VENDOR_TEST ifdef CONFIG_EAP_VENDOR_TEST
@ -518,13 +524,20 @@ AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o
endif endif
AESOBJS += ../src/crypto/aes-wrap.o AESOBJS += ../src/crypto/aes-wrap.o
ifndef CONFIG_NO_AES_EXTRAS ifdef NEED_AES_EAX
NEED_AES_CBC=y
AESOBJS += ../src/crypto/aes-cbc.o
AESOBJS += ../src/crypto/aes-ctr.o
AESOBJS += ../src/crypto/aes-eax.o AESOBJS += ../src/crypto/aes-eax.o
NEED_AES_CTR=y
endif
ifdef NEED_AES_CTR
AESOBJS += ../src/crypto/aes-ctr.o
endif
ifdef NEED_AES_ENCBLOCK
AESOBJS += ../src/crypto/aes-encblock.o AESOBJS += ../src/crypto/aes-encblock.o
endif
ifdef NEED_AES_OMAC1
AESOBJS += ../src/crypto/aes-omac1.o AESOBJS += ../src/crypto/aes-omac1.o
endif
ifdef NEED_AES_UNWRAP
AESOBJS += ../src/crypto/aes-unwrap.o AESOBJS += ../src/crypto/aes-unwrap.o
endif endif
ifdef NEED_AES_CBC ifdef NEED_AES_CBC

View file

@ -320,6 +320,7 @@ OBJS_h += ../src/eap_server/eap_sim.o
endif endif
CONFIG_IEEE8021X_EAPOL=y CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_SIM_COMMON=y CONFIG_EAP_SIM_COMMON=y
NEED_AES_CBC=y
endif endif
ifdef CONFIG_EAP_LEAP ifdef CONFIG_EAP_LEAP
@ -347,6 +348,9 @@ OBJS_h += ../src/eap_server/eap_psk.o
endif endif
CONFIG_IEEE8021X_EAPOL=y CONFIG_IEEE8021X_EAPOL=y
NEED_AES=y NEED_AES=y
NEED_AES_OMAC1=y
NEED_AES_ENCBLOCK=y
NEED_AES_EAX=y
endif endif
ifdef CONFIG_EAP_AKA ifdef CONFIG_EAP_AKA
@ -361,6 +365,7 @@ OBJS_h += ../src/eap_server/eap_aka.o
endif endif
CONFIG_IEEE8021X_EAPOL=y CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_SIM_COMMON=y CONFIG_EAP_SIM_COMMON=y
NEED_AES_CBC=y
endif endif
ifdef CONFIG_EAP_AKA_PRIME ifdef CONFIG_EAP_AKA_PRIME
@ -438,6 +443,7 @@ ifdef CONFIG_EAP_GPSK_SHA256
CFLAGS += -DEAP_GPSK_SHA256 CFLAGS += -DEAP_GPSK_SHA256
endif endif
NEED_SHA256=y NEED_SHA256=y
NEED_AES_OMAC1=y
endif endif
ifdef CONFIG_WPS ifdef CONFIG_WPS
@ -869,12 +875,20 @@ AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o
endif endif
AESOBJS += ../src/crypto/aes-unwrap.o AESOBJS += ../src/crypto/aes-unwrap.o
ifndef CONFIG_NO_AES_EXTRAS ifdef NEED_AES_EAX
NEED_AES_CBC=y
AESOBJS += ../src/crypto/aes-ctr.o
AESOBJS += ../src/crypto/aes-eax.o AESOBJS += ../src/crypto/aes-eax.o
NEED_AES_CTR=y
endif
ifdef NEED_AES_CTR
AESOBJS += ../src/crypto/aes-ctr.o
endif
ifdef NEED_AES_ENCBLOCK
AESOBJS += ../src/crypto/aes-encblock.o AESOBJS += ../src/crypto/aes-encblock.o
endif
ifdef NEED_AES_OMAC1
AESOBJS += ../src/crypto/aes-omac1.o AESOBJS += ../src/crypto/aes-omac1.o
endif
ifdef NEED_AES_WRAP
AESOBJS += ../src/crypto/aes-wrap.o AESOBJS += ../src/crypto/aes-wrap.o
endif endif
ifdef NEED_AES_CBC ifdef NEED_AES_CBC

View file

@ -243,11 +243,6 @@ CONFIG_CTRL_IFACE=y
# wpa_passphrase). This saves about 0.5 kB in code size. # wpa_passphrase). This saves about 0.5 kB in code size.
#CONFIG_NO_WPA_PASSPHRASE=y #CONFIG_NO_WPA_PASSPHRASE=y
# Remove AES extra functions. This can be used to reduce code size by about
# 1.5 kB by removing extra AES modes that are not needed for commonly used
# client configurations (they are needed for some EAP types).
#CONFIG_NO_AES_EXTRAS=y
# Disable scan result processing (ap_mode=1) to save code size by about 1 kB. # Disable scan result processing (ap_mode=1) to save code size by about 1 kB.
# This can be used if ap_scan=1 mode is never enabled. # This can be used if ap_scan=1 mode is never enabled.
#CONFIG_NO_SCAN_PROCESSING=y #CONFIG_NO_SCAN_PROCESSING=y