Fix linter, tidy go.mod file.

This commit is contained in:
Ivan Bertona 2020-02-07 14:42:56 -05:00
parent 4b473732d9
commit 9052da66a3
4 changed files with 3 additions and 2 deletions

View file

@ -23,7 +23,7 @@ func (c *Client) ResolveReference(ref *url.URL) *url.URL {
return c.CaURL.ResolveReference(ref)
}
// LoadStepClient configures an http.Client with the root in
// LoadClient configures an http.Client with the root in
// $STEPPATH/config/defaults.json and the identity defined in
// $STEPPATH/config/identity.json
func LoadClient() (*Client, error) {

View file

@ -118,6 +118,7 @@ func (p *Provisioner) Token(subject string, sans ...string) (string, error) {
return tok.SignedString(p.jwk.Algorithm, p.jwk.Key)
}
// SSHToken generates a SSH token.
func (p *Provisioner) SSHToken(certType, keyID string, principals []string) (string, error) {
jwtID, err := randutil.Hex(64)
if err != nil {

1
go.mod
View file

@ -4,7 +4,6 @@ go 1.13
require (
github.com/Masterminds/sprig/v3 v3.0.0
github.com/davecgh/go-spew v1.1.1
github.com/go-chi/chi v4.0.2+incompatible
github.com/newrelic/go-agent v2.15.0+incompatible
github.com/pkg/errors v0.8.1

View file

@ -9,6 +9,7 @@ type Step struct {
SSH StepSSH
}
// StepSSH holds SSH-related values for the CA.
type StepSSH struct {
HostKey ssh.PublicKey
UserKey ssh.PublicKey