aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_protocol_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-08-05 22:12:18 +0200
committerHans Nilsson <[email protected]>2015-08-29 08:40:52 +0200
commitba7b10c4fa2787e11bde6ddacc97ab90fe858484 (patch)
tree0e8f5997242dcc7a96d64c5af199ea7c5511e58a /lib/ssh/test/ssh_protocol_SUITE.erl
parentb78c3b351fc955aa14bdfc3577890031ffffa9f0 (diff)
downloadotp-ba7b10c4fa2787e11bde6ddacc97ab90fe858484.tar.gz
otp-ba7b10c4fa2787e11bde6ddacc97ab90fe858484.tar.bz2
otp-ba7b10c4fa2787e11bde6ddacc97ab90fe858484.zip
ssh: Elliptic Curve Diffie-Hellman (ECDH)
Adds ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp512 and OTP-12938 hmac-sha2-512
Diffstat (limited to 'lib/ssh/test/ssh_protocol_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE.erl27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/ssh/test/ssh_protocol_SUITE.erl b/lib/ssh/test/ssh_protocol_SUITE.erl
index dc02b940d7..132be3beb2 100644
--- a/lib/ssh/test/ssh_protocol_SUITE.erl
+++ b/lib/ssh/test/ssh_protocol_SUITE.erl
@@ -115,7 +115,8 @@ lib_works_as_client(Config) ->
[{set_options, [print_ops, print_seqnums, print_messages]},
{connect,
server_host(Config),server_port(Config),
- [{silently_accept_hosts, true},
+ [{preferred_algorithms,[{kex,['diffie-hellman-group1-sha1']}]},
+ {silently_accept_hosts, true},
{user_dir, user_dir(Config)},
{user_interaction, false}]},
receive_hello,
@@ -207,7 +208,9 @@ lib_works_as_server(Config) ->
end),
%% and finally connect to it with a regular Erlang SSH client:
- {ok,_} = std_connect(HostPort, Config).
+ {ok,_} = std_connect(HostPort, Config,
+ [{preferred_algorithms,[{kex,['diffie-hellman-group1-sha1']}]}]
+ ).
%%--------------------------------------------------------------------
%%% Matching
@@ -449,24 +452,24 @@ server_user_password(N, Config) -> lists:nth(N, ?v(user_passwords,Config)).
std_connect(Config) ->
- {User,Pwd} = server_user_password(Config),
- std_connect(server_host(Config), server_port(Config),
- Config,
- [{user,User},{password,Pwd}]).
+ std_connect({server_host(Config), server_port(Config)}, Config).
std_connect({Host,Port}, Config) ->
- {User,Pwd} = server_user_password(Config),
- std_connect(Host, Port, Config, [{user,User},{password,Pwd}]).
+ std_connect({Host,Port}, Config, []).
std_connect({Host,Port}, Config, Opts) ->
std_connect(Host, Port, Config, Opts).
std_connect(Host, Port, Config, Opts) ->
+ {User,Pwd} = server_user_password(Config),
ssh:connect(Host, Port,
- [{silently_accept_hosts, true},
- {user_dir, user_dir(Config)},
- {user_interaction, false} | Opts],
+ %% Prefere User's Opts to the default opts
+ [O || O = {Tag,_} <- [{user,User},{password,Pwd},
+ {silently_accept_hosts, true},
+ {user_dir, user_dir(Config)},
+ {user_interaction, false}],
+ not lists:keymember(Tag, 1, Opts)
+ ] ++ Opts,
30000).
-
%%%----------------------------------------------------------------