Skip to content

Commit 5f2b8d7

Browse files
committed
test_cipher_reinit(): Reinit succeeds with CCM on providers >=4.2.0
1 parent 22a158f commit 5f2b8d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/evp_libctx_test.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,9 @@ static int test_cipher_reinit(int test_id)
384384
if (!TEST_ptr(cipher = EVP_CIPHER_fetch(libctx, name, NULL)))
385385
goto err;
386386

387-
/* ccm fails on the second update - this matches OpenSSL 1_1_1 behaviour */
388-
ccm = (EVP_CIPHER_get_mode(cipher) == EVP_CIPH_CCM_MODE);
387+
/* ccm fails on the second update on <4.2.0 - this matches OpenSSL 1_1_1 behaviour */
388+
ccm = (EVP_CIPHER_get_mode(cipher) == EVP_CIPH_CCM_MODE
389+
&& fips_provider_version_match(libctx, "<4.2.0"));
389390

390391
/* siv cannot be called with NULL key as the iv is irrelevant */
391392
siv = (EVP_CIPHER_get_mode(cipher) == EVP_CIPH_SIV_MODE);

0 commit comments

Comments
 (0)