aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_fast.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-12 09:20:05 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-12 09:20:05 (GMT)
commit5b904b3e421da51bb742f0265ce0b57cb979ae0c (patch)
tree22f30a93a78d8e069cca420022be505aa68f5dca /src/eap_peer/eap_fast.c
parentb1d8c5ce6a60111e94fa9b8720acb362fe04f608 (diff)
downloadhostap-5b904b3e421da51bb742f0265ce0b57cb979ae0c.zip
hostap-5b904b3e421da51bb742f0265ce0b57cb979ae0c.tar.gz
hostap-5b904b3e421da51bb742f0265ce0b57cb979ae0c.tar.bz2
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>
Diffstat (limited to 'src/eap_peer/eap_fast.c')
-rw-r--r--src/eap_peer/eap_fast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 6e8b12f..8b6b7fd 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -260,8 +260,9 @@ static void eap_fast_deinit(struct eap_sm *sm, void *priv)
static int eap_fast_derive_msk(struct eap_fast_data *data)
{
- eap_fast_derive_eap_msk(data->simck, data->key_data);
- eap_fast_derive_eap_emsk(data->simck, data->emsk);
+ if (eap_fast_derive_eap_msk(data->simck, data->key_data) < 0 ||
+ eap_fast_derive_eap_emsk(data->simck, data->emsk) < 0)
+ return -1;
data->success = 1;
return 0;
}