go.crypto/ssh: add User to ServerConn and pass *ServerConn to callbacks.

R=golang-dev, dave, agl
CC=golang-dev
https://golang.org/cl/5577070
This commit is contained in:
Daniel Theophanes
2012-01-30 15:30:11 -05:00
committed by Adam Langley
parent 470549d502
commit 2b43ac23a9
3 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ type serverType func(*channel)
// dial constructs a new test server and returns a *ClientConn.
func dial(handler serverType, t *testing.T) *ClientConn {
pw := password("tiger")
serverConfig.PasswordCallback = func(user, pass string) bool {
serverConfig.PasswordCallback = func(conn *ServerConn, user, pass string) bool {
return user == "testuser" && pass == string(pw)
}
serverConfig.PublicKeyCallback = nil