EAP-FAST: Check T-PRF result in MSK/EMSK derivation
Pass the error return from sha1_t_prf() to callers. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b1d8c5ce6a
commit
5b904b3e42
4 changed files with 25 additions and 14 deletions
|
@ -1564,7 +1564,10 @@ static u8 * eap_fast_getKey(struct eap_sm *sm, void *priv, size_t *len)
|
|||
if (eapKeyData == NULL)
|
||||
return NULL;
|
||||
|
||||
eap_fast_derive_eap_msk(data->simck, eapKeyData);
|
||||
if (eap_fast_derive_eap_msk(data->simck, eapKeyData) < 0) {
|
||||
os_free(eapKeyData);
|
||||
return NULL;
|
||||
}
|
||||
*len = EAP_FAST_KEY_LEN;
|
||||
|
||||
return eapKeyData;
|
||||
|
@ -1583,7 +1586,10 @@ static u8 * eap_fast_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
|
|||
if (eapKeyData == NULL)
|
||||
return NULL;
|
||||
|
||||
eap_fast_derive_eap_emsk(data->simck, eapKeyData);
|
||||
if (eap_fast_derive_eap_emsk(data->simck, eapKeyData) < 0) {
|
||||
os_free(eapKeyData);
|
||||
return NULL;
|
||||
}
|
||||
*len = EAP_EMSK_LEN;
|
||||
|
||||
return eapKeyData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue