|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* hostapd / EAP-MD5 server
|
|
|
- * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
|
|
|
+ * Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
|
|
|
*
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
* See README for more details.
|
|
@@ -119,8 +119,12 @@ static void eap_md5_process(struct eap_sm *sm, void *priv,
|
|
|
wpa_hexdump(MSG_MSGDUMP, "EAP-MD5: Response", pos, CHAP_MD5_LEN);
|
|
|
|
|
|
id = eap_get_id(respData);
|
|
|
- chap_md5(id, sm->user->password, sm->user->password_len,
|
|
|
- data->challenge, CHALLENGE_LEN, hash);
|
|
|
+ if (chap_md5(id, sm->user->password, sm->user->password_len,
|
|
|
+ data->challenge, CHALLENGE_LEN, hash)) {
|
|
|
+ wpa_printf(MSG_INFO, "EAP-MD5: CHAP MD5 operation failed");
|
|
|
+ data->state = FAILURE;
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
if (os_memcmp(hash, pos, CHAP_MD5_LEN) == 0) {
|
|
|
wpa_printf(MSG_DEBUG, "EAP-MD5: Done - Success");
|