]> granicus.if.org Git - openssl/commitdiff
gcm128.c: fix AAD-only case with AAD length not divisible by 16 [from HEAD].
authorAndy Polyakov <appro@openssl.org>
Mon, 13 Aug 2012 15:32:18 +0000 (15:32 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 13 Aug 2012 15:32:18 +0000 (15:32 +0000)
PR: 2859
Submitted by: John Foley

crypto/modes/gcm128.c

index ec6c1b30b2c9a0f5bc21a7a30060f1a7342ed58c..0e6ff8b0a155e0070d1afaaee767461da72f6ff2 100644 (file)
@@ -1398,7 +1398,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) {