summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-11-16 12:42:18 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-12-02 12:15:05 +1000
commit89cccbea51fa52a1e4784a9ece35d96e4dcbfd30 (patch)
tree89cb59183ed18f1e5dd5cb86fed810b04cce466e /test/evp_test.c
parent8018352457cf9c98ce59f1e591fcd69f2153b649 (diff)
Add EVP_KDF-X942 to the fips module
The X942 KDF had been modified so that it supports all optional fields - not just the fields used by CMS. As there are 2 types of KDF for X942 - this has been made a bit clearer by adding an X942KDF-ASN1 alias. X942KDF-CONCAT has also been added as an alias of X963KDF. This work was instigated as a result of the ACVP tests optionally being able to use keybits for the supp_pubinfo field. Setting the parameter OSSL_KDF_PARAM_X942_USE_KEYBITS to 0 allows this to be disabled. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13418)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index ba26108eb2..d4d60694d4 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2424,11 +2424,12 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
t->skip = 1;
}
}
- if (p != NULL && strcmp(name, "cipher") == 0) {
- if (is_cipher_disabled(p)) {
- TEST_info("skipping, '%s' is disabled", p);
- t->skip = 1;
- }
+ if (p != NULL
+ && (strcmp(name, "cipher") == 0
+ || strcmp(name, "cekalg") == 0)
+ && is_cipher_disabled(p)) {
+ TEST_info("skipping, '%s' is disabled", p);
+ t->skip = 1;
}
OPENSSL_free(name);
return 1;
@@ -3709,10 +3710,6 @@ static int is_kdf_disabled(const char *name)
if (STR_ENDS_WITH(name, "SCRYPT"))
return 1;
#endif
-#ifdef OPENSSL_NO_CMS
- if (strcasecmp(name, "X942KDF") == 0)
- return 1;
-#endif /* OPENSSL_NO_CMS */
return 0;
}
@@ -3745,6 +3742,8 @@ static int is_cipher_disabled(const char *name)
#ifdef OPENSSL_NO_DES
if (STR_STARTS_WITH(name, "DES"))
return 1;
+ if (STR_ENDS_WITH(name, "3DESwrap"))
+ return 1;
#endif
#ifdef OPENSSL_NO_OCB
if (STR_ENDS_WITH(name, "OCB"))