Fix regression in evp_test for provider compat CI

If we ignore the faliure to copy on an old fips provider, we need to use
ctx_base, rather than ctx

Fixes #22076

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22102)
This commit is contained in:
Neil Horman 2023-09-12 17:07:53 -04:00 committed by Pauli
parent 388a8e7314
commit bbb6d620f6

View File

@ -877,6 +877,11 @@ static int cipher_test_enc(EVP_TEST *t, int enc, size_t out_misalign,
} else {
TEST_info("Allowing copy fail as an old fips provider is in use.");
}
EVP_CIPHER_CTX_free(ctx);
ctx = ctx_base;
} else {
EVP_CIPHER_CTX_free(ctx_base);
ctx_base = NULL;
}
/* Likewise for dup */
duped = EVP_CIPHER_CTX_dup(ctx);