Skip to content

Commit

Permalink
ssh: handle error from prepareKeyChange.
Browse files Browse the repository at this point in the history
Fixes #18850.

Change-Id: Id3ae89233f9e95ec3238462bf2ecda3e0c515f88
Reviewed-on: https://go-review.googlesource.com/36051
Run-TryBot: Han-Wen Nienhuys <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Adam Langley <[email protected]>
  • Loading branch information
hanwen committed Mar 30, 2017
1 parent e4e2799 commit 9d2d6c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssh/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,9 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
}
result.SessionID = t.sessionID

t.conn.prepareKeyChange(t.algorithms, result)
if err := t.conn.prepareKeyChange(t.algorithms, result); err != nil {
return err
}
if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil {
return err
}
Expand Down

0 comments on commit 9d2d6c1

Please sign in to comment.