diff options
author | Hans Nilsson <[email protected]> | 2017-12-15 12:31:35 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-12-15 12:31:35 +0100 |
commit | ffc5d16de3350e754a4d4da2be42d29b821233e1 (patch) | |
tree | 762cfc29339c362a7519764dbf97071dcf2fba01 /lib/ssh/src/ssh_auth.erl | |
parent | 9b61f4f4b26a77ca08b2a4a4f7776aac58bdff53 (diff) | |
parent | 3a14bb468b1f3f1f5bef3c18291fe0498429a417 (diff) | |
download | otp-ffc5d16de3350e754a4d4da2be42d29b821233e1.tar.gz otp-ffc5d16de3350e754a4d4da2be42d29b821233e1.tar.bz2 otp-ffc5d16de3350e754a4d4da2be42d29b821233e1.zip |
Merge branch 'maint-20' into maint
* maint-20:
Updated OTP version
Prepare release
ssh: Special treatment of OpenSSH clients >= 7.2 rsa-sha2-* public keys
Diffstat (limited to 'lib/ssh/src/ssh_auth.erl')
-rw-r--r-- | lib/ssh/src/ssh_auth.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl index 894877f8bf..03d264745b 100644 --- a/lib/ssh/src/ssh_auth.erl +++ b/lib/ssh/src/ssh_auth.erl @@ -304,11 +304,10 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User, SigWLen/binary>> }, SessionId, - #ssh{opts = Opts, - userauth_supported_methods = Methods} = Ssh) -> + #ssh{userauth_supported_methods = Methods} = Ssh) -> case verify_sig(SessionId, User, "ssh-connection", - BAlg, KeyBlob, SigWLen, Opts) of + BAlg, KeyBlob, SigWLen, Ssh) of true -> {authorized, User, ssh_transport:ssh_packet( @@ -518,7 +517,7 @@ pre_verify_sig(User, KeyBlob, Opts) -> false end. -verify_sig(SessionId, User, Service, AlgBin, KeyBlob, SigWLen, Opts) -> +verify_sig(SessionId, User, Service, AlgBin, KeyBlob, SigWLen, #ssh{opts = Opts} = Ssh) -> try Alg = binary_to_list(AlgBin), {KeyCb,KeyCbOpts} = ?GET_OPT(key_cb, Opts), @@ -529,7 +528,7 @@ verify_sig(SessionId, User, Service, AlgBin, KeyBlob, SigWLen, Opts) -> <<?UINT32(AlgSigLen), AlgSig:AlgSigLen/binary>> = SigWLen, <<?UINT32(AlgLen), _Alg:AlgLen/binary, ?UINT32(SigLen), Sig:SigLen/binary>> = AlgSig, - ssh_transport:verify(PlainText, ssh_transport:sha(Alg), Sig, Key) + ssh_transport:verify(PlainText, ssh_transport:sha(Alg), Sig, Key, Ssh) catch _:_ -> false |