go.crypto/ssh: in {Server,Client}Conn, read session ID from

transport layer.

R=agl, dave
CC=golang-dev
https://golang.org/cl/15870044
This commit is contained in:
Han-Wen Nienhuys
2013-10-25 11:15:34 -04:00
committed by Adam Langley
parent c0d640c887
commit 34df1ce598
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import (
)
// authenticate authenticates with the remote server. See RFC 4252.
func (c *ClientConn) authenticate(session []byte) error {
func (c *ClientConn) authenticate() error {
// initiate user auth session
if err := c.transport.writePacket(marshal(msgServiceRequest, serviceRequestMsg{serviceUserAuth})); err != nil {
return err
@@ -29,7 +29,7 @@ func (c *ClientConn) authenticate(session []byte) error {
// then any untried methods suggested by the server.
tried, remain := make(map[string]bool), make(map[string]bool)
for auth := ClientAuth(new(noneAuth)); auth != nil; {
ok, methods, err := auth.auth(session, c.config.User, c.transport, c.config.rand())
ok, methods, err := auth.auth(c.transport.sessionID, c.config.User, c.transport, c.config.rand())
if err != nil {
return err
}