Documentation ¶
Index ¶
- type InfoReq
- type InfoResp
- type Server
- func (srv *Server) AuthInfo(req, id []byte, provider auth.Provider) ([]byte, error)
- func (srv *Server) AuthReq(req, ID []byte, provider auth.Provider, target string) ([]byte, error)
- func (srv *Server) AuthSign(req, id []byte, provider auth.Provider) ([]byte, error)
- func (srv *Server) Info(jsonData []byte) ([]byte, error)
- func (srv *Server) Req(jsonData []byte, target string) ([]byte, error)
- func (srv *Server) Sign(jsonData []byte) ([]byte, error)
- type SignResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoResp ¶
type InfoResp struct {
Certificate string `json:"certificate"`
}
InfoResp is the response for an Info API request.
type Server ¶
A Server points to a remote CFSSL instance.
func NewServer ¶
NewServer sets up a new server target. The address should be the DNS name (or "name:port") of the remote CFSSL instance. If no port is specified, the CFSSL default port (8888) is used.
func (*Server) AuthInfo ¶
AuthInfo fills out an authenticated info request to the server, receiving a certificate or error in response. It takes the serialized JSON request to send, remote address and authentication provider.
func (*Server) AuthReq ¶
AuthReq is the common logic for AuthSign and AuthInfo -- perform the given request, and return the resultant certificate. The target is either 'sign' or 'info'.
func (*Server) AuthSign ¶
AuthSign fills out an authenticated signing request to the server, receiving a certificate or error in response. It takes the serialized JSON request to send, remote address and authentication provider.
func (*Server) Info ¶
Info sends an info request to the remote CFSSL server, receiving a certificate or an error in response. It takes the serialized JSON request to send.
type SignResult ¶
type SignResult struct {
Certificate []byte `json:"certificate"`
}
SignResult is the result of signing a CSR.