From: Dr. Stephen Henson Date: Fri, 3 Feb 2017 02:49:26 +0000 (+0000) Subject: Call EVP_CipherFinal in CCM mode for tests. X-Git-Tag: OpenSSL_1_1_1-pre1~2460 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00212c6662b52f20e7ecdf17901c02f388bfd98d;p=oweals%2Fopenssl.git Call EVP_CipherFinal in CCM mode for tests. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2550) --- 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;