diff options
author | Hans Nilsson <[email protected]> | 2015-08-30 11:21:35 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-08-30 11:21:35 +0200 |
commit | bd698a302da6f4ca0940add26852c32dc27d3d07 (patch) | |
tree | 420a1429d471c9bd246e4f60afb9e46a47207384 /lib/ssh/src/ssh_transport.erl | |
parent | 8fac1e6b35b62321d98655866e8f76400c6d0cbf (diff) | |
parent | ee71e0e20819e2ab9e251f4bb46e8b0b19f2a1b3 (diff) | |
download | otp-bd698a302da6f4ca0940add26852c32dc27d3d07.tar.gz otp-bd698a302da6f4ca0940add26852c32dc27d3d07.tar.bz2 otp-bd698a302da6f4ca0940add26852c32dc27d3d07.zip |
Merge branch 'maint'
* maint:
ssh: Reorganize and extend the test suites
Diffstat (limited to 'lib/ssh/src/ssh_transport.erl')
-rw-r--r-- | lib/ssh/src/ssh_transport.erl | 9 |
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([], []) -> |