diff options
author | Hans Nilsson <[email protected]> | 2018-11-14 12:57:46 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-11-19 17:23:35 +0100 |
commit | b4ad3a9eb7a1b375d2dbbf93069ea9ae038d121f (patch) | |
tree | 349407e3ad051220b8cc3a12474022927145bfde /lib/ssh/src/ssh_file.erl | |
parent | 709534a5417f20f8edda1d3664669ed9d3129354 (diff) | |
download | otp-b4ad3a9eb7a1b375d2dbbf93069ea9ae038d121f.tar.gz otp-b4ad3a9eb7a1b375d2dbbf93069ea9ae038d121f.tar.bz2 otp-b4ad3a9eb7a1b375d2dbbf93069ea9ae038d121f.zip |
ssh: Make host and user key pre-checking better
This will prevent crashes in ssh_file for public key types which have no passphrase option although being supported.
Also centralize host key checking to avoid code duplication. This was already done for user keys.
Diffstat (limited to 'lib/ssh/src/ssh_file.erl')
-rw-r--r-- | lib/ssh/src/ssh_file.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 669b0f9be2..c5824b2519 100644 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -268,7 +268,8 @@ identity_pass_phrase("rsa-sha2-384" ) -> rsa_pass_phrase; identity_pass_phrase("rsa-sha2-512" ) -> rsa_pass_phrase; identity_pass_phrase("ecdsa-sha2-"++_) -> ecdsa_pass_phrase; identity_pass_phrase(P) when is_atom(P) -> - identity_pass_phrase(atom_to_list(P)). + identity_pass_phrase(atom_to_list(P)); +identity_pass_phrase(_) -> undefined. lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType) -> case io:get_line(Fd, '') of |