|
@@ -233,10 +233,16 @@ static struct wpabuf * eap_leap_process_response(struct eap_sm *sm, void *priv,
|
|
|
os_memcpy(data->ap_response, pos, LEAP_RESPONSE_LEN);
|
|
|
|
|
|
if (pwhash) {
|
|
|
- hash_nt_password_hash(password, pw_hash_hash);
|
|
|
+ if (hash_nt_password_hash(password, pw_hash_hash)) {
|
|
|
+ ret->ignore = TRUE;
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
} else {
|
|
|
- nt_password_hash(password, password_len, pw_hash);
|
|
|
- hash_nt_password_hash(pw_hash, pw_hash_hash);
|
|
|
+ if (nt_password_hash(password, password_len, pw_hash) ||
|
|
|
+ hash_nt_password_hash(pw_hash, pw_hash_hash)) {
|
|
|
+ ret->ignore = TRUE;
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
}
|
|
|
challenge_response(data->ap_challenge, pw_hash_hash, expected);
|
|
|
|
|
@@ -345,11 +351,17 @@ static u8 * eap_leap_getKey(struct eap_sm *sm, void *priv, size_t *len)
|
|
|
if (key == NULL)
|
|
|
return NULL;
|
|
|
|
|
|
- if (pwhash)
|
|
|
- hash_nt_password_hash(password, pw_hash_hash);
|
|
|
- else {
|
|
|
- nt_password_hash(password, password_len, pw_hash);
|
|
|
- hash_nt_password_hash(pw_hash, pw_hash_hash);
|
|
|
+ if (pwhash) {
|
|
|
+ if (hash_nt_password_hash(password, pw_hash_hash)) {
|
|
|
+ os_free(key);
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nt_password_hash(password, password_len, pw_hash) ||
|
|
|
+ hash_nt_password_hash(pw_hash, pw_hash_hash)) {
|
|
|
+ os_free(key);
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
}
|
|
|
wpa_hexdump_key(MSG_DEBUG, "EAP-LEAP: pw_hash_hash",
|
|
|
pw_hash_hash, 16);
|