aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-05-24 15:04:43 +0200
committerHans Nilsson <[email protected]>2017-05-31 17:52:41 +0200
commit9c4d91f4726ff84df8877fc6c73edcd116775a52 (patch)
treea8adde32d2206ce3477ba7beb9adcb5b5e0aac2a /lib/ssh
parent8611454d37da15627a79507ca62bf25843e62493 (diff)
downloadotp-9c4d91f4726ff84df8877fc6c73edcd116775a52.tar.gz
otp-9c4d91f4726ff84df8877fc6c73edcd116775a52.tar.bz2
otp-9c4d91f4726ff84df8877fc6c73edcd116775a52.zip
ssh: ssh_options checks 'pref_public_key_algs' for dubblets
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/src/ssh_options.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_options.erl b/lib/ssh/src/ssh_options.erl
index aebb5a7062..7eeed70739 100644
--- a/lib/ssh/src/ssh_options.erl
+++ b/lib/ssh/src/ssh_options.erl
@@ -674,7 +674,11 @@ check_pref_public_key_algs(V) ->
PKs = ssh_transport:supported_algorithms(public_key),
CHK = fun(A, Ack) ->
case lists:member(A, PKs) of
- true -> [A|Ack];
+ true ->
+ case lists:member(A,Ack) of
+ false -> [A|Ack];
+ true -> Ack % Remove duplicates
+ end;
false -> error_in_check(A, "Not supported public key")
end
end,