From 44256fa2dfb760488af0b3f966ab00bcf98b1411 Mon Sep 17 00:00:00 2001 From: Jonathan Pittman Date: Thu, 10 Oct 2013 11:35:15 -0400 Subject: [PATCH] go.crypto/ssh: cosmetic only spelling fixes R=agl, hanwen CC=dave, golang-dev, jpsugar https://golang.org/cl/14430055 --- ssh/channel.go | 4 ++-- ssh/client.go | 4 ++-- ssh/client_auth.go | 2 +- ssh/common.go | 2 +- ssh/kex.go | 2 +- ssh/server.go | 4 ++-- ssh/session.go | 6 +++--- ssh/session_test.go | 2 +- ssh/tcpip.go | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ssh/channel.go b/ssh/channel.go index 336f7f7..4861e41 100644 --- a/ssh/channel.go +++ b/ssh/channel.go @@ -49,7 +49,7 @@ type Channel interface { // ChannelType returns the type of the channel, as supplied by the // client. ChannelType() string - // ExtraData returns the arbitary payload for this channel, as supplied + // ExtraData returns the arbitrary payload for this channel, as supplied // by the client. This data is specific to the channel type. ExtraData() []byte } @@ -516,7 +516,7 @@ func (w *chanWriter) Write(data []byte) (written int, err error) { return } // never send more data than maxPacket even if - // there is sufficent window. + // there is sufficient window. n := min(w.maxPacket-headerLength, len(data)) r := w.remoteWin.reserve(n) n = r diff --git a/ssh/client.go b/ssh/client.go index 7ce17ca..1fd9d5b 100644 --- a/ssh/client.go +++ b/ssh/client.go @@ -196,7 +196,7 @@ func (c *ClientConn) mainLoop() { } // TODO(dfc) A note on blocking channel use. // The msg, data and dataExt channels of a clientChan can - // cause this loop to block indefinately if the consumer does + // cause this loop to block indefinitely if the consumer does // not service them. switch packet[0] { case msgChannelData: @@ -343,7 +343,7 @@ func (c *ClientConn) handleChanOpen(msg *channelOpenMsg) { if !ok { // TODO: print on a more structured log. fmt.Println("could not find forward list entry for", laddr) - // Section 7.2, implementations MUST reject suprious incoming + // Section 7.2, implementations MUST reject spurious incoming // connections. c.sendConnectionFailed(msg.PeersId) return diff --git a/ssh/client_auth.go b/ssh/client_auth.go index d2ed48e..47443b3 100644 --- a/ssh/client_auth.go +++ b/ssh/client_auth.go @@ -172,7 +172,7 @@ type publickeyAuthMsg struct { User string Service string Method string - // HasSig indicates to the reciver packet that the auth request is signed and + // HasSig indicates to the receiver packet that the auth request is signed and // should be used for authentication of the request. HasSig bool Algoname string diff --git a/ssh/common.go b/ssh/common.go index 44f15a3..4870e56 100644 --- a/ssh/common.go +++ b/ssh/common.go @@ -234,7 +234,7 @@ func pubAlgoToPrivAlgo(pubAlgo string) string { } // buildDataSignedForAuth returns the data that is signed in order to prove -// posession of a private key. See RFC 4252, section 7. +// possession of a private key. See RFC 4252, section 7. func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { user := []byte(req.User) service := []byte(req.Service) diff --git a/ssh/kex.go b/ssh/kex.go index a761cd8..d2e3b70 100644 --- a/ssh/kex.go +++ b/ssh/kex.go @@ -282,7 +282,7 @@ func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { // We don't check if N * PubKey == 0, since // // - the NIST curves have cofactor = 1, so this is implicit. - // (We don't forsee an implementation that supports non NIST + // (We don't foresee an implementation that supports non NIST // curves) // // - for ephemeral keys, we don't need to worry about small diff --git a/ssh/server.go b/ssh/server.go index 86f0970..9550a42 100644 --- a/ssh/server.go +++ b/ssh/server.go @@ -35,7 +35,7 @@ type ServerConfig struct { PasswordCallback func(conn *ServerConn, user, password string) bool // PublicKeyCallback, if non-nil, is called when a client attempts public - // key authentication. It must return true iff the given public key is + // key authentication. It must return true if the given public key is // valid for the given user. PublicKeyCallback func(conn *ServerConn, user, algo string, pubkey []byte) bool @@ -378,7 +378,7 @@ userAuthLoop: } if isQuery { // The client can query if the given public key - // would be ok. + // would be okay. if len(payload) > 0 { return ParseError{msgUserAuthRequest} } diff --git a/ssh/session.go b/ssh/session.go index 2576024..4fa2994 100644 --- a/ssh/session.go +++ b/ssh/session.go @@ -348,7 +348,7 @@ func (s *Session) Shell() error { return err } if err := s.waitForResponse(); err != nil { - return fmt.Errorf("ssh: cound not execute shell: %v", err) + return fmt.Errorf("ssh: could not execute shell: %v", err) } return s.start() } @@ -531,7 +531,7 @@ func (s *Session) StdinPipe() (io.WriteCloser, error) { // remote command's standard output when the command starts. // There is a fixed amount of buffering that is shared between // stdout and stderr streams. If the StdoutPipe reader is -// not serviced fast enought it may eventually cause the +// not serviced fast enough it may eventually cause the // remote command to block. func (s *Session) StdoutPipe() (io.Reader, error) { if s.Stdout != nil { @@ -548,7 +548,7 @@ func (s *Session) StdoutPipe() (io.Reader, error) { // remote command's standard error when the command starts. // There is a fixed amount of buffering that is shared between // stdout and stderr streams. If the StderrPipe reader is -// not serviced fast enought it may eventually cause the +// not serviced fast enough it may eventually cause the // remote command to block. func (s *Session) StderrPipe() (io.Reader, error) { if s.Stderr != nil { diff --git a/ssh/session_test.go b/ssh/session_test.go index d168ce8..5cff58a 100644 --- a/ssh/session_test.go +++ b/ssh/session_test.go @@ -528,7 +528,7 @@ func TestServerWindow(t *testing.T) { } written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes) if err != nil { - t.Fatalf("falied to copy origBuf to serverStdin: %v", err) + t.Fatalf("failed to copy origBuf to serverStdin: %v", err) } if written != windowTestBytes { t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes) diff --git a/ssh/tcpip.go b/ssh/tcpip.go index 05de3e1..4ee4d1b 100644 --- a/ssh/tcpip.go +++ b/ssh/tcpip.go @@ -293,7 +293,7 @@ type channelOpenDirectMsg struct { } // dial opens a direct-tcpip connection to the remote server. laddr and raddr are passed as -// strings and are expected to be resolveable at the remote end. +// strings and are expected to be resolvable at the remote end. func (c *ClientConn) dial(laddr string, lport int, raddr string, rport int) (*tcpChan, error) { ch := c.newChan(c.transport) if err := c.writePacket(marshal(msgChannelOpen, channelOpenDirectMsg{