aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-11-11 16:59:08 +0100
committerHans Nilsson <[email protected]>2016-11-18 15:05:40 +0100
commit8215ea28fa2f699499b64d6f2c712e068b199390 (patch)
tree0941b1f929a56f3728a7bc6f3aad1abddbb370f7 /lib/ssh/src/ssh.erl
parent01bd8ba71ce1f56ec9f8ef9de8a9f123076ed12a (diff)
downloadotp-8215ea28fa2f699499b64d6f2c712e068b199390.tar.gz
otp-8215ea28fa2f699499b64d6f2c712e068b199390.tar.bz2
otp-8215ea28fa2f699499b64d6f2c712e068b199390.zip
ssh: Add fun and fingerprint to option 'silently_accept_host'
Diffstat (limited to 'lib/ssh/src/ssh.erl')
-rw-r--r--lib/ssh/src/ssh.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 1d7be3547b..31e343e81b 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -617,6 +617,15 @@ handle_ssh_option({user_dir_fun, Value} = Opt) when is_function(Value) ->
Opt;
handle_ssh_option({silently_accept_hosts, Value} = Opt) when is_boolean(Value) ->
Opt;
+handle_ssh_option({silently_accept_hosts, Value} = Opt) when is_function(Value,2) ->
+ Opt;
+handle_ssh_option({silently_accept_hosts, {DigestAlg,Value}} = Opt) when is_function(Value,2) ->
+ case lists:member(DigestAlg, [md5, sha, sha224, sha256, sha384, sha512]) of
+ true ->
+ Opt;
+ false ->
+ throw({error, {eoptions, Opt}})
+ end;
handle_ssh_option({user_interaction, Value} = Opt) when is_boolean(Value) ->
Opt;
handle_ssh_option({preferred_algorithms,[_|_]} = Opt) ->