diff options
| author | Adam Langley <agl@golang.org> | 2012-04-20 15:17:42 -0400 |
|---|---|---|
| committer | Adam Langley <agl@golang.org> | 2012-04-20 15:17:42 -0400 |
| commit | 63f855d724c1fff8ec15a0191dcda32ec7761cc4 (patch) | |
| tree | 5f5614323b139c2a90b1b49ea0cf05c4ed54fdb5 /ssh/client_auth_test.go | |
| parent | 81e0b644eb2f05832b1801391bc9386a81e4fe45 (diff) | |
| download | go-x-crypto-63f855d724c1fff8ec15a0191dcda32ec7761cc4.tar.xz | |
ssh: cosmetic cleanups
These are the cosmetic cleanups from the bits of code that I
rereviewed.
1) stringLength now takes a int; the length of the string. Too many
callers were allocating with stringLength([]byte(s)) and
stringLength only needs to call len().
2) agent.go now has sendAndReceive to remove logic that was
duplicated.
3) We now reject negative DH values
4) We now reject empty packets rather than crashing.
R=dave, jonathan.mark.pittman
CC=golang-dev
https://golang.org/cl/6061052
Diffstat (limited to 'ssh/client_auth_test.go')
| -rw-r--r-- | ssh/client_auth_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh/client_auth_test.go b/ssh/client_auth_test.go index c1c57ba..9d1ae2f 100644 --- a/ssh/client_auth_test.go +++ b/ssh/client_auth_test.go @@ -85,7 +85,7 @@ func (k *keychain) Sign(i int, rand io.Reader, data []byte) (sig []byte, err err case *rsa.PrivateKey: return rsa.SignPKCS1v15(rand, key, hashFunc, digest) } - return nil, errors.New("unknown key type") + return nil, errors.New("ssh: unknown key type") } func (k *keychain) loadPEM(file string) error { |
