aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_transport.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-08-30 11:20:12 +0200
committerHans Nilsson <[email protected]>2015-08-30 11:20:12 +0200
commitee71e0e20819e2ab9e251f4bb46e8b0b19f2a1b3 (patch)
tree54bed42d1324159eae0f10039c7d8bc05163b04d /lib/ssh/src/ssh_transport.erl
parent4b1202b1b683a2e7a4c7a0da41d4112e255801ec (diff)
parentbadee37e8ad95a9da4d497f12e5e291a66561989 (diff)
downloadotp-ee71e0e20819e2ab9e251f4bb46e8b0b19f2a1b3.tar.gz
otp-ee71e0e20819e2ab9e251f4bb46e8b0b19f2a1b3.tar.bz2
otp-ee71e0e20819e2ab9e251f4bb46e8b0b19f2a1b3.zip
Merge branch 'hans/ssh/test_reorg/OTP-12230' into maint
* hans/ssh/test_reorg/OTP-12230: ssh: Reorganize and extend the test suites
Diffstat (limited to 'lib/ssh/src/ssh_transport.erl')
-rw-r--r--lib/ssh/src/ssh_transport.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 235d8918f3..1914b223bc 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -801,14 +801,15 @@ alg_final(SSH0) ->
{ok,SSH6} = decompress_final(SSH5),
SSH6.
-select_all(CL, SL) when length(CL) + length(SL) < 50 ->
+select_all(CL, SL) when length(CL) + length(SL) < ?MAX_NUM_ALGORITHMS ->
A = CL -- SL, %% algortihms only used by client
%% algorithms used by client and server (client pref)
lists:map(fun(ALG) -> list_to_atom(ALG) end, (CL -- A));
-select_all(_CL, _SL) ->
+select_all(CL, SL) ->
+ Err = lists:concat(["Received too many algorithms (",length(CL),"+",length(SL)," >= ",?MAX_NUM_ALGORITHMS,")."]),
throw(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_PROTOCOL_ERROR,
- description = "Too many algorithms",
- language = "en"}).
+ description = Err,
+ language = ""}).
select([], []) ->