From: Martin Willi Date: Tue, 18 Dec 2007 10:44:44 +0000 (-0000) Subject: fixed EAP-MD5 to accept Name attribute in challenge X-Git-Tag: 4.1.10~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8461a37db6a0d8961fe69f831ff83f798faad5e;p=thirdparty%2Fstrongswan.git fixed EAP-MD5 to accept Name attribute in challenge --- diff --git a/src/charon/sa/authenticators/eap/eap_md5.c b/src/charon/sa/authenticators/eap/eap_md5.c index ca5c1d6b7c..0ca9fc566d 100644 --- a/src/charon/sa/authenticators/eap/eap_md5.c +++ b/src/charon/sa/authenticators/eap/eap_md5.c @@ -199,7 +199,8 @@ static status_t process_server(private_eap_md5_t *this, data = in->get_data(in); response = chunk_skip(data, 6); - if (!chunk_equals(response, expected)) + if (response.len < expected.len || + !memeq(response.ptr, expected.ptr, expected.len)) { chunk_free(&expected); DBG1(DBG_IKE, "EAP-MD5 verification failed");