2023-08-14 18:15:10 +00:00
|
|
|
From: Sverker Eriksson <sverker@erlang.org>
|
|
|
|
Date: Tue, 13 Jun 2023 19:02:32 +0200
|
|
|
|
Subject: [PATCH] crypto_SUITE: Remove md5, ripemd160 and sha as hash for rsa
|
|
|
|
sign if FIPS
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
|
2024-03-14 21:45:08 +00:00
|
|
|
index 0f2d223b6b..15fd40be1d 100644
|
2023-08-14 18:15:10 +00:00
|
|
|
--- a/lib/crypto/test/crypto_SUITE.erl
|
|
|
|
+++ b/lib/crypto/test/crypto_SUITE.erl
|
2024-03-14 21:45:08 +00:00
|
|
|
@@ -2391,7 +2391,12 @@ rsa_sign_verify_tests(Config, Msg, Public, Private, PublicS, PrivateS, OptsToTry
|
2023-08-14 18:15:10 +00:00
|
|
|
end.
|
|
|
|
|
|
|
|
rsa_sign_verify_tests(Msg, Public, Private, PublicS, PrivateS, OptsToTry) ->
|
|
|
|
- gen_rsa_sign_verify_tests([md5, ripemd160, sha, sha224, sha256], Msg, Public, Private,
|
|
|
|
+ Hashs0 = [sha224, sha256],
|
|
|
|
+ Hashs = case crypto:info_fips() of
|
|
|
|
+ enabled -> Hashs0;
|
|
|
|
+ _ -> [md5, ripemd160, sha | Hashs0]
|
|
|
|
+ end,
|
|
|
|
+ gen_rsa_sign_verify_tests(Hashs, Msg, Public, Private,
|
|
|
|
[undefined | OptsToTry]) ++
|
|
|
|
gen_rsa_sign_verify_tests([sha384, sha512], Msg, PublicS, PrivateS,
|
|
|
|
[undefined | OptsToTry]).
|