passwordMessage builds a client PasswordMessage ('p') for the given password.
(t *testing.T, password string)
| 10 | |
| 11 | // passwordMessage builds a client PasswordMessage ('p') for the given password. |
| 12 | func passwordMessage(t *testing.T, password string) []byte { |
| 13 | t.Helper() |
| 14 | var buf bytes.Buffer |
| 15 | if err := wire.WriteMessage(&buf, wire.MsgPassword, append([]byte(password), 0)); err != nil { |
| 16 | t.Fatalf("failed to build password message: %v", err) |
| 17 | } |
| 18 | return buf.Bytes() |
| 19 | } |
| 20 | |
| 21 | // runChildAuth feeds clientBytes to authenticateChildClient and returns the |
| 22 | // exit code plus everything the server wrote to the client. |
no test coverage detected