Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1003)

Issue 5447049: code review 5447049: exp/ssh: cleanup client auth tests (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by dave
Modified:
12 years, 5 months ago
Reviewers:
CC:
gpaul, agl1, niemeyer, rsc, golang-dev
Visibility:
Public.

Description

exp/ssh: cleanup client auth tests This CL cleans up the client auth tests, making the individual test body more manageable. Also, adds tests for rsa and dsa key negotiation. Finally, remove the package level use of the variable strings, which avoids conflicting with the strings pkg.

Patch Set 1 #

Patch Set 2 : diff -r 3c286b9b2206 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 16f9f293a550 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 16f9f293a550 https://go.googlecode.com/hg/ #

Total comments: 12

Patch Set 5 : diff -r 723bad00fb25 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 85e087089edf https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 77404a124c34 https://go.googlecode.com/hg/ #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -131 lines) Patch
M src/pkg/exp/ssh/client_auth_test.go View 1 2 3 4 5 6 chunks +123 lines, -123 lines 4 comments Download
M src/pkg/exp/ssh/common_test.go View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download

Messages

Total messages: 9
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, n13m3y3r@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
12 years, 5 months ago (2011-12-01 10:52:23 UTC) #1
gpaul
On 2011/12/01 10:52:23, dfc wrote: > Hello mailto:gustav.paul@gmail.com, mailto:agl@golang.org, mailto:n13m3y3r@gmail.com, mailto:rsc@golang.org > (cc: mailto:golang-dev@googlegroups.com), > ...
12 years, 5 months ago (2011-12-01 11:48:37 UTC) #2
niemeyer
https://codereview.appspot.com/5447049/diff/5002/src/pkg/exp/ssh/client_auth_test.go File src/pkg/exp/ssh/client_auth_test.go (right): https://codereview.appspot.com/5447049/diff/5002/src/pkg/exp/ssh/client_auth_test.go#newcode65 src/pkg/exp/ssh/client_auth_test.go:65: panic("known key type") un? :-) https://codereview.appspot.com/5447049/diff/5002/src/pkg/exp/ssh/client_auth_test.go#newcode105 src/pkg/exp/ssh/client_auth_test.go:105: var rsakey ...
12 years, 5 months ago (2011-12-01 12:31:31 UTC) #3
dave_cheney.net
Thanks for your comments Gustavo. PTAL https://codereview.appspot.com/5447049/diff/5002/src/pkg/exp/ssh/client_auth_test.go File src/pkg/exp/ssh/client_auth_test.go (right): https://codereview.appspot.com/5447049/diff/5002/src/pkg/exp/ssh/client_auth_test.go#newcode65 src/pkg/exp/ssh/client_auth_test.go:65: panic("known key type") ...
12 years, 5 months ago (2011-12-01 22:21:18 UTC) #4
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, n13m3y3r@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 5 months ago (2011-12-01 22:21:52 UTC) #5
niemeyer
LGTM Leaving for agl or rsc.
12 years, 5 months ago (2011-12-01 22:27:36 UTC) #6
dave_cheney.net
The latest patch set changes the name of the mock server func from authServerListen to ...
12 years, 5 months ago (2011-12-04 03:07:56 UTC) #7
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, n13m3y3r@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 5 months ago (2011-12-06 20:25:24 UTC) #8
agl1
12 years, 5 months ago (2011-12-06 23:13:32 UTC) #9
*** Submitted as http://code.google.com/p/go/source/detail?r=f6fdc83852fd ***

exp/ssh: cleanup client auth tests

This CL cleans up the client auth tests, making the
individual test body more manageable.

Also, adds tests for rsa and dsa key negotiation.

Finally, remove the package level use of the variable
strings, which avoids conflicting with the strings pkg.

R=gustav.paul, agl, n13m3y3r, rsc
CC=golang-dev
http://codereview.appspot.com/5447049

Committer: Adam Langley <agl@golang.org>

http://codereview.appspot.com/5447049/diff/2005/src/pkg/exp/ssh/client_auth_t...
File src/pkg/exp/ssh/client_auth_test.go (right):

http://codereview.appspot.com/5447049/diff/2005/src/pkg/exp/ssh/client_auth_t...
src/pkg/exp/ssh/client_auth_test.go:23: const _pem = `-----BEGIN RSA PRIVATE
KEY-----
renamed to testServerPrivateKey to make it clear which is the server key and
which the client when I remove rsa.Generate.

http://codereview.appspot.com/5447049/diff/2005/src/pkg/exp/ssh/client_auth_t...
src/pkg/exp/ssh/client_auth_test.go:70: hashFunc := crypto.SHA1
I added an "import _ "crypto/sha1"" to make sure that this New call works.

http://codereview.appspot.com/5447049/diff/2005/src/pkg/exp/ssh/client_auth_t...
src/pkg/exp/ssh/client_auth_test.go:129: rsakey, err =
rsa.GenerateKey(rand.Reader, 512)
generating even a 512-bit key is expensive on our ARM builders, so I switched
this to using a static key.

http://codereview.appspot.com/5447049/diff/2005/src/pkg/exp/ssh/client_auth_t...
src/pkg/exp/ssh/client_auth_test.go:164: c.Close()
made this a defer higher up so that c doesn't leak
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b