diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-09-03 19:22:25 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-09-03 19:22:25 +0100 |
commit | 223b08a898d7fc2b6709f4507ed0831b1f74ee38 (patch) | |
tree | 763ef0d52ce936a5f352d879762507ce0119f318 /cmd/cashier/client/client.go | |
parent | 0af43a29b7cabb6710cd1cb335785ff60dbf758f (diff) |
Add comments for exported types and functions
Diffstat (limited to 'cmd/cashier/client/client.go')
-rw-r--r-- | cmd/cashier/client/client.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/cashier/client/client.go b/cmd/cashier/client/client.go index d8def27..ba5b900 100644 --- a/cmd/cashier/client/client.go +++ b/cmd/cashier/client/client.go @@ -78,12 +78,14 @@ func send(s []byte, token, ca string, ValidateTLSCertificate bool) (*lib.SignRes return c, nil } +// Sign sends the public key to the CA to be signed. func Sign(pub ssh.PublicKey, token string, conf *Config) (*ssh.Certificate, error) { validity, err := time.ParseDuration(conf.Validity) 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), |