Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh: Port lib/ssh from x/crypto v0.7.0 #399

Merged
merged 8 commits into from
Jan 27, 2025
Prev Previous commit
make lint
  • Loading branch information
phillip-stephens committed Jan 27, 2025
commit 0e70fb296171f3a65f4445e0da097290172c98fe
10 changes: 5 additions & 5 deletions lib/ssh/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,35 +82,35 @@ func TestFindAgreedAlgorithms(t *testing.T) {
}

cases := []testcase{
testcase{
{
name: "standard",
},

testcase{
{
name: "no common hostkey",
serverIn: kexInitMsg{
ServerHostKeyAlgos: []string{"hostkey2"},
},
wantErr: true,
},

testcase{
{
name: "no common kex",
serverIn: kexInitMsg{
KexAlgos: []string{"kex2"},
},
wantErr: true,
},

testcase{
{
name: "no common cipher",
serverIn: kexInitMsg{
CiphersClientServer: []string{"cipher2"},
},
wantErr: true,
},

testcase{
{
name: "client decides cipher",
serverIn: kexInitMsg{
CiphersClientServer: []string{"cipher1", "cipher2"},
Expand Down
10 changes: 5 additions & 5 deletions lib/ssh/test/multi_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,27 @@ func (ctx *multiAuthTestCtx) kbdIntCb(user, instruction string, questions []stri
func TestMultiAuth(t *testing.T) {
testCases := []multiAuthTestCase{
// Test password,publickey authentication, assert that password callback is called 1 time
multiAuthTestCase{
{
authMethods: []string{"password", "publickey"},
expectedPasswordCbs: 1,
},
// Test keyboard-interactive,publickey authentication, assert that keyboard-interactive callback is called 1 time
multiAuthTestCase{
{
authMethods: []string{"keyboard-interactive", "publickey"},
expectedKbdIntCbs: 1,
},
// Test publickey,password authentication, assert that password callback is called 1 time
multiAuthTestCase{
{
authMethods: []string{"publickey", "password"},
expectedPasswordCbs: 1,
},
// Test publickey,keyboard-interactive authentication, assert that keyboard-interactive callback is called 1 time
multiAuthTestCase{
{
authMethods: []string{"publickey", "keyboard-interactive"},
expectedKbdIntCbs: 1,
},
// Test password,password authentication, assert that password callback is called 2 times
multiAuthTestCase{
{
authMethods: []string{"password", "password"},
expectedPasswordCbs: 2,
},
Expand Down
Loading