EAP-MSCHAPv2 server: Check ms_funcs results more consistently
This makes the code more consistent by checking the somewhat theoretical error cases more consistently (CID 72685). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8e3e0b3f57
commit
8c5dfc79a5
1 changed files with 10 additions and 7 deletions
|
@ -414,13 +414,16 @@ static void eap_mschapv2_process_response(struct eap_sm *sm,
|
||||||
}
|
}
|
||||||
pw_hash = pw_hash_buf;
|
pw_hash = pw_hash_buf;
|
||||||
}
|
}
|
||||||
generate_authenticator_response_pwhash(
|
if (generate_authenticator_response_pwhash(
|
||||||
pw_hash, peer_challenge, data->auth_challenge,
|
pw_hash, peer_challenge, data->auth_challenge,
|
||||||
username, username_len, nt_response,
|
username, username_len, nt_response,
|
||||||
data->auth_response);
|
data->auth_response) < 0 ||
|
||||||
|
hash_nt_password_hash(pw_hash, pw_hash_hash) < 0 ||
|
||||||
hash_nt_password_hash(pw_hash, pw_hash_hash);
|
get_master_key(pw_hash_hash, nt_response,
|
||||||
get_master_key(pw_hash_hash, nt_response, data->master_key);
|
data->master_key)) {
|
||||||
|
data->state = FAILURE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
data->master_key_valid = 1;
|
data->master_key_valid = 1;
|
||||||
wpa_hexdump_key(MSG_DEBUG, "EAP-MSCHAPV2: Derived Master Key",
|
wpa_hexdump_key(MSG_DEBUG, "EAP-MSCHAPV2: Derived Master Key",
|
||||||
data->master_key, MSCHAPV2_KEY_LEN);
|
data->master_key, MSCHAPV2_KEY_LEN);
|
||||||
|
|
Loading…
Add table
Reference in a new issue