diff options
author | Hans Nilsson <[email protected]> | 2015-08-29 08:42:33 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-08-29 08:42:33 +0200 |
commit | 4b1202b1b683a2e7a4c7a0da41d4112e255801ec (patch) | |
tree | 33db9c66d1475e6178f6138508f69ad1a1f8a40b /lib/ssh/test/ssh_protocol_SUITE.erl | |
parent | 1940bb3f4d01c8f7cc1c51af0b4fede4924191a8 (diff) | |
parent | ba7b10c4fa2787e11bde6ddacc97ab90fe858484 (diff) | |
download | otp-4b1202b1b683a2e7a4c7a0da41d4112e255801ec.tar.gz otp-4b1202b1b683a2e7a4c7a0da41d4112e255801ec.tar.bz2 otp-4b1202b1b683a2e7a4c7a0da41d4112e255801ec.zip |
Merge branch 'hans/ssh/kex_ecdh/OTP-12622' into maint
* hans/ssh/kex_ecdh/OTP-12622:
ssh: Elliptic Curve Diffie-Hellman (ECDH)
Diffstat (limited to 'lib/ssh/test/ssh_protocol_SUITE.erl')
-rw-r--r-- | lib/ssh/test/ssh_protocol_SUITE.erl | 27 |
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). - %%%---------------------------------------------------------------- |