EAP-FAST: Check sha1_t_prf() result in eap_fast_get_cmk()
This gets rid of a valgrind warning on uninitialized memory read in the eap_proto_fast_errors test case where the result was used after the failed sha1_t_prf() call. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
636a23881b
commit
92abe3782f
1 changed files with 4 additions and 3 deletions
|
@ -710,9 +710,10 @@ static int eap_fast_get_cmk(struct eap_sm *sm, struct eap_fast_data *data,
|
||||||
if (eap_fast_get_phase2_key(sm, data, isk, sizeof(isk)) < 0)
|
if (eap_fast_get_phase2_key(sm, data, isk, sizeof(isk)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
wpa_hexdump_key(MSG_MSGDUMP, "EAP-FAST: ISK[j]", isk, sizeof(isk));
|
wpa_hexdump_key(MSG_MSGDUMP, "EAP-FAST: ISK[j]", isk, sizeof(isk));
|
||||||
sha1_t_prf(data->simck, EAP_FAST_SIMCK_LEN,
|
if (sha1_t_prf(data->simck, EAP_FAST_SIMCK_LEN,
|
||||||
"Inner Methods Compound Keys",
|
"Inner Methods Compound Keys",
|
||||||
isk, sizeof(isk), imck, sizeof(imck));
|
isk, sizeof(isk), imck, sizeof(imck)) < 0)
|
||||||
|
return -1;
|
||||||
data->simck_idx++;
|
data->simck_idx++;
|
||||||
os_memcpy(data->simck, imck, EAP_FAST_SIMCK_LEN);
|
os_memcpy(data->simck, imck, EAP_FAST_SIMCK_LEN);
|
||||||
wpa_hexdump_key(MSG_MSGDUMP, "EAP-FAST: S-IMCK[j]",
|
wpa_hexdump_key(MSG_MSGDUMP, "EAP-FAST: S-IMCK[j]",
|
||||||
|
|
Loading…
Reference in a new issue