From 799602e489b92fdc0bdf4bc8f0920ef3707bf6f3 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 14 Oct 2012 12:29:25 +0000 Subject: [PATCH] gcm128.c: fix AAD-only case with AAD length not divisible by 16. PR: 2859 Submitted by: John Foley (backport from HEAD) --- crypto/modes/gcm128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c index 8dfeae5ed5..a52ffb1d22 100644 --- a/crypto/modes/gcm128.c +++ b/crypto/modes/gcm128.c @@ -1403,7 +1403,7 @@ int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag, void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult; #endif - if (ctx->mres) + if (ctx->mres || ctx->ares) GCM_MUL(ctx,Xi); if (is_endian.little) { -- 2.25.1