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: should ParseAuthorizedKey return PublicKey? #6396

Closed
fsouza opened this issue Sep 16, 2013 · 7 comments
Closed

x/crypto/ssh: should ParseAuthorizedKey return PublicKey? #6396

fsouza opened this issue Sep 16, 2013 · 7 comments

Comments

@fsouza
Copy link
Contributor

fsouza commented Sep 16, 2013

Today, ParseAuthorizedKey returns an interface{}, but in order to use the returned key
in MarshalAuthorizedKey, one needs to convert it to a PublicKey:

key, comment, _, _, ok := ssh.ParseAuthorizedKey([]byte(content))
if !ok {
    panic("Invalid key")
}
marshaled := ssh.MarshalAuthorizedKey(key.(ssh.PublicKey))

Is there a case where ParseAuthorizedKey returns a value that doesn't implement
PublicKey?
@rsc
Copy link
Contributor

rsc commented Oct 18, 2013

Comment 1:

Status changed to Acceptd.

@rsc
Copy link
Contributor

rsc commented Oct 18, 2013

Comment 2:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@hanwen
Copy link
Contributor

hanwen commented Oct 26, 2013

Comment 3:

this has been fixed in 
changeset:   169:ede3e37127cc
user:        JP Sugarbroad <jpsugar@google.com>
date:        Wed Oct 09 12:56:09 2013 -0400
summary:     go.crypto/ssh: fix certificate parsing/marshaling.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 4:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added repo-crypto.

@mikioh mikioh changed the title go.crypto/ssh: should ParseAuthorizedKey return PublicKey? ssh: should ParseAuthorizedKey return PublicKey? Jan 7, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title ssh: should ParseAuthorizedKey return PublicKey? x/crypto/ssh: should ParseAuthorizedKey return PublicKey? Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-crypto label Apr 14, 2015
@hanwen
Copy link
Contributor

hanwen commented Aug 12, 2015

@rsc , @bradfitz - this has been fixed eons ago. How to close this issue?

@golang golang locked and limited conversation to collaborators Aug 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants