diff options
| author | Han-Wen Nienhuys <hanwen@google.com> | 2018-01-22 22:46:34 +0100 |
|---|---|---|
| committer | Han-Wen Nienhuys <hanwen@google.com> | 2018-01-23 09:55:55 +0000 |
| commit | 3d37316aaa6bd9929127ac9a527abf408178ea7b (patch) | |
| tree | c7d261fd50b2fc6d83112b8a0d0c0dfbcb1345c8 /ssh/cipher.go | |
| parent | d94f6bc902c2970500950e88ab1a54a0c26bec48 (diff) | |
| download | go-x-crypto-3d37316aaa6bd9929127ac9a527abf408178ea7b.tar.xz | |
ssh: return correct error on read failure
Change-Id: I6cc94ae8dbc65f394550551eaad88594d22eda42
Reviewed-on: https://go-review.googlesource.com/89095
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'ssh/cipher.go')
| -rw-r--r-- | ssh/cipher.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh/cipher.go b/ssh/cipher.go index 6f25076..30a49fd 100644 --- a/ssh/cipher.go +++ b/ssh/cipher.go @@ -693,7 +693,7 @@ func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte, } if _, err := io.ReadFull(r, c.buf[4:packetEnd]); err != nil { - return nil, errors.New("ssh: MAC failure") + return nil, err } var mac [poly1305.TagSize]byte |
