Documentation ¶
Overview ¶
Package universal implements a signer that can do remote or local
Index ¶
- func NewSigner(root Root, policy *config.Signing) (signer.Signer, error)
- type Root
- type Signer
- func (s *Signer) Info(req info.Req) (resp *info.Resp, err error)
- func (s *Signer) Policy() *config.Signing
- func (s *Signer) SetDBAccessor(dba certdb.Accessor)
- func (s *Signer) SetPolicy(policy *config.Signing)
- func (s *Signer) SetReqModifier(mod func(*http.Request, []byte))
- func (s *Signer) SigAlgo() x509.SignatureAlgorithm
- func (s *Signer) Sign(req signer.SignRequest) (cert []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSigner ¶
NewSigner generates a new certificate signer from a Root structure. This is one of two standard signers: local or remote. If the root structure specifies a force remote, then a remote signer is created, otherwise either a remote or local signer is generated based on the policy. For a local signer, the CertFile and KeyFile need to be defined in Root.
Types ¶
type Root ¶
Root is used to define where the universal signer gets its public certificate and private keys for signing.
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer represents a universal signer which is both local and remote to fulfill the signer.Signer interface.
func (*Signer) Info ¶
Info sends an info request to the remote or local CFSSL server receiving an Resp struct or an error in response.
func (*Signer) SetDBAccessor ¶
SetDBAccessor sets the signer's cert db accessor.
func (*Signer) SetReqModifier ¶
SetReqModifier sets the function to call to modify the HTTP request prior to sending it
func (*Signer) SigAlgo ¶
func (s *Signer) SigAlgo() x509.SignatureAlgorithm
SigAlgo returns the RSA signer's signature algorithm.