Added CONFIG_NO_AES_EXTRAS for hostapd
This allows unneeded AES routines to be removed from the build to reduce binary size.
This commit is contained in:
parent
bc521fac13
commit
03ba2cb4c6
2 changed files with 12 additions and 0 deletions
|
@ -528,6 +528,14 @@ ifdef CONFIG_NO_STDOUT_DEBUG
|
|||
CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NO_AES_EXTRAS
|
||||
CFLAGS += -DCONFIG_NO_AES_UNWRAP
|
||||
CFLAGS += -DCONFIG_NO_AES_CTR -DCONFIG_NO_AES_OMAC1
|
||||
CFLAGS += -DCONFIG_NO_AES_EAX -DCONFIG_NO_AES_CBC
|
||||
CFLAGS += -DCONFIG_NO_AES_DECRYPT
|
||||
CFLAGS += -DCONFIG_NO_AES_ENCRYPT_BLOCK
|
||||
endif
|
||||
|
||||
ALL=hostapd hostapd_cli
|
||||
|
||||
all: verify_config $(ALL)
|
||||
|
|
|
@ -86,6 +86,8 @@ int aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher)
|
|||
#endif /* CONFIG_NO_AES_WRAP */
|
||||
|
||||
|
||||
#ifndef CONFIG_NO_AES_UNWRAP
|
||||
|
||||
/**
|
||||
* aes_unwrap - Unwrap key with AES Key Wrap Algorithm (128-bit KEK) (RFC3394)
|
||||
* @kek: Key encryption key (KEK)
|
||||
|
@ -145,6 +147,8 @@ int aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NO_AES_UNWRAP */
|
||||
|
||||
|
||||
#define BLOCK_SIZE 16
|
||||
|
||||
|
|
Loading…
Reference in a new issue