Skip to content

Commit

Permalink
evp_test.c: Fix provider compat tests CI failure
Browse files Browse the repository at this point in the history
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 #23099)
  • Loading branch information
t8m committed Jan 4, 2024
1 parent d64242f commit 7407867
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/evp_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 7407867

Please sign in to comment.