diff options
author | Fredrik Gustafsson <[email protected]> | 2012-11-23 14:58:02 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-11-23 14:58:02 +0100 |
commit | fadf861ed01ea4c54ceeb4b83830389ee7dc7b93 (patch) | |
tree | 743e2b8d0ad7551fbd9cb3c65b00425cedf1c679 /lib/ssh/test/ssh_basic_SUITE.erl | |
parent | e02e94b034c6407aadcbac42846c9b2e1a54d49e (diff) | |
download | otp-fadf861ed01ea4c54ceeb4b83830389ee7dc7b93.tar.gz otp-fadf861ed01ea4c54ceeb4b83830389ee7dc7b93.tar.bz2 otp-fadf861ed01ea4c54ceeb4b83830389ee7dc7b93.zip |
Added test for rekeying
Diffstat (limited to 'lib/ssh/test/ssh_basic_SUITE.erl')
-rw-r--r-- | lib/ssh/test/ssh_basic_SUITE.erl | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index 5fec7f0cd7..16f759f974 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -43,14 +43,15 @@ all() -> {group, rsa_pass_key}, {group, internal_error}, {group, idle_time}, + {group, rekey}, daemon_already_started, server_password_option, server_userpassword_option, close]. groups() -> - [{dsa_key, [], [send, exec, exec_compressed, shell, known_hosts, idle_time]}, - {rsa_key, [], [send, exec, exec_compressed, shell, known_hosts, idle_time]}, + [{dsa_key, [], [send, exec, exec_compressed, shell, known_hosts, idle_time, rekey]}, + {rsa_key, [], [send, exec, exec_compressed, shell, known_hosts, idle_time, rekey]}, {dsa_pass_key, [], [pass_phrase]}, {rsa_pass_key, [], [pass_phrase]}, {internal_error, [], [internal_error]} @@ -256,6 +257,28 @@ idle_time(Config) -> end, ssh:stop_daemon(Pid). %%-------------------------------------------------------------------- +rekey(doc) -> + ["Idle timeout test"]; +rekey(Config) -> + SystemDir = filename:join(?config(priv_dir, Config), system), + UserDir = ?config(priv_dir, Config), + + {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir}, + {user_dir, UserDir}, + {failfun, fun ssh_test_lib:failfun/2}, + {rekey_limit, 0}]), + ConnectionRef = + ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true}, + {user_dir, UserDir}, + {user_interaction, false}, + {rekey_limit, 0}]), + receive + after 15000 -> + %%By this time rekeying would have been done + ssh:close(ConnectionRef), + ssh:stop_daemon(Pid) + end. +%%-------------------------------------------------------------------- shell(doc) -> ["Test that ssh:shell/2 works"]; shell(Config) when is_list(Config) -> |