diff options
author | Hans Nilsson <[email protected]> | 2017-05-16 11:56:55 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-05-16 11:56:55 +0200 |
commit | 83e8f4a0ca6a12cf960e73e25db88929ed4151da (patch) | |
tree | b1552e978b59007d6674a1f8fa175b540a288d3c /lib/ssh/src/ssh_options.erl | |
parent | 8fd3466d1fef48a09a45f7fd7f031addf3855dc2 (diff) | |
parent | 242dddbc918c87571013e7e0acd29b4abbe12911 (diff) | |
download | otp-83e8f4a0ca6a12cf960e73e25db88929ed4151da.tar.gz otp-83e8f4a0ca6a12cf960e73e25db88929ed4151da.tar.bz2 otp-83e8f4a0ca6a12cf960e73e25db88929ed4151da.zip |
Merge branch 'hans/ssh/enable_auth_methods_for_clients/OTP-14399'
Diffstat (limited to 'lib/ssh/src/ssh_options.erl')
-rw-r--r-- | lib/ssh/src/ssh_options.erl | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/ssh/src/ssh_options.erl b/lib/ssh/src/ssh_options.erl index 0886d5b34d..78f68dbcb1 100644 --- a/lib/ssh/src/ssh_options.erl +++ b/lib/ssh/src/ssh_options.erl @@ -293,12 +293,6 @@ default(server) -> class => user_options }, - {auth_methods, def} => - #{default => ?SUPPORTED_AUTH_METHODS, - chk => fun check_string/1, - class => user_options - }, - {auth_method_kb_interactive_data, def} => #{default => undefined, % Default value can be constructed when User is known chk => fun({S1,S2,S3,B}) -> @@ -582,6 +576,21 @@ default(common) -> class => user_options }, + {auth_methods, def} => + #{default => ?SUPPORTED_AUTH_METHODS, + chk => fun(As) -> + try + Sup = string:tokens(?SUPPORTED_AUTH_METHODS, ","), + New = string:tokens(As, ","), + [] == [X || X <- New, + not lists:member(X,Sup)] + catch + _:_ -> false + end + end, + class => user_options + }, + %%%%% Undocumented {transport, def} => #{default => ?DEFAULT_TRANSPORT, |