Use more generic checks for Key Descriptor Version 2 and 3
IEEE Std 802.11-2020 describes the rule based on not-TKIP for value 2 and no pairwise cipher condition on value 3, so use that set of more generic rules here. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
74a25a6602
commit
fff69bba10
1 changed files with 16 additions and 18 deletions
|
@ -1229,25 +1229,23 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
|
|||
msgtxt = "2/4 Pairwise";
|
||||
}
|
||||
|
||||
if (sm->pairwise == WPA_CIPHER_CCMP ||
|
||||
sm->pairwise == WPA_CIPHER_GCMP) {
|
||||
if (wpa_use_cmac(sm->wpa_key_mgmt) &&
|
||||
!wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_AES_128_CMAC) {
|
||||
wpa_auth_logger(wpa_auth, wpa_auth_get_spa(sm),
|
||||
LOGGER_WARNING,
|
||||
"advertised support for AES-128-CMAC, but did not use it");
|
||||
goto out;
|
||||
}
|
||||
if (!wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
wpa_use_cmac(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_AES_128_CMAC) {
|
||||
wpa_auth_logger(wpa_auth, wpa_auth_get_spa(sm),
|
||||
LOGGER_WARNING,
|
||||
"advertised support for AES-128-CMAC, but did not use it");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!wpa_use_cmac(sm->wpa_key_mgmt) &&
|
||||
!wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
|
||||
wpa_auth_logger(wpa_auth, wpa_auth_get_spa(sm),
|
||||
LOGGER_WARNING,
|
||||
"did not use HMAC-SHA1-AES with CCMP/GCMP");
|
||||
goto out;
|
||||
}
|
||||
if (sm->pairwise != WPA_CIPHER_TKIP &&
|
||||
!wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
!wpa_use_cmac(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
|
||||
wpa_auth_logger(wpa_auth, wpa_auth_get_spa(sm),
|
||||
LOGGER_WARNING,
|
||||
"did not use HMAC-SHA1-AES with CCMP/GCMP");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
|
|
Loading…
Reference in a new issue