aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-07-07 12:53:00 +0200
committerHans Nilsson <[email protected]>2017-07-07 14:31:49 +0200
commit0841976a87ac6eabcfee8d7f194d090b2790d0ff (patch)
treee83e06367bd281b34a407d68d26a9e5f5925b387
parent0efea034a03db099a0e47fe49fc4f56e386e65d8 (diff)
downloadotp-0841976a87ac6eabcfee8d7f194d090b2790d0ff.tar.gz
otp-0841976a87ac6eabcfee8d7f194d090b2790d0ff.tar.bz2
otp-0841976a87ac6eabcfee8d7f194d090b2790d0ff.zip
crypto: test case for sign/verify ecdsa with sha256 etc
-rw-r--r--lib/crypto/test/crypto_SUITE.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index d6e3b99aae..88f13d766c 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -1225,6 +1225,8 @@ group_config(dss = Type, Config) ->
case crypto:info_lib() of
[{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10001000 ->
[sha, sha224, sha256, sha384, sha512];
+ [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10000000 ->
+ [sha, sha224, sha256];
_Else ->
[sha]
end,
@@ -1236,7 +1238,11 @@ group_config(dss = Type, Config) ->
group_config(ecdsa = Type, Config) ->
{Private, Public} = ec_key_named(),
Msg = ec_msg(),
- SignVerify = [{Type, sha, Public, Private, Msg}],
+ SupportedHashs = proplists:get_value(hashs, crypto:supports(), []),
+ DssHashs = [sha, sha224, sha256, sha384, sha512],
+ SignVerify = [{Type, Hash, Public, Private, Msg}
+ || Hash <- DssHashs,
+ lists:member(Hash, SupportedHashs)],
[{sign_verify, SignVerify} | Config];
group_config(srp, Config) ->
GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()],