From 00212c6662b52f20e7ecdf17901c02f388bfd98d Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 3 Feb 2017 02:49:26 +0000 Subject: [PATCH] Call EVP_CipherFinal in CCM mode for tests. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2550) --- test/evp_test.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/evp_test.c b/test/evp_test.c index 2f651b6dce..494a46b318 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -1040,13 +1040,9 @@ static int cipher_test_enc(struct evp_test *t, int enc, tmplen += chunklen; } } - if (cdat->aead == EVP_CIPH_CCM_MODE) - tmpflen = 0; - else { - err = "CIPHERFINAL_ERROR"; - if (!EVP_CipherFinal_ex(ctx, tmp + out_misalign + tmplen, &tmpflen)) - goto err; - } + err = "CIPHERFINAL_ERROR"; + if (!EVP_CipherFinal_ex(ctx, tmp + out_misalign + tmplen, &tmpflen)) + goto err; err = "LENGTH_MISMATCH"; if (out_len != (size_t)(tmplen + tmpflen)) goto err; -- 2.25.1