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:
committed by
Adam Langley
parent
470549d502
commit
2b43ac23a9
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user