Remove always true check on EAPOL-Key message in authenticator
This was practically dead code since no other msg value exist anymore. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
627c3f35dc
commit
74a25a6602
1 changed files with 23 additions and 26 deletions
|
@ -1229,36 +1229,33 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
|
|||
msgtxt = "2/4 Pairwise";
|
||||
}
|
||||
|
||||
if (msg == REQUEST || msg == PAIRWISE_2 || msg == PAIRWISE_4 ||
|
||||
msg == GROUP_2) {
|
||||
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_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 (wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_AKM_DEFINED) {
|
||||
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,
|
||||
"did not use EAPOL-Key descriptor version 0 as required for AKM-defined cases");
|
||||
"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 (wpa_use_akm_defined(sm->wpa_key_mgmt) &&
|
||||
ver != WPA_KEY_INFO_TYPE_AKM_DEFINED) {
|
||||
wpa_auth_logger(wpa_auth, wpa_auth_get_spa(sm),
|
||||
LOGGER_WARNING,
|
||||
"did not use EAPOL-Key descriptor version 0 as required for AKM-defined cases");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (key_info & WPA_KEY_INFO_REQUEST) {
|
||||
|
|
Loading…
Reference in a new issue