9aea5ce05a
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
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
|
|
index 968c8ce145..915a07a39e 100644
|
|
--- a/lib/crypto/test/crypto_SUITE.erl
|
|
+++ b/lib/crypto/test/crypto_SUITE.erl
|
|
@@ -2388,7 +2388,12 @@ rsa_sign_verify_tests(Config, Msg, Public, Private, PublicS, PrivateS, OptsToTry
|
|
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]).
|