projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81e1ab8
)
EAP-PEAP peer: Check SHA1 result when deriving Compond_MAC
author
Jouni Malinen
<j@w1.fi>
Sat, 19 Dec 2015 18:34:27 +0000
(20:34 +0200)
committer
Jouni Malinen
<j@w1.fi>
Sat, 19 Dec 2015 18:34:27 +0000
(20:34 +0200)
This handles a mostly theoretical case where hmac_sha1_vector() might
fail for some reason.
Signed-off-by: Jouni Malinen <j@w1.fi>
src/eap_peer/eap_peap.c
patch
|
blob
|
history
diff --git
a/src/eap_peer/eap_peap.c
b/src/eap_peer/eap_peap.c
index
286c939
..
164ac26
100644
(file)
--- a/
src/eap_peer/eap_peap.c
+++ b/
src/eap_peer/eap_peap.c
@@
-334,7
+334,8
@@
static int eap_tlv_add_cryptobinding(struct eap_sm *sm,
addr[0], len[0]);
wpa_hexdump(MSG_MSGDUMP, "EAP-PEAP: Compound_MAC data 2",
addr[1], len[1]);
- hmac_sha1_vector(data->cmk, 20, 2, addr, len, mac);
+ if (hmac_sha1_vector(data->cmk, 20, 2, addr, len, mac) < 0)
+ return -1;
wpa_hexdump(MSG_MSGDUMP, "EAP-PEAP: Compound_MAC", mac, SHA1_MAC_LEN);
data->crypto_binding_used = 1;