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

x/crypto/ssh: inaccurate doc on ServerConfig.PublicKeyCallback method #21325

Closed
artyom opened this issue Aug 6, 2017 · 1 comment
Closed

x/crypto/ssh: inaccurate doc on ServerConfig.PublicKeyCallback method #21325

artyom opened this issue Aug 6, 2017 · 1 comment
Milestone

Comments

@artyom
Copy link
Member

@artyom artyom commented Aug 6, 2017

Documentation of ServerConfig.PublicKeyCallback mismatches method signature by stating that It must return true if the given public key can be used to authenticate the given user. This was true for initial method signature, that is

PublicKeyCallback func(user, algo string, pubkey []byte) bool

but not accurate anymore, since current signature looks like this:

PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error)

Documentation should be re-worded to reflect new logic: key can be used to authenticate user if method returns nil error.

@gopherbot gopherbot added this to the Unreleased milestone Aug 6, 2017
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 6, 2017

Change https://golang.org/cl/53472 mentions this issue: x/crypto/ssh: fix documentation on ServerConfig.PublicKeyCallback

@golang golang locked and limited conversation to collaborators Aug 7, 2018
bored-engineer pushed a commit to bored-engineer/ssh that referenced this issue Oct 13, 2019
Fix leftovers from the old days to match today's method signature.

Fixes golang/go#21325

Change-Id: Iac5d49bc7cf9e80d07e21148b5e6e1b9bbb59d74
Reviewed-on: https://go-review.googlesource.com/53472
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
bored-engineer pushed a commit to bored-engineer/ssh that referenced this issue Oct 13, 2019
Fix leftovers from the old days to match today's method signature.

Fixes golang/go#21325

Change-Id: Iac5d49bc7cf9e80d07e21148b5e6e1b9bbb59d74
Reviewed-on: https://go-review.googlesource.com/53472
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.