summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-02-09 11:23:01 +0100
committerTomas Mraz <tomas@openssl.org>2022-11-11 10:04:05 +0100
commitfa82704ea6564c11d5280d748fab1172dc156409 (patch)
tree36e32229adda7b8c72038a6beec40d5734de5557 /test
parent64e20b1f4424f19e258b74ec3880d01c91b38ff8 (diff)
evp_test: Skip testcase if r parameter is unsupported
The r parameter of the KBKDF is unsupported by 3.0 FIPS module. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17671) (cherry picked from commit bbbd1210b43d7a7aff60ccc3c92561beaf6b2bb3) Reviewed-by: Hugo Landau <hlandau@openssl.org>
Diffstat (limited to 'test')
-rw-r--r--test/evp_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 5412b1f95e..6f1ae3280a 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2760,6 +2760,13 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
if (p != NULL)
*p++ = '\0';
+ if (strcmp(name, "r") == 0
+ && OSSL_PARAM_locate_const(defs, name) == NULL) {
+ TEST_info("skipping, setting 'r' is unsupported");
+ t->skip = 1;
+ goto end;
+ }
+
rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p,
p != NULL ? strlen(p) : 0, NULL);
*++kdata->p = OSSL_PARAM_construct_end();
@@ -2773,6 +2780,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
}
+ goto end;
}
if (p != NULL
&& (strcmp(name, "cipher") == 0
@@ -2780,6 +2788,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
&& is_cipher_disabled(p)) {
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
+ goto end;
}
if (p != NULL
&& (strcmp(name, "mac") == 0)
@@ -2787,6 +2796,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
}
+ end:
OPENSSL_free(name);
return 1;
}