aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-10-19 12:43:47 +0200
committerHans Nilsson <[email protected]>2015-10-19 12:43:47 +0200
commit5ea9a240688f43f81eb607d79e4161f9085024e7 (patch)
tree15795977e2a9cff06913cc1c41ba6bf96b39fa7d /lib/ssh/test
parent5f73e439578c4356db26804f47e8b50901a8e45a (diff)
parentfdae664715f6b64e3f0c61729344bc372b67e1e2 (diff)
downloadotp-5ea9a240688f43f81eb607d79e4161f9085024e7.tar.gz
otp-5ea9a240688f43f81eb607d79e4161f9085024e7.tar.bz2
otp-5ea9a240688f43f81eb607d79e4161f9085024e7.zip
Merge branch 'maint'
* maint: ssh: Implemented ssh_transport:ecdh_validate_public_key (partly) ssh: dialyzer fix public_key: add/update -spec for ssh functions ssh, public_key: use pubkey encode/decode in app public_key ssh, public_key: Change EC Public Key representation to what was intended
Diffstat (limited to 'lib/ssh/test')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl11
-rw-r--r--lib/ssh/test/ssh_trpt_test_lib.erl2
2 files changed, 4 insertions, 9 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 87eaeec1bc..a269192785 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -403,18 +403,13 @@ setup_rsa_auth_keys(Dir, UserDir) ->
PKey = #'RSAPublicKey'{publicExponent = E, modulus = N},
setup_auth_keys([{ PKey, [{comment, "Test"}]}], UserDir).
-setup_ecdsa_auth_keys(Size, Dir, UserDir) ->
+setup_ecdsa_auth_keys(_Size, Dir, UserDir) ->
{ok, Pem} = file:read_file(filename:join(Dir, "id_ecdsa")),
ECDSA = public_key:pem_entry_decode(hd(public_key:pem_decode(Pem))),
#'ECPrivateKey'{publicKey = Q,
- parameters = {namedCurve,Id0}} = ECDSA,
+ parameters = Param = {namedCurve,_Id0}} = ECDSA,
PKey = #'ECPoint'{point = Q},
- Id = case pubkey_cert_records:namedCurves(Id0) of
- secp256r1 when Size=="256" -> <<"nistp256">>;
- secp384r1 when Size=="384" -> <<"nistp384">>;
- secp521r1 when Size=="521" -> <<"nistp521">>
- end,
- setup_auth_keys([{ {PKey,Id}, [{comment, "Test"}]}], UserDir).
+ setup_auth_keys([{ {PKey,Param}, [{comment, "Test"}]}], UserDir).
setup_auth_keys(Keys, Dir) ->
AuthKeys = public_key:ssh_encode(Keys, auth_keys),
diff --git a/lib/ssh/test/ssh_trpt_test_lib.erl b/lib/ssh/test/ssh_trpt_test_lib.erl
index caf9bac3b6..772e50df87 100644
--- a/lib/ssh/test/ssh_trpt_test_lib.erl
+++ b/lib/ssh/test/ssh_trpt_test_lib.erl
@@ -743,7 +743,7 @@ print_traces(S) ->
[case Len-length(Acc)-1 of
0 ->
io_lib:format(Fmt,Args);
- N ->
+ _N ->
io_lib:format(lists:concat(['~p --------~n',Fmt]),
[Len-length(Acc)-1|Args])
end | Acc]