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

Issue 95770045: utils/ssh: Update to use latest go.crypto

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by gz
Modified:
10 years ago
Reviewers:
axw, mp+217308
Visibility:
Public.

Description

utils/ssh: Update to use latest go.crypto Upstream go.crypto has a cleaned up ssh package in r192 and beyond. This has a few interface changes we need to adapt to, but should make testing easier in future. Also bumps dependencies.tsv to go.crypto tip. https://code.launchpad.net/~gz/juju-core/gosshnew_1312940/+merge/217308 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : utils/ssh: Update to use latest go.crypto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -75 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M dependencies.tsv View 1 chunk +1 line, -1 line 0 comments Download
M utils/ssh/authorisedkeys.go View 2 chunks +5 lines, -4 lines 0 comments Download
M utils/ssh/ssh_gocrypto.go View 1 5 chunks +23 lines, -37 lines 0 comments Download
M utils/ssh/ssh_gocrypto_test.go View 1 5 chunks +41 lines, -33 lines 0 comments Download

Messages

Total messages: 3
gz
Please take a look.
10 years ago (2014-04-25 22:17:30 UTC) #1
axw
LGTM, with a few naming changes Thanks for doing that, I keep on meaning to ...
10 years ago (2014-04-26 02:09:29 UTC) #2
gz
10 years ago (2014-04-26 17:11:49 UTC) #3
Please take a look.

https://codereview.appspot.com/95770045/diff/1/utils/ssh/authorisedkeys.go
File utils/ssh/authorisedkeys.go (left):

https://codereview.appspot.com/95770045/diff/1/utils/ssh/authorisedkeys.go#ol...
utils/ssh/authorisedkeys.go:48: return nil, fmt.Errorf("invalid authorized_key
%q", line)
On 2014/04/26 02:09:29, axw wrote:
> Include the ParseAuthorizedKey error in the message?

Was going to errgo wrap it, but the error we get is always "ssh: no key found"
which would actually make our message *worse* if we included it.

https://codereview.appspot.com/95770045/diff/1/utils/ssh/ssh_gocrypto.go
File utils/ssh/ssh_gocrypto.go (right):

https://codereview.appspot.com/95770045/diff/1/utils/ssh/ssh_gocrypto.go#newc...
utils/ssh/ssh_gocrypto.go:84: conn         *ssh.Client
On 2014/04/26 02:09:29, axw wrote:
> s/conn/client/
> (and wherever else we refer to Client as conn)
> ?

Done.

https://codereview.appspot.com/95770045/diff/1/utils/ssh/ssh_gocrypto.go#newc...
utils/ssh/ssh_gocrypto.go:152: conn.Conn.Close()
On 2014/04/26 02:09:29, axw wrote:
> ssh.Client embeds Conn, so conn.Close (or client.Close) would be better IMO

Done.

https://codereview.appspot.com/95770045/diff/1/utils/ssh/ssh_gocrypto_test.go
File utils/ssh/ssh_gocrypto_test.go (right):

https://codereview.appspot.com/95770045/diff/1/utils/ssh/ssh_gocrypto_test.go...
utils/ssh/ssh_gocrypto_test.go:31: Listener net.Listener
On 2014/04/26 02:09:29, axw wrote:
> s/Listener/listener/
> ?
> (I would prefer we don't export fields unless we need to for reflection or
> whatever.)

Okay. I guess really we don't need client in this struct, but I'll leave that
addition for now.
Sign in to reply to this message.

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