aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_auth.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-09-06 14:29:30 +0200
committerHans Nilsson <[email protected]>2016-09-06 14:29:30 +0200
commit9da5e0fae44d8c85ad14e20e27568f86ad52cc0f (patch)
tree10339e1e33d318c05015f3cd4eb819dcea964077 /lib/ssh/src/ssh_auth.erl
parent10ffae2b1c12f6d564dfc3fbf3e316491b71b2c3 (diff)
parent9b988fa6edd9db2396ade2141e14f0fc7b68cfd2 (diff)
downloadotp-9da5e0fae44d8c85ad14e20e27568f86ad52cc0f.tar.gz
otp-9da5e0fae44d8c85ad14e20e27568f86ad52cc0f.tar.bz2
otp-9da5e0fae44d8c85ad14e20e27568f86ad52cc0f.zip
Merge branch 'hans/ssh/correct_sha_ecdsa/OTP-13850' into maint
Diffstat (limited to 'lib/ssh/src/ssh_auth.erl')
-rw-r--r--lib/ssh/src/ssh_auth.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 1dcf5d0708..afc6ec5a56 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -140,7 +140,7 @@ publickey_msg([Alg, #ssh{user = User,
session_id = SessionId,
service = Service,
opts = Opts} = Ssh]) ->
- Hash = sha, %% Maybe option?!
+ Hash = ssh_transport:sha(Alg),
KeyCb = proplists:get_value(key_cb, Opts, ssh_file),
case KeyCb:user_key(Alg, Opts) of
{ok, PrivKey} ->
@@ -495,7 +495,7 @@ verify_sig(SessionId, User, Service, Alg, KeyBlob, SigWLen, Opts) ->
<<?UINT32(AlgSigLen), AlgSig:AlgSigLen/binary>> = SigWLen,
<<?UINT32(AlgLen), _Alg:AlgLen/binary,
?UINT32(SigLen), Sig:SigLen/binary>> = AlgSig,
- ssh_transport:verify(PlainText, sha, Sig, Key);
+ ssh_transport:verify(PlainText, ssh_transport:sha(list_to_atom(Alg)), Sig, Key);
false ->
false
end.