aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_options_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-11-19 17:24:58 +0100
committerHans Nilsson <[email protected]>2018-11-19 17:24:58 +0100
commit8de34c46987435ff92bae9d6980866472acfa059 (patch)
treef1b7361b92131f703fe4459323a8f634a9bf1145 /lib/ssh/test/ssh_options_SUITE.erl
parent04d70c636062cfa4051bce3674d5ff55513850cb (diff)
parentcc2ab960ec1ac8702303cd4d80e12118089f97ca (diff)
downloadotp-8de34c46987435ff92bae9d6980866472acfa059.tar.gz
otp-8de34c46987435ff92bae9d6980866472acfa059.tar.bz2
otp-8de34c46987435ff92bae9d6980866472acfa059.zip
Merge branch 'maint'
* maint: ssh: Make host and user key pre-checking better ssh: Generalize unpublished test support option ssh: Cleaning and polishing of ssh_auth ssh: Add a common key_cb call function
Diffstat (limited to 'lib/ssh/test/ssh_options_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_options_SUITE.erl39
1 files changed, 24 insertions, 15 deletions
diff --git a/lib/ssh/test/ssh_options_SUITE.erl b/lib/ssh/test/ssh_options_SUITE.erl
index daf62483cd..60d0da2a39 100644
--- a/lib/ssh/test/ssh_options_SUITE.erl
+++ b/lib/ssh/test/ssh_options_SUITE.erl
@@ -49,7 +49,7 @@
server_userpassword_option/1,
server_pwdfun_option/1,
server_pwdfun_4_option/1,
- server_pwdfun_4_option_repeat/1,
+ server_keyboard_interactive/1,
ssh_connect_arg4_timeout/1,
ssh_connect_negtimeout_parallel/1,
ssh_connect_negtimeout_sequential/1,
@@ -99,7 +99,7 @@ all() ->
server_userpassword_option,
server_pwdfun_option,
server_pwdfun_4_option,
- server_pwdfun_4_option_repeat,
+ server_keyboard_interactive,
{group, dir_options},
ssh_connect_timeout,
ssh_connect_arg4_timeout,
@@ -381,7 +381,7 @@ server_pwdfun_4_option(Config) ->
%%--------------------------------------------------------------------
-server_pwdfun_4_option_repeat(Config) ->
+server_keyboard_interactive(Config) ->
UserDir = proplists:get_value(user_dir, Config),
SysDir = proplists:get_value(data_dir, Config),
%% Test that the state works
@@ -396,19 +396,28 @@ server_pwdfun_4_option_repeat(Config) ->
{pwdfun,PWDFUN}]),
%% Try with passwords "incorrect", "Bad again" and finally "bar"
- KIFFUN = fun(_,_,_) ->
+ KIFFUN = fun(_Name, _Instr, _PromptInfos) ->
K={k,self()},
- case get(K) of
- undefined ->
- put(K,1),
- ["incorrect"];
- 2 ->
- put(K,3),
- ["bar"];
- S->
- put(K,S+1),
- ["Bad again"]
- end
+ Answer =
+ case get(K) of
+ undefined ->
+ put(K,1),
+ ["incorrect"];
+ 2 ->
+ put(K,3),
+ ["bar"];
+ S->
+ put(K,S+1),
+ ["Bad again"]
+ end,
+ ct:log("keyboard_interact_fun:~n"
+ " Name = ~p~n"
+ " Instruction = ~p~n"
+ " Prompts = ~p~n"
+ "~nAnswer:~n ~p~n",
+ [_Name, _Instr, _PromptInfos, Answer]),
+
+ Answer
end,
ConnectionRef2 =