aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-05 19:40:44 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-05 19:40:44 (GMT)
commit841b52b403d404625542ef460c4c5078e7ee3046 (patch)
tree790767fb0d564b0fb324bb2263038553face08a2 /tests
parent6a230ba27470a1128375ffb58aadef7f4b186cd0 (diff)
downloadhostap-841b52b403d404625542ef460c4c5078e7ee3046.zip
hostap-841b52b403d404625542ef460c4c5078e7ee3046.tar.gz
hostap-841b52b403d404625542ef460c4c5078e7ee3046.tar.bz2
Include needed header files to avoid compiler warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/test-milenage.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test-milenage.c b/tests/test-milenage.c
index d5485ae..b41e1a7 100644
--- a/tests/test-milenage.c
+++ b/tests/test-milenage.c
@@ -1,6 +1,7 @@
#include "includes.h"
#include "common.h"
+#include "crypto/aes_wrap.h"
#include "crypto/milenage.h"
@@ -13,13 +14,15 @@ extern int wpa_debug_level;
* @k: K = 128-bit subscriber key
* @opc: Buffer for OPc = 128-bit value derived from OP and K
*/
-static void milenage_opc(const u8 *op, const u8 *k, u8 *opc)
+static int milenage_opc(const u8 *op, const u8 *k, u8 *opc)
{
int i;
/* OP_C = OP XOR E_K(OP) */
- aes_128_encrypt_block(k, op, opc);
+ if (aes_128_encrypt_block(k, op, opc) < 0)
+ return -1;
for (i = 0; i < 16; i++)
opc[i] ^= op[i];
+ return 0;
}