aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/gcmp.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-08 21:49:54 (GMT)
committerJouni Malinen <j@w1.fi>2012-09-08 21:49:54 (GMT)
commitaf0963fab42804328294bba7a36a976814369aca (patch)
treee9a41e5d6bca7d8fc790da8065c5df71b4eafb21 /wlantest/gcmp.c
parentc2372d7cf05a360e2a4f186bb71afa9bf6701ff9 (diff)
downloadhostap-af0963fab42804328294bba7a36a976814369aca.zip
hostap-af0963fab42804328294bba7a36a976814369aca.tar.gz
hostap-af0963fab42804328294bba7a36a976814369aca.tar.bz2
Support arbitrary IV length with AES-GCM
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest/gcmp.c')
-rw-r--r--wlantest/gcmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wlantest/gcmp.c b/wlantest/gcmp.c
index 07c98c7..e0245db 100644
--- a/wlantest/gcmp.c
+++ b/wlantest/gcmp.c
@@ -95,8 +95,8 @@ u8 * gcmp_decrypt(const u8 *tk, const struct ieee80211_hdr *hdr,
wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));
- if (aes_128_gcm_ad(tk, nonce, m, mlen, aad, aad_len, m + mlen, plain) <
- 0) {
+ if (aes_128_gcm_ad(tk, nonce, sizeof(nonce), m, mlen, aad, aad_len,
+ m + mlen, plain) < 0) {
u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
wpa_printf(MSG_INFO, "Invalid GCMP frame: A1=" MACSTR
" A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
@@ -146,8 +146,8 @@ u8 * gcmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos,
wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));
- if (aes_128_gcm_ae(tk, nonce, frame + hdrlen, plen, aad, aad_len,
- pos, pos + plen) < 0) {
+ if (aes_128_gcm_ae(tk, nonce, sizeof(nonce), frame + hdrlen, plen, aad,
+ aad_len, pos, pos + plen) < 0) {
os_free(crypt);
return NULL;
}