From 4e1d466fc59487576815ee66b3bf52ae1027f982 Mon Sep 17 00:00:00 2001 From: jgujarathi Date: Thu, 23 Feb 2023 19:12:48 +0530 Subject: [PATCH] wpa_supplicant : Add validations for 192-bit Suite B test cases. Add validation for group data cipher, pairwise cipher and AKM Suites to ensure correct ciphers are supported by AP during 192-bit Enterprise connections. --- components/wpa_supplicant/src/rsn_supp/wpa.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index f200e9ab9c..3b512701b7 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2497,6 +2497,18 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, wpa_printf(MSG_ERROR, "suite-b 192bit certification, only GMAC256 is supported"); return -1; } + if (sm->group_cipher != WPA_CIPHER_GCMP_256) { + wpa_printf(MSG_ERROR, "suite-b 192bit certification, only group GCMP256 is supported for group data cipher."); + return -1; + } + if (sm->pairwise_cipher != WPA_CIPHER_GCMP_256) { + wpa_printf(MSG_ERROR,"suite-b 192bit certification, only group GCMP256 is supported for pairwise cipher"); + return -1; + } + if (sm->key_mgmt != WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { + wpa_printf(MSG_ERROR, "suite-b 192bit certification, 192bit akm supported"); + return -1; + } } #endif } else {