aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection_handler.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-05-22 12:45:28 +0200
committerHans Nilsson <[email protected]>2017-05-22 12:45:28 +0200
commit0070d43cd5413a322f903a699043b9ea614a7765 (patch)
tree776a15f64d17357d6c411eb75a39072433b315e7 /lib/ssh/src/ssh_connection_handler.erl
parent8d26eb5a9ccca27f926d1ed01d11a8ac0f55cf5a (diff)
parent3507ea008839ad68dc16060a2696e3efde551684 (diff)
downloadotp-0070d43cd5413a322f903a699043b9ea614a7765.tar.gz
otp-0070d43cd5413a322f903a699043b9ea614a7765.tar.bz2
otp-0070d43cd5413a322f903a699043b9ea614a7765.zip
Merge branch 'hans/ssh/rsa-sha2-star_hostkey'
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 6a6b9896cb..a77cfe51b5 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1712,7 +1712,12 @@ ext_info({"server-sig-algs",SigAlgs}, D0 = #data{ssh_params=#ssh{role=client,
],
CommonAlgs = [Alg || Alg <- ServerSigAlgs,
lists:member(Alg, ClientSigAlgs)],
- D0#data{ssh_params = Ssh0#ssh{userauth_pubkeys = CommonAlgs} };
+ SelectedAlgs =
+ case CommonAlgs of
+ [] -> ClientSigAlgs; % server-sig-algs value is just an advice
+ _ -> CommonAlgs
+ end,
+ D0#data{ssh_params = Ssh0#ssh{userauth_pubkeys = SelectedAlgs} };
ext_info(_, D0) ->
%% Not implemented