aboutsummaryrefslogtreecommitdiff
path: root/test/endecode_test.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-09-13 22:38:30 +0200
committerPauli <pauli@openssl.org>2022-09-16 08:38:59 +1000
commit65759e35afa545835910ea85582522c01087fde3 (patch)
tree50c2ead769fb3a7b4ebfae4b4499e3fe2a5c5394 /test/endecode_test.c
parentc2f8d715e54d0f82f0a27fd69b85fd52578d89b8 (diff)
downloadopenssl-65759e35afa545835910ea85582522c01087fde3.zip
openssl-65759e35afa545835910ea85582522c01087fde3.tar.gz
openssl-65759e35afa545835910ea85582522c01087fde3.tar.bz2
With fips provider 3.0.0 skip tests related to explicit curves handling
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19201) (cherry picked from commit e1289d90d0069ea1c3ea8ae80bfc3916077ec24e)
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r--test/endecode_test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c
index 0e9697b..e3f7b81 100644
--- a/test/endecode_test.c
+++ b/test/endecode_test.c
@@ -43,6 +43,7 @@
static int default_libctx = 1;
static int is_fips = 0;
+static int is_fips_3_0_0 = 0;
static OSSL_LIB_CTX *testctx = NULL;
static OSSL_LIB_CTX *keyctx = NULL;
@@ -170,7 +171,7 @@ static int test_encode_decode(const char *file, const int line,
output_type, output_structure, pass, pcipher)))
goto end;
- if ((flags & FLAG_FAIL_IF_FIPS) != 0 && is_fips) {
+ if ((flags & FLAG_FAIL_IF_FIPS) != 0 && is_fips && !is_fips_3_0_0) {
if (TEST_false(decode_cb(file, line, (void **)&pkey2, encoded,
encoded_len, output_type, output_structure,
(flags & FLAG_DECODE_WITH_TYPE ? type : NULL),
@@ -1319,6 +1320,11 @@ int setup_tests(void)
return 0;
}
+ /* FIPS(3.0.0): provider imports explicit params but they won't work #17998 */
+ is_fips_3_0_0 = fips_provider_version_eq(testctx, 3, 0, 0);
+ if (is_fips_3_0_0 < 0)
+ return 0;
+
/* Separate provider/ctx for generating the test data */
if (!TEST_ptr(keyctx = OSSL_LIB_CTX_new()))
return 0;