diff options
author | Hans Nilsson <[email protected]> | 2017-05-11 15:19:18 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-05-17 15:18:28 +0200 |
commit | 90de09b680d33bf4e048771381134ac8d7e0fa70 (patch) | |
tree | b8732379d882a1f1a9df32d2830a5b455393898f /lib/ssh | |
parent | ebd2baf9c433d489aff66f14505b5c221ba04165 (diff) | |
download | otp-90de09b680d33bf4e048771381134ac8d7e0fa70.tar.gz otp-90de09b680d33bf4e048771381134ac8d7e0fa70.tar.bz2 otp-90de09b680d33bf4e048771381134ac8d7e0fa70.zip |
ssh: select server-sig-algs from configured algos (preferred_algorithms)
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh_transport.erl | 6 | ||||
-rw-r--r-- | lib/ssh/test/ssh_basic_SUITE.erl | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl index bd1cb4bd22..cebbec7792 100644 --- a/lib/ssh/src/ssh_transport.erl +++ b/lib/ssh/src/ssh_transport.erl @@ -741,9 +741,11 @@ ext_info_message(#ssh{role=client, end; ext_info_message(#ssh{role=server, - send_ext_info=true} = Ssh0) -> + send_ext_info=true, + opts = Opts} = Ssh0) -> AlgsList = lists:map(fun erlang:atom_to_list/1, - ssh_transport:default_algorithms(public_key)), + proplists:get_value(public_key, + ?GET_OPT(preferred_algorithms, Opts))), Msg = #ssh_msg_ext_info{nr_extensions = 1, data = [{"server-sig-algs", string:join(AlgsList,",")}] }, diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index 1e591bc295..62e2a585e4 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -612,7 +612,7 @@ exec_key_differs(Config, UserPKAlgs) -> {_Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir}, {user_dir, SystemUserDir}, {preferred_algorithms, - [{public_key,['ssh-rsa']}]}]), + [{public_key,['ssh-rsa'|UserPKAlgs]}]}]), ct:sleep(500), IO = ssh_test_lib:start_io_server(), |