diff options
Diffstat (limited to 'eap_ttls.c')
-rw-r--r-- | eap_ttls.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eap_ttls.c b/eap_ttls.c index ca0069439ac4d..bdffed41740b0 100644 --- a/eap_ttls.c +++ b/eap_ttls.c @@ -673,7 +673,7 @@ static int eap_ttls_phase2_request_mschapv2(struct eap_sm *sm, /* MS-CHAP-Challenge */ challenge = eap_ttls_implicit_challenge( - sm, data, EAP_TTLS_MSCHAPV2_CHALLENGE_LEN * 2 + 1); + sm, data, EAP_TTLS_MSCHAPV2_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAPV2: Failed to derive " @@ -777,7 +777,8 @@ static int eap_ttls_phase2_request_mschap(struct eap_sm *sm, config->identity, config->identity_len); /* MS-CHAP-Challenge */ - challenge = eap_ttls_implicit_challenge(sm, data, EAP_TLS_KEY_LEN); + challenge = eap_ttls_implicit_challenge( + sm, data, EAP_TTLS_MSCHAP_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAP: Failed to derive " @@ -907,7 +908,8 @@ static int eap_ttls_phase2_request_chap(struct eap_sm *sm, config->identity, config->identity_len); /* CHAP-Challenge */ - challenge = eap_ttls_implicit_challenge(sm, data, EAP_TLS_KEY_LEN); + challenge = eap_ttls_implicit_challenge( + sm, data, EAP_TTLS_CHAP_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/CHAP: Failed to derive " |