From c7b5fbe552466ac0c568ae468da620bd6d87d7c8 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 15 Jan 2013 16:16:48 -0800 Subject: [PATCH] fixed a bug involving const nonces for CCM. Added AES-CCM to the full commit test case. --- commit-tests.sh | 2 +- ctaocrypt/src/aes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commit-tests.sh b/commit-tests.sh index f26f1ed16..c6ee86b2c 100755 --- a/commit-tests.sh +++ b/commit-tests.sh @@ -23,7 +23,7 @@ RESULT=$? # make sure full config is ok echo -e "\n\nTesting full config as well...\n\n" -./configure --enable-opensslExtra --enable-fastmath --enable-dtls --enable-aesgcm --enable-hc128 --enable-sniffer --enable-psk --enable-rabbit; +./configure --enable-opensslExtra --enable-fastmath --enable-dtls --enable-aesgcm --enable-aesccm --enable-hc128 --enable-sniffer --enable-psk --enable-rabbit; RESULT=$? [ $RESULT -ne 0 ] && echo -e "\n\nFull config ./configure failed" && exit 1 diff --git a/ctaocrypt/src/aes.c b/ctaocrypt/src/aes.c index c67e95ded..448ed130c 100644 --- a/ctaocrypt/src/aes.c +++ b/ctaocrypt/src/aes.c @@ -2658,7 +2658,7 @@ int AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz, o = out; oSz = inSz; - XMEMCPY(B+1, nonce, AES_BLOCK_SIZE); + XMEMCPY(B+1, nonce, nonceSz); lenSz = AES_BLOCK_SIZE - 1 - nonceSz; B[0] = (lenSz - 1);