aboutsummaryrefslogtreecommitdiff
path: root/client/client.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-01-05 23:28:26 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-01-05 23:28:26 +0000
commit9e9a7d50970f1424245d88169de82988fd57e112 (patch)
tree25aca2f5e18fe3ff454af34d5d75f8c5204d81fb /client/client.go
parent8066efd45861e7c024fc1daabc6d002266a527e7 (diff)
Move GetPublicKey to the shared `lib` package
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/client/client.go b/client/client.go
index e69f353..b13c4cb 100644
--- a/client/client.go
+++ b/client/client.go
@@ -79,11 +79,8 @@ func Sign(pub ssh.PublicKey, token string, conf *Config) (*ssh.Certificate, erro
if err != nil {
return nil, err
}
- marshaled := ssh.MarshalAuthorizedKey(pub)
- // Remove the trailing newline.
- marshaled = marshaled[:len(marshaled)-1]
s, err := json.Marshal(&lib.SignRequest{
- Key: string(marshaled),
+ Key: lib.GetPublicKey(pub),
ValidUntil: time.Now().Add(validity),
})
if err != nil {