From 223b08a898d7fc2b6709f4507ed0831b1f74ee38 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 3 Sep 2016 19:22:25 +0100 Subject: Add comments for exported types and functions --- cmd/cashier/client/client.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/cashier/client/client.go') 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), -- cgit v1.2.3