diff options
author | Hans Nilsson <[email protected]> | 2018-04-25 16:03:50 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-04-25 16:03:50 +0200 |
commit | 511091f08c8ace2a2b964d7ff123e891ad4deeef (patch) | |
tree | f3d6eb31615b608fc174c6d6312938976b3445ac /lib/ssh/src/ssh_client_key_api.erl | |
parent | 960467ead200635cb935dfd3aa5a5abe38299ca6 (diff) | |
parent | b9c0b5c15f71dc1384c8e6b98fb2fae1987b14b5 (diff) | |
download | otp-511091f08c8ace2a2b964d7ff123e891ad4deeef.tar.gz otp-511091f08c8ace2a2b964d7ff123e891ad4deeef.tar.bz2 otp-511091f08c8ace2a2b964d7ff123e891ad4deeef.zip |
Merge branch 'hans/ssh/type_changes/OTP-15002'
* hans/ssh/type_changes/OTP-15002:
ssh: Changes suggested by dialyzer
ssh: New -spec and -type
Diffstat (limited to 'lib/ssh/src/ssh_client_key_api.erl')
-rw-r--r-- | lib/ssh/src/ssh_client_key_api.erl | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/ssh/src/ssh_client_key_api.erl b/lib/ssh/src/ssh_client_key_api.erl index 6e994ff292..d0d8ab25d6 100644 --- a/lib/ssh/src/ssh_client_key_api.erl +++ b/lib/ssh/src/ssh_client_key_api.erl @@ -23,26 +23,25 @@ -include_lib("public_key/include/public_key.hrl"). -include("ssh.hrl"). --export_type([algorithm/0]). - --type algorithm() :: 'ssh-rsa' - | 'ssh-dss' - | 'ecdsa-sha2-nistp256' - | 'ecdsa-sha2-nistp384' - | 'ecdsa-sha2-nistp521' - . - --callback is_host_key(PublicKey :: public_key:public_key(), - Host :: string(), - Algorithm :: algorithm(), - ConnectOptions :: proplists:proplist()) -> +-export_type([client_key_cb_options/0]). + +-type client_key_cb_options() :: [{key_cb_private,term()} | ssh:client_option()]. + +-callback is_host_key(Key :: public_key:public_key(), + Host :: string(), + Algorithm :: ssh:pubkey_alg(), + Options :: client_key_cb_options() + ) -> boolean(). --callback user_key(Algorithm :: algorithm(), - ConnectOptions :: proplists:proplist()) -> - {ok, PrivateKey::public_key:private_key()} | {error, term()}. +-callback user_key(Algorithm :: ssh:pubkey_alg(), + Options :: client_key_cb_options() + ) -> + {ok, PrivateKey :: public_key:private_key()} | {error, string()}. --callback add_host_key(Host :: string(), PublicKey :: public_key:public_key(), - Options :: proplists:proplist()) -> +-callback add_host_key(Host :: string(), + PublicKey :: public_key:public_key(), + Options :: client_key_cb_options() + ) -> ok | {error, Error::term()}. |