diff options
author | Hans Nilsson <[email protected]> | 2015-10-19 12:43:47 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-10-19 12:43:47 +0200 |
commit | 5ea9a240688f43f81eb607d79e4161f9085024e7 (patch) | |
tree | 15795977e2a9cff06913cc1c41ba6bf96b39fa7d /lib/ssh/src/ssh_file.erl | |
parent | 5f73e439578c4356db26804f47e8b50901a8e45a (diff) | |
parent | fdae664715f6b64e3f0c61729344bc372b67e1e2 (diff) | |
download | otp-5ea9a240688f43f81eb607d79e4161f9085024e7.tar.gz otp-5ea9a240688f43f81eb607d79e4161f9085024e7.tar.bz2 otp-5ea9a240688f43f81eb607d79e4161f9085024e7.zip |
Merge branch 'maint'
* maint:
ssh: Implemented ssh_transport:ecdh_validate_public_key (partly)
ssh: dialyzer fix
public_key: add/update -spec for ssh functions
ssh, public_key: use pubkey encode/decode in app public_key
ssh, public_key: Change EC Public Key representation to what was intended
Diffstat (limited to 'lib/ssh/src/ssh_file.erl')
-rw-r--r-- | lib/ssh/src/ssh_file.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 4e6d58cbff..c087ce14d7 100644 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -276,12 +276,13 @@ key_match(#'RSAPublicKey'{}, 'ssh-rsa') -> true; key_match({_, #'Dss-Parms'{}}, 'ssh-dss') -> true; -key_match({#'ECPoint'{},<<"nistp256">>}, 'ecdsa-sha2-nistp256') -> - true; -key_match({#'ECPoint'{},<<"nistp384">>}, 'ecdsa-sha2-nistp384') -> - true; -key_match({#'ECPoint'{},<<"nistp521">>}, 'ecdsa-sha2-nistp521') -> - true; +key_match({#'ECPoint'{},{namedCurve,Curve}}, Alg) -> + case atom_to_list(Alg) of + "ecdsa-sha2-"++IdS -> + Curve == public_key:ssh_curvename2oid(list_to_binary(IdS)); + _ -> + false + end; key_match(_, _) -> false. |