Verify CHAP/MSCHAPv2 return code

Check the return code in some (but not yet all) places where the
functions from ms_funcs.c are used.
This commit is contained in:
Jouni Malinen 2009-08-16 19:07:57 +03:00
parent ce78b289c4
commit c5f6ad5766
5 changed files with 56 additions and 27 deletions

View file

@ -209,10 +209,15 @@ static struct wpabuf * eap_mschapv2_challenge_reply(
"in Phase 1");
auth_challenge = data->auth_challenge;
}
mschapv2_derive_response(identity, identity_len, password,
password_len, pwhash, auth_challenge,
peer_challenge, r->nt_response,
data->auth_response, data->master_key);
if (mschapv2_derive_response(identity, identity_len, password,
password_len, pwhash, auth_challenge,
peer_challenge, r->nt_response,
data->auth_response, data->master_key)) {
wpa_printf(MSG_ERROR, "EAP-MSCHAPV2: Failed to derive "
"response");
wpabuf_free(resp);
return NULL;
}
data->auth_response_valid = 1;
data->master_key_valid = 1;