]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
evp_test.c: Fix provider compat tests CI failure
authorTomas Mraz <tomas@openssl.org>
Tue, 19 Dec 2023 17:52:12 +0000 (18:52 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 4 Jan 2024 14:38:35 +0000 (15:38 +0100)
As in the provider compatibility tests we also run the
3.1.2 fips provider against the up-to-date 3.0 branch
the CI would still fail as 3.1.2 provider would be
expected to pass this check.

Update the required fips provider version to be
>3.1.4 or <3.1.0 and >3.0.12 instead.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/23099)

test/evp_test.c

index e81213e2f845bb58b23ac4f6d62a04dbd80ab4c5..05fa50b99fa0c88717436763a6b4b6a4449ba870 100644 (file)
@@ -1516,7 +1516,9 @@ static int mac_test_run_mac(EVP_TEST *t)
         t->err = "MAC_CREATE_ERROR";
         goto err;
     }
-    if (fips_provider_version_gt(libctx, 3, 0, 12))
+    if (fips_provider_version_gt(libctx, 3, 1, 4)
+        || (fips_provider_version_lt(libctx, 3, 1, 0)
+            && fips_provider_version_gt(libctx, 3, 0, 12)))
         size_before_init = EVP_MAC_CTX_get_mac_size(ctx);
     if (!EVP_MAC_init(ctx, expected->key, expected->key_len, params)) {
         t->err = "MAC_INIT_ERROR";