Add tests for re-using cipher contexts
authorHolger Dengler <dengler@linux.ibm.com>
Thu, 4 Jan 2024 18:25:08 +0000 (19:25 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 12 Jan 2024 09:35:47 +0000 (10:35 +0100)
commit9d47024599d932baef013b7ceced9e842cbb786d
tree3f524304d6ccd5e1b22b98c7badddcd8b0207938
parentc944c06cc94e9a7a53f075543a0c0858919f96c5
Add tests for re-using cipher contexts

Add test case for re-using a cipher context with the same key, iv and
cipher. It detects, if the hardware-specific cipher context is reset
correctly, like reported in issue #23175.

This test has encrypt and decrypt iterations for cfb128 and
ofb128. All iteations use the same key, iv and plaintext.

Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23201)

(cherry picked from commit 3cb1b51dddf4deaf5e3886b827f3245d81670bc7)
test/evp_extra_test.c