0003-Include-HMAC-SHA384-512-KDF-for-SAE-if-SHA384-512-is.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From c7f71fb8679c4cdd2607dbaac467a1d5efe9f0f9 Mon Sep 17 00:00:00 2001
  2. From: Jouni Malinen <j@w1.fi>
  3. Date: Sun, 17 Apr 2022 12:28:41 +0300
  4. Subject: [PATCH] Include HMAC-SHA384/512 KDF for SAE if SHA384/512 is included
  5. It was possible to miss the HMAC functions if some other build
  6. configuration parameters ended up setting NEED_SHA384/512=y.
  7. Upstream: https://w1.fi/cgit/hostap/commit/?id=c7f71fb8679c4cdd2607dbaac467a1d5efe9f0f9
  8. Signed-off-by: Jouni Malinen <j@w1.fi>
  9. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
  10. ---
  11. wpa_supplicant/Android.mk | 11 +++++++++++
  12. wpa_supplicant/Makefile | 11 +++++++++++
  13. 2 files changed, 22 insertions(+)
  14. diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
  15. index 0e0ce467c..bcdbd6c90 100644
  16. --- a/wpa_supplicant/Android.mk
  17. +++ b/wpa_supplicant/Android.mk
  18. @@ -1361,6 +1361,17 @@ endif
  19. endif
  20. endif
  21. +ifdef CONFIG_SAE
  22. +ifdef NEED_SHA384
  23. +# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
  24. +NEED_HMAC_SHA384_KDF=y
  25. +endif
  26. +ifdef NEED_SHA512
  27. +# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
  28. +NEED_HMAC_SHA512_KDF=y
  29. +endif
  30. +endif
  31. +
  32. SHA256OBJS = # none by default
  33. L_CFLAGS += -DCONFIG_SHA256
  34. ifneq ($(CONFIG_TLS), openssl)
  35. diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
  36. index ed49aa972..69c80121c 100644
  37. --- a/wpa_supplicant/Makefile
  38. +++ b/wpa_supplicant/Makefile
  39. @@ -1475,6 +1475,17 @@ endif
  40. endif
  41. endif
  42. +ifdef CONFIG_SAE
  43. +ifdef NEED_SHA384
  44. +# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
  45. +NEED_HMAC_SHA384_KDF=y
  46. +endif
  47. +ifdef NEED_SHA512
  48. +# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
  49. +NEED_HMAC_SHA512_KDF=y
  50. +endif
  51. +endif
  52. +
  53. SHA256OBJS = # none by default
  54. CFLAGS += -DCONFIG_SHA256
  55. ifneq ($(CONFIG_TLS), openssl)
  56. --
  57. 2.39.2