From 035693240d06c7b2000b4e3d065943f36a245838 Mon Sep 17 00:00:00 2001 From: Baojun Wang Date: Thu, 18 Jan 2018 18:04:21 -0800 Subject: [PATCH] fix wrong condition check in cryptonite_aes_ccm_aad --- cbits/cryptonite_aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cbits/cryptonite_aes.c b/cbits/cryptonite_aes.c index 3af46d6..58963d9 100644 --- a/cbits/cryptonite_aes.c +++ b/cbits/cryptonite_aes.c @@ -529,7 +529,7 @@ void cryptonite_aes_ccm_aad(aes_ccm *ccm, aes_key *key, uint8_t *input, uint32_t { block128 tmp; - if (ccm->length_aad == 0) return; + if (ccm->length_aad != 0) return; ccm->length_aad = length; int len_len;