diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-01-24 16:10:04 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2012-01-24 16:44:49 -0800 |
commit | 1f69aa52ea2e0a73ac502565df8c666ee49cab6a (patch) | |
tree | 8ea94735f75f461769454853da0c24cbb89cc4cc /src/eap_common/eap_peap_common.c | |
parent | bf5edf439c90418b6f4122ff5e3925123263bda4 (diff) | |
download | external_wpa_supplicant_8-1f69aa52ea2e0a73ac502565df8c666ee49cab6a.zip external_wpa_supplicant_8-1f69aa52ea2e0a73ac502565df8c666ee49cab6a.tar.gz external_wpa_supplicant_8-1f69aa52ea2e0a73ac502565df8c666ee49cab6a.tar.bz2 |
Update to new version 0.8.16 from BRCM
Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91
Author: Neeraj Kumar Garg <neerajkg@broadcom.com>
Date: Tue Dec 27 23:21:45 2011 +0200
P2P: Reject p2p_group_add if forced frequency is not acceptable
Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/eap_common/eap_peap_common.c')
-rw-r--r-- | src/eap_common/eap_peap_common.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/eap_common/eap_peap_common.c b/src/eap_common/eap_peap_common.c index 3a64b8e..8a701d2 100644 --- a/src/eap_common/eap_peap_common.c +++ b/src/eap_common/eap_peap_common.c @@ -1,6 +1,6 @@ /* * EAP-PEAP common routines - * Copyright (c) 2008, Jouni Malinen <j@w1.fi> + * Copyright (c) 2008-2011, Jouni Malinen <j@w1.fi> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -18,9 +18,9 @@ #include "crypto/sha1.h" #include "eap_peap_common.h" -void peap_prfplus(int version, const u8 *key, size_t key_len, - const char *label, const u8 *seed, size_t seed_len, - u8 *buf, size_t buf_len) +int peap_prfplus(int version, const u8 *key, size_t key_len, + const char *label, const u8 *seed, size_t seed_len, + u8 *buf, size_t buf_len) { unsigned char counter = 0; size_t pos, plen; @@ -75,7 +75,8 @@ void peap_prfplus(int version, const u8 *key, size_t key_len, while (pos < buf_len) { counter++; plen = buf_len - pos; - hmac_sha1_vector(key, key_len, 5, addr, len, hash); + if (hmac_sha1_vector(key, key_len, 5, addr, len, hash) < 0) + return -1; if (plen >= SHA1_MAC_LEN) { os_memcpy(&buf[pos], hash, SHA1_MAC_LEN); pos += SHA1_MAC_LEN; @@ -85,4 +86,6 @@ void peap_prfplus(int version, const u8 *key, size_t key_len, } len[0] = SHA1_MAC_LEN; } + + return 0; } |