diff options
author | Hans Nilsson <[email protected]> | 2018-11-19 17:25:13 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-11-19 17:25:13 +0100 |
commit | 68b7a5fb25a06131220e01876c0b1e5434161da3 (patch) | |
tree | 8ac2c12ece1268997b6f0fe8a9ee2dfb63bbe4eb /lib/ssh/src/ssh_file.erl | |
parent | cc2ab960ec1ac8702303cd4d80e12118089f97ca (diff) | |
parent | a2180a92bf9c52b4a98376317ab90ade742cc978 (diff) | |
download | otp-68b7a5fb25a06131220e01876c0b1e5434161da3.tar.gz otp-68b7a5fb25a06131220e01876c0b1e5434161da3.tar.bz2 otp-68b7a5fb25a06131220e01876c0b1e5434161da3.zip |
Merge branch 'hans/ssh/eddsa/OTP-15094' into maint
* hans/ssh/eddsa/OTP-15094:
ssh: Add Edward curves to the documentation
ssh: Update test cases for eddsa
ssh: Add public keys 'ssh-ed25519' and 'ssh-ed448'
Diffstat (limited to 'lib/ssh/src/ssh_file.erl')
-rw-r--r-- | lib/ssh/src/ssh_file.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index c5824b2519..510269bbb1 100644 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -52,10 +52,11 @@ -type pubkey_passphrase_client_options() :: {dsa_pass_phrase, string()} | {rsa_pass_phrase, string()} +%% Not yet implemented: | {ed25519_pass_phrase, string()} +%% Not yet implemented: | {ed448_pass_phrase, string()} | {ecdsa_pass_phrase, string()} . - -define(PERM_700, 8#700). -define(PERM_644, 8#644). @@ -120,6 +121,8 @@ file_base_name('ssh-dss' ) -> "ssh_host_dsa_key"; file_base_name('ecdsa-sha2-nistp256') -> "ssh_host_ecdsa_key"; file_base_name('ecdsa-sha2-nistp384') -> "ssh_host_ecdsa_key"; file_base_name('ecdsa-sha2-nistp521') -> "ssh_host_ecdsa_key"; +file_base_name('ssh-ed25519' ) -> "ssh_host_ed25519_key"; +file_base_name('ssh-ed448' ) -> "ssh_host_ed448_key"; file_base_name(_ ) -> "ssh_host_key". decode(File, Password) -> @@ -257,6 +260,8 @@ identity_key_filename('ssh-rsa' ) -> "id_rsa"; identity_key_filename('rsa-sha2-256' ) -> "id_rsa"; identity_key_filename('rsa-sha2-384' ) -> "id_rsa"; identity_key_filename('rsa-sha2-512' ) -> "id_rsa"; +identity_key_filename('ssh-ed25519' ) -> "id_ed25519"; +identity_key_filename('ssh-ed448' ) -> "id_ed448"; identity_key_filename('ecdsa-sha2-nistp256') -> "id_ecdsa"; identity_key_filename('ecdsa-sha2-nistp384') -> "id_ecdsa"; identity_key_filename('ecdsa-sha2-nistp521') -> "id_ecdsa". @@ -266,6 +271,8 @@ identity_pass_phrase("ssh-rsa" ) -> rsa_pass_phrase; identity_pass_phrase("rsa-sha2-256" ) -> rsa_pass_phrase; identity_pass_phrase("rsa-sha2-384" ) -> rsa_pass_phrase; identity_pass_phrase("rsa-sha2-512" ) -> rsa_pass_phrase; +%% Not yet implemented: identity_pass_phrase("ssh-ed25519" ) -> ed25519_pass_phrase; +%% Not yet implemented: identity_pass_phrase("ssh-ed448" ) -> ed448_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)); @@ -319,6 +326,10 @@ key_match({#'ECPoint'{},{namedCurve,Curve}}, Alg) -> _ -> false end; +key_match({ed_pub,ed25519,_}, 'ssh-ed25519') -> + true; +key_match({ed_pub,ed448,_}, 'ssh-ed448') -> + true; key_match(_, _) -> false. |