forked from TrueCloudLab/certificates
Fix linter, tidy go.mod file.
This commit is contained in:
parent
4b473732d9
commit
9052da66a3
4 changed files with 3 additions and 2 deletions
|
@ -23,7 +23,7 @@ func (c *Client) ResolveReference(ref *url.URL) *url.URL {
|
||||||
return c.CaURL.ResolveReference(ref)
|
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/defaults.json and the identity defined in
|
||||||
// $STEPPATH/config/identity.json
|
// $STEPPATH/config/identity.json
|
||||||
func LoadClient() (*Client, error) {
|
func LoadClient() (*Client, error) {
|
||||||
|
|
|
@ -118,6 +118,7 @@ func (p *Provisioner) Token(subject string, sans ...string) (string, error) {
|
||||||
return tok.SignedString(p.jwk.Algorithm, p.jwk.Key)
|
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) {
|
func (p *Provisioner) SSHToken(certType, keyID string, principals []string) (string, error) {
|
||||||
jwtID, err := randutil.Hex(64)
|
jwtID, err := randutil.Hex(64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
1
go.mod
1
go.mod
|
@ -4,7 +4,6 @@ go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Masterminds/sprig/v3 v3.0.0
|
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/go-chi/chi v4.0.2+incompatible
|
||||||
github.com/newrelic/go-agent v2.15.0+incompatible
|
github.com/newrelic/go-agent v2.15.0+incompatible
|
||||||
github.com/pkg/errors v0.8.1
|
github.com/pkg/errors v0.8.1
|
||||||
|
|
|
@ -9,6 +9,7 @@ type Step struct {
|
||||||
SSH StepSSH
|
SSH StepSSH
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StepSSH holds SSH-related values for the CA.
|
||||||
type StepSSH struct {
|
type StepSSH struct {
|
||||||
HostKey ssh.PublicKey
|
HostKey ssh.PublicKey
|
||||||
UserKey ssh.PublicKey
|
UserKey ssh.PublicKey
|
||||||
|
|
Loading…
Reference in a new issue