Include HMAC-SHA384/512 KDF for SAE if SHA384/512 is included

It was possible to miss the HMAC functions if some other build
configuration parameters ended up setting NEED_SHA384/512=y.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-04-17 12:28:41 +03:00
parent 3a759dcc8c
commit c7f71fb867
2 changed files with 22 additions and 0 deletions

View file

@ -1361,6 +1361,17 @@ endif
endif
endif
ifdef CONFIG_SAE
ifdef NEED_SHA384
# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
NEED_HMAC_SHA384_KDF=y
endif
ifdef NEED_SHA512
# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
NEED_HMAC_SHA512_KDF=y
endif
endif
SHA256OBJS = # none by default
L_CFLAGS += -DCONFIG_SHA256
ifneq ($(CONFIG_TLS), openssl)

View file

@ -1475,6 +1475,17 @@ endif
endif
endif
ifdef CONFIG_SAE
ifdef NEED_SHA384
# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
NEED_HMAC_SHA384_KDF=y
endif
ifdef NEED_SHA512
# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
NEED_HMAC_SHA512_KDF=y
endif
endif
SHA256OBJS = # none by default
CFLAGS += -DCONFIG_SHA256
ifneq ($(CONFIG_TLS), openssl)