aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-10-07 12:19:06 +0200
committerHans Nilsson <[email protected]>2015-10-07 12:19:06 +0200
commitf8f1bf3326e98bff7dbfed6f284b136b799c0be4 (patch)
treeb455c183b4924dd7f1cd79d454a4c63a32cffeb6 /lib/ssh/test/ssh_test_lib.erl
parent5fccd24ca22d19e65bb539cc0a71b2748d3b8dcd (diff)
parentf6996a8b1f9ecec034700c7ec5e914c7084fa5b5 (diff)
downloadotp-f8f1bf3326e98bff7dbfed6f284b136b799c0be4.tar.gz
otp-f8f1bf3326e98bff7dbfed6f284b136b799c0be4.tar.bz2
otp-f8f1bf3326e98bff7dbfed6f284b136b799c0be4.zip
Merge branch 'hans/ssh/zlib_openssh/OTP-12759' into maint
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 6d568125bb..e16df6f959 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -552,4 +552,24 @@ algo_intersection(_, _) ->
to_atoms(L) -> lists:map(fun erlang:list_to_atom/1, L).
-
+%%%----------------------------------------------------------------
+ssh_supports(Alg, SshDefaultAlg_tag) ->
+ SupAlgs =
+ case proplists:get_value(SshDefaultAlg_tag,
+ ssh:default_algorithms()) of
+ [{_K1,L1}, {_K2,L2}] ->
+ lists:usort(L1++L2);
+ L ->
+ L
+ end,
+ if
+ is_atom(Alg) ->
+ lists:member(Alg, SupAlgs);
+ is_list(Alg) ->
+ case Alg--SupAlgs of
+ [] ->
+ true;
+ UnSup ->
+ {false,UnSup}
+ end
+ end.