aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/test')
-rw-r--r--lib/crypto/test/crypto_SUITE.erl17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index 09898efd49..55db09d9dd 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -1887,12 +1887,7 @@ ec(Config) when is_list(Config) ->
ec_do() ->
%% test for a name curve
- L2 = crypto:ec_key_new(sect113r2),
- crypto:ec_key_generate(L2),
-
- D2 = crypto:ec_key_to_term(L2),
- T2 = crypto:term_to_ec_key(D2),
- ?line D2 = crypto:ec_key_to_term(T2),
+ D2 = crypto:ecdh_generate_key(sect113r2),
%%TODO: find a published test case for a EC key
@@ -1933,13 +1928,13 @@ ec_do() ->
CoFactor = 1,
Curve = {{prime_field,P},{A,B,none},BasePoint, Order,CoFactor},
CsCaKey = {Curve, undefined, PubKey},
- T3 = crypto:term_to_ec_key(CsCaKey),
- ?line CsCaKey = crypto:ec_key_to_term(T3),
+ %%T3 = crypto:term_to_ec_key(CsCaKey),
+ %%?line CsCaKey = crypto:ec_key_to_term(T3),
Msg = <<99,234,6,64,190,237,201,99,80,248,58,40,70,45,149,218,5,246,242,63>>,
- Sign = crypto:sign(ecdsa, sha, Msg, L2),
- ?line true = crypto:verify(ecdsa, sha, Msg, Sign, L2),
- ?line false = crypto:verify(ecdsa, sha, Msg, <<10,20>>, L2),
+ Sign = crypto:sign(ecdsa, sha, Msg, D2),
+ ?line true = crypto:verify(ecdsa, sha, Msg, Sign, D2),
+ ?line false = crypto:verify(ecdsa, sha, Msg, <<10,20>>, D2),
ok.