aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-06-12 12:22:47 +0200
committerHans Nilsson <[email protected]>2017-06-12 12:22:47 +0200
commit49e7329b04af4f4f93d0f5c3e6900e3473d765d2 (patch)
tree2a6defc5466d26c8da8bb3648bc4faf9330bce1a /lib
parent4665af0b305cb45e2bf5da10ca540a0a032ece47 (diff)
parentb803e2999a374aff4d20e8e30c66e8d5ee83f98b (diff)
downloadotp-49e7329b04af4f4f93d0f5c3e6900e3473d765d2.tar.gz
otp-49e7329b04af4f4f93d0f5c3e6900e3473d765d2.tar.bz2
otp-49e7329b04af4f4f93d0f5c3e6900e3473d765d2.zip
Merge branch 'hans/crypto/cuddle_tests'
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/test/crypto_SUITE.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index 30ee782fe9..164f43dcb0 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -809,8 +809,15 @@ do_generate({ecdh = Type, Curve, Priv, Pub}) ->
ct:fail({{crypto, generate_key, [Type, Priv, Curve]}, {expected, Pub}, {got, Other}})
end;
do_generate({rsa = Type, Mod, Exp}) ->
- {Pub,Priv} = crypto:generate_key(Type, {Mod,Exp}),
- do_sign_verify({rsa, sha256, Pub, Priv, rsa_plain()}).
+ case crypto:info_fips() of
+ enabled when Mod < 3072 ->
+ ct:log("SKIP do_generate ~p FIPS=~p, Mod=~p Exp=~p", [Type, enabled, Mod, Exp]),
+ {skip, "FIPS violation"};
+ FIPS ->
+ ct:log("do_generate ~p FIPS=~p, Mod=~p Exp=~p", [Type, FIPS, Mod, Exp]),
+ {Pub,Priv} = crypto:generate_key(Type, {Mod,Exp}),
+ do_sign_verify({rsa, sha256, Pub, Priv, rsa_plain()})
+ end.
notsup(Fun, Args) ->
Result =
@@ -1159,7 +1166,7 @@ group_config(rsa = Type, Config) ->
rsa_oaep(),
no_padding()
],
- Generate = [{rsa, 2048, 17}, {rsa, 3072, 65537}],
+ Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}],
[{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config];
group_config(dss = Type, Config) ->
Msg = dss_plain(),