mirror of
https://github.com/openssl/openssl.git
synced 2026-05-07 20:12:39 +00:00
Skip LMS tests if fetch for the LMS algorithm fails
Check for specific LMS error Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/28580)
This commit is contained in:
@@ -551,6 +551,7 @@ int setup_tests(void)
|
||||
{
|
||||
OPTION_CHOICE o;
|
||||
char *config_file = NULL;
|
||||
EVP_PKEY_CTX *ctx = NULL;
|
||||
|
||||
/* Swap the libctx to test non-default context only */
|
||||
propq = "provider=default";
|
||||
@@ -571,6 +572,11 @@ int setup_tests(void)
|
||||
if (!test_get_libctx(&libctx, &nullprov, config_file, &libprov, NULL))
|
||||
return 0;
|
||||
|
||||
ctx = EVP_PKEY_CTX_new_from_name(libctx, "LMS", propq);
|
||||
if (ctx == NULL && ERR_get_error() == EVP_R_UNSUPPORTED_ALGORITHM)
|
||||
return TEST_skip("LMS algorithm is not available in provider");
|
||||
EVP_PKEY_CTX_free(ctx);
|
||||
|
||||
ADD_TEST(lms_bad_pub_len_test);
|
||||
ADD_TEST(lms_key_validate_test);
|
||||
ADD_TEST(lms_key_eq_test);
|
||||
|
||||
Reference in New Issue
Block a user