diff mbox series

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

Message ID 2Mh.ZcZX.2xYhMLCP}}Q.1cvhaM@seznam.cz
State New
Headers show
Series Include HMAC-SHA384/512 KDF for SAE if SHA384/512 is included | expand

Commit Message

Tomas Paukrt Sept. 15, 2024, 10:38 a.m. UTC
It was possible to miss the HMAC functions if some other build
configuration parameters ended up setting NEED_SHA384/512=y.

Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
---
 hostapd/Android.mk | 11 +++++++++++
 hostapd/Makefile   | 11 +++++++++++
 2 files changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 573564d..e6c2fbf 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -936,6 +936,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
+
 L_CFLAGS += -DCONFIG_SHA256
 ifneq ($(CONFIG_TLS), openssl)
 ifneq ($(CONFIG_TLS), gnutls)
diff --git a/hostapd/Makefile b/hostapd/Makefile
index ca44392..fa0d366 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1065,6 +1065,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
+
 CFLAGS += -DCONFIG_SHA256
 ifneq ($(CONFIG_TLS), openssl)
 ifneq ($(CONFIG_TLS), linux)