Skip to content

Commit

Permalink
ecdh_cofactor_derive_test(): Skip the test if the curve is not supported
Browse files Browse the repository at this point in the history
It will not be supported if the fips provider was built with no-ec2m.

Fixes openssl#25729

Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#25731)
  • Loading branch information
t8m authored and mattcaswell committed Oct 21, 2024
1 parent dfc5ba8 commit 1f0cb85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/acvp_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ static int ecdh_cofactor_derive_test(int tstid)
if (!ec_cofactors)
return TEST_skip("not supported by FIPS provider version");

if (!TEST_ptr(peer1 = EVP_PKEY_Q_keygen(libctx, NULL, "EC", curve))
|| !TEST_ptr(peer2 = EVP_PKEY_Q_keygen(libctx, NULL, "EC", curve)))
if (!TEST_ptr(peer1 = EVP_PKEY_Q_keygen(libctx, NULL, "EC", curve)))
return TEST_skip("Curve %s not supported by the FIPS provider", curve);

if (!TEST_ptr(peer2 = EVP_PKEY_Q_keygen(libctx, NULL, "EC", curve)))
goto err;

params[1] = OSSL_PARAM_construct_end();
Expand Down

0 comments on commit 1f0cb85

Please sign in to comment.