Commit 340cd227 authored by Jonathan Pittman's avatar Jonathan Pittman

go.crypto/ssh: cosmetic only spelling fixes

R=agl, hanwen
CC=dave, golang-dev, jpsugar
https://codereview.appspot.com/14430055

Committer: Adam Langley <agl@golang.org>
parent 417f4b54
...@@ -49,7 +49,7 @@ type Channel interface { ...@@ -49,7 +49,7 @@ type Channel interface {
// ChannelType returns the type of the channel, as supplied by the // ChannelType returns the type of the channel, as supplied by the
// client. // client.
ChannelType() string 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. // by the client. This data is specific to the channel type.
ExtraData() []byte ExtraData() []byte
} }
...@@ -516,7 +516,7 @@ func (w *chanWriter) Write(data []byte) (written int, err error) { ...@@ -516,7 +516,7 @@ func (w *chanWriter) Write(data []byte) (written int, err error) {
return return
} }
// never send more data than maxPacket even if // never send more data than maxPacket even if
// there is sufficent window. // there is sufficient window.
n := min(w.maxPacket-headerLength, len(data)) n := min(w.maxPacket-headerLength, len(data))
r := w.remoteWin.reserve(n) r := w.remoteWin.reserve(n)
n = r n = r
......
...@@ -196,7 +196,7 @@ func (c *ClientConn) mainLoop() { ...@@ -196,7 +196,7 @@ func (c *ClientConn) mainLoop() {
} }
// TODO(dfc) A note on blocking channel use. // TODO(dfc) A note on blocking channel use.
// The msg, data and dataExt channels of a clientChan can // 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. // not service them.
switch packet[0] { switch packet[0] {
case msgChannelData: case msgChannelData:
...@@ -343,7 +343,7 @@ func (c *ClientConn) handleChanOpen(msg *channelOpenMsg) { ...@@ -343,7 +343,7 @@ func (c *ClientConn) handleChanOpen(msg *channelOpenMsg) {
if !ok { if !ok {
// TODO: print on a more structured log. // TODO: print on a more structured log.
fmt.Println("could not find forward list entry for", laddr) 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. // connections.
c.sendConnectionFailed(msg.PeersId) c.sendConnectionFailed(msg.PeersId)
return return
......
...@@ -172,7 +172,7 @@ type publickeyAuthMsg struct { ...@@ -172,7 +172,7 @@ type publickeyAuthMsg struct {
User string User string
Service string Service string
Method 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. // should be used for authentication of the request.
HasSig bool HasSig bool
Algoname string Algoname string
......
...@@ -234,7 +234,7 @@ func pubAlgoToPrivAlgo(pubAlgo string) string { ...@@ -234,7 +234,7 @@ func pubAlgoToPrivAlgo(pubAlgo string) string {
} }
// buildDataSignedForAuth returns the data that is signed in order to prove // 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 { func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte {
user := []byte(req.User) user := []byte(req.User)
service := []byte(req.Service) service := []byte(req.Service)
......
...@@ -282,7 +282,7 @@ func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { ...@@ -282,7 +282,7 @@ func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool {
// We don't check if N * PubKey == 0, since // We don't check if N * PubKey == 0, since
// //
// - the NIST curves have cofactor = 1, so this is implicit. // - 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) // curves)
// //
// - for ephemeral keys, we don't need to worry about small // - for ephemeral keys, we don't need to worry about small
......
...@@ -35,7 +35,7 @@ type ServerConfig struct { ...@@ -35,7 +35,7 @@ type ServerConfig struct {
PasswordCallback func(conn *ServerConn, user, password string) bool PasswordCallback func(conn *ServerConn, user, password string) bool
// PublicKeyCallback, if non-nil, is called when a client attempts public // 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. // valid for the given user.
PublicKeyCallback func(conn *ServerConn, user, algo string, pubkey []byte) bool PublicKeyCallback func(conn *ServerConn, user, algo string, pubkey []byte) bool
...@@ -378,7 +378,7 @@ userAuthLoop: ...@@ -378,7 +378,7 @@ userAuthLoop:
} }
if isQuery { if isQuery {
// The client can query if the given public key // The client can query if the given public key
// would be ok. // would be okay.
if len(payload) > 0 { if len(payload) > 0 {
return ParseError{msgUserAuthRequest} return ParseError{msgUserAuthRequest}
} }
......
...@@ -348,7 +348,7 @@ func (s *Session) Shell() error { ...@@ -348,7 +348,7 @@ func (s *Session) Shell() error {
return err return err
} }
if err := s.waitForResponse(); err != nil { 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() return s.start()
} }
...@@ -531,7 +531,7 @@ func (s *Session) StdinPipe() (io.WriteCloser, error) { ...@@ -531,7 +531,7 @@ func (s *Session) StdinPipe() (io.WriteCloser, error) {
// remote command's standard output when the command starts. // remote command's standard output when the command starts.
// There is a fixed amount of buffering that is shared between // There is a fixed amount of buffering that is shared between
// stdout and stderr streams. If the StdoutPipe reader is // 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. // remote command to block.
func (s *Session) StdoutPipe() (io.Reader, error) { func (s *Session) StdoutPipe() (io.Reader, error) {
if s.Stdout != nil { if s.Stdout != nil {
...@@ -548,7 +548,7 @@ func (s *Session) StdoutPipe() (io.Reader, error) { ...@@ -548,7 +548,7 @@ func (s *Session) StdoutPipe() (io.Reader, error) {
// remote command's standard error when the command starts. // remote command's standard error when the command starts.
// There is a fixed amount of buffering that is shared between // There is a fixed amount of buffering that is shared between
// stdout and stderr streams. If the StderrPipe reader is // 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. // remote command to block.
func (s *Session) StderrPipe() (io.Reader, error) { func (s *Session) StderrPipe() (io.Reader, error) {
if s.Stderr != nil { if s.Stderr != nil {
......
...@@ -528,7 +528,7 @@ func TestServerWindow(t *testing.T) { ...@@ -528,7 +528,7 @@ func TestServerWindow(t *testing.T) {
} }
written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes) written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes)
if err != nil { 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 { if written != windowTestBytes {
t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes) t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes)
......
...@@ -293,7 +293,7 @@ type channelOpenDirectMsg struct { ...@@ -293,7 +293,7 @@ type channelOpenDirectMsg struct {
} }
// dial opens a direct-tcpip connection to the remote server. laddr and raddr are passed as // 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) { func (c *ClientConn) dial(laddr string, lport int, raddr string, rport int) (*tcpChan, error) {
ch := c.newChan(c.transport) ch := c.newChan(c.transport)
if err := c.writePacket(marshal(msgChannelOpen, channelOpenDirectMsg{ if err := c.writePacket(marshal(msgChannelOpen, channelOpenDirectMsg{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment