mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
evp_libctx_test: fix provider compat CI regression
The regression was introduced by #25522. Fixes #25632 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25633)
This commit is contained in:
parent
0a2a8d970f
commit
73e720c3a5
@ -604,14 +604,16 @@ static int kem_rsa_gen_recover(void)
|
||||
&& TEST_mem_eq(unwrap, unwraplen, secret, secretlen);
|
||||
|
||||
/* Test that providing a too short unwrapped/ctlen fails */
|
||||
ctlen = 1;
|
||||
if (!TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret,
|
||||
&secretlen), 0))
|
||||
ret = 0;
|
||||
unwraplen = 1;
|
||||
if (!TEST_int_eq(EVP_PKEY_decapsulate(rctx, unwrap, &unwraplen, ct,
|
||||
ctlen), 0))
|
||||
ret = 0;
|
||||
if (fips_provider_version_match(libctx, ">=3.4.0")) {
|
||||
ctlen = 1;
|
||||
if (!TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret,
|
||||
&secretlen), 0))
|
||||
ret = 0;
|
||||
unwraplen = 1;
|
||||
if (!TEST_int_eq(EVP_PKEY_decapsulate(rctx, unwrap, &unwraplen, ct,
|
||||
ctlen), 0))
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
EVP_PKEY_free(pub);
|
||||
EVP_PKEY_free(priv);
|
||||
|
Loading…
Reference in New Issue
Block a user