fixed EAP-MD5 to accept Name attribute in challenge
authorMartin Willi <martin@strongswan.org>
Tue, 18 Dec 2007 10:44:44 +0000 (10:44 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 18 Dec 2007 10:44:44 +0000 (10:44 -0000)
src/charon/sa/authenticators/eap/eap_md5.c

index ca5c1d6..0ca9fc5 100644 (file)
@@ -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");