~ubuntu-branches/ubuntu/saucy/juju-core/saucy-updates

« back to all changes in this revision

Viewing changes to src/code.google.com/p/go.crypto/ssh/client_auth_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-09-03 14:22:22 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20130903142222-9mes2r8wqr0bs7lp
Tags: 1.13.3-0ubuntu1
New upstream point release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        "io"
17
17
        "io/ioutil"
18
18
        "math/big"
 
19
        "strings"
19
20
        "testing"
20
21
)
21
22
 
356
357
                c.Close()
357
358
        }
358
359
}
 
360
 
 
361
func TestClientUnsupportedKex(t *testing.T) {
 
362
        kc := new(keychain)
 
363
        kc.keys = append(kc.keys, rsakey)
 
364
        config := &ClientConfig{
 
365
                User: "testuser",
 
366
                Auth: []ClientAuth{
 
367
                        ClientAuthKeyring(kc),
 
368
                },
 
369
                Crypto: CryptoConfig{
 
370
                        KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, // not currently supported
 
371
                },
 
372
        }
 
373
        c, err := Dial("tcp", newMockAuthServer(t), config)
 
374
        if err == nil || !strings.Contains(err.Error(), "no common algorithms") {
 
375
                t.Errorf("got %v, expected 'no common algorithms'", err)
 
376
                c.Close()
 
377
        }
 
378
}