mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Fix no-sm2
Fix ecdsatest to not run the SM2 test if SM2 has been disabled. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11015)
This commit is contained in:
parent
f11f86f6ec
commit
9afaa8d65b
@ -384,11 +384,13 @@ static int test_builtin_as_ec(int n)
|
||||
return test_builtin(n, EVP_PKEY_EC);
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_SM2
|
||||
static int test_builtin_as_sm2(int n)
|
||||
{
|
||||
return test_builtin(n, EVP_PKEY_SM2);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
#endif /* OPENSSL_NO_EC */
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
@ -401,7 +403,9 @@ int setup_tests(void)
|
||||
|| !TEST_true(EC_get_builtin_curves(curves, crv_len)))
|
||||
return 0;
|
||||
ADD_ALL_TESTS(test_builtin_as_ec, crv_len);
|
||||
# ifndef OPENSSL_NO_SM2
|
||||
ADD_ALL_TESTS(test_builtin_as_sm2, crv_len);
|
||||
# endif
|
||||
ADD_ALL_TESTS(x9_62_tests, OSSL_NELEM(ecdsa_cavs_kats));
|
||||
#endif
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user