aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-05-16 11:57:33 +0200
committerHans Nilsson <[email protected]>2017-05-16 11:57:33 +0200
commitc3a3a455f15bbdadff40063a8ab3a17eb5cda4e9 (patch)
treeda83161faea4639a3b55733a9b46b9531f8cf167 /lib/ssh/src
parent83e8f4a0ca6a12cf960e73e25db88929ed4151da (diff)
parentde3c2e70b3bf3387877b6624b6772395664039d6 (diff)
downloadotp-c3a3a455f15bbdadff40063a8ab3a17eb5cda4e9.tar.gz
otp-c3a3a455f15bbdadff40063a8ab3a17eb5cda4e9.tar.bz2
otp-c3a3a455f15bbdadff40063a8ab3a17eb5cda4e9.zip
Merge branch 'hans/ssh/test_ext_info_extension/OTP-14361'
Diffstat (limited to 'lib/ssh/src')
-rw-r--r--lib/ssh/src/ssh_transport.erl18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 25c64a4f25..bd1cb4bd22 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -724,9 +724,21 @@ kex_ext_info(Role, Opts) ->
end.
ext_info_message(#ssh{role=client,
- send_ext_info=true} = Ssh0) ->
- %% FIXME: no extensions implemented
- {ok, "", Ssh0};
+ send_ext_info=true,
+ opts=Opts} = Ssh0) ->
+ %% Since no extension sent by the client is implemented, we add a fake one
+ %% to be able to test the framework.
+ %% Remove this when there is one and update ssh_protocol_SUITE whare it is used.
+ case proplists:get_value(ext_info_client, ?GET_OPT(tstflg,Opts)) of
+ true ->
+ Msg = #ssh_msg_ext_info{nr_extensions = 1,
+ data = [{"[email protected]", "Testing,PleaseIgnore"}]
+ },
+ {SshPacket, Ssh} = ssh_packet(Msg, Ssh0),
+ {ok, SshPacket, Ssh};
+ _ ->
+ {ok, "", Ssh0}
+ end;
ext_info_message(#ssh{role=server,
send_ext_info=true} = Ssh0) ->