aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_basic_SUITE.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-12-19 11:54:09 +0100
committerFredrik Gustafsson <[email protected]>2012-12-19 11:54:09 +0100
commitb5bfeb6de3a2a79c9581d779112d1cc192225dbd (patch)
tree3151cdb378e62a3d05f849492ce6c84382355cd3 /lib/ssh/test/ssh_basic_SUITE.erl
parent3bd2ba0060f9bcb0d3bddd74a4a5763e520a533f (diff)
parentc228ceb941e26a04317bd2f66a2ee64687f0f869 (diff)
downloadotp-b5bfeb6de3a2a79c9581d779112d1cc192225dbd.tar.gz
otp-b5bfeb6de3a2a79c9581d779112d1cc192225dbd.tar.bz2
otp-b5bfeb6de3a2a79c9581d779112d1cc192225dbd.zip
Merge branch 'fredrik/ssh/rekeying'
* fredrik/ssh/rekeying: ssh_basic_SUITE rekey test modifications Modifications to idle_time testcase Added test for rekeying Added doc for rekey_limit option Renegotiating every hour and every gb sent, can be decreased with option {rekey_limit, integer()}
Diffstat (limited to 'lib/ssh/test/ssh_basic_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl30
1 files changed, 26 insertions, 4 deletions
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 5fec7f0cd7..efcb11f88f 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -42,15 +42,14 @@ all() ->
{group, dsa_pass_key},
{group, rsa_pass_key},
{group, internal_error},
- {group, idle_time},
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]}
@@ -247,7 +246,8 @@ idle_time(Config) ->
ConnectionRef =
ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
{user_dir, UserDir},
- {user_interaction, false}]),
+ {user_interaction, false},
+ {idle_time, 2000}]),
{ok, Id} = ssh_connection:session_channel(ConnectionRef, 1000),
ssh_connection:close(ConnectionRef, Id),
receive
@@ -256,6 +256,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) ->