MCPcopy Create free account
hub / github.com/cloudflare/cfssl / request

Method request

api/client/client.go:298–309  ·  view source on GitHub ↗

request performs the common logic for Sign and Info, performing the actual request and returning the resultant certificate.

(jsonData []byte, target string)

Source from the content-addressed store, hash-verified

296// request performs the common logic for Sign and Info, performing the actual
297// request and returning the resultant certificate.
298func (srv *server) request(jsonData []byte, target string) ([]byte, error) {
299 result, err := srv.getResultMap(jsonData, target)
300 if err != nil {
301 return nil, err
302 }
303 cert := result["certificate"].(string)
304 if cert != "" {
305 return []byte(cert), nil
306 }
307
308 return nil, errors.Wrap(errors.APIClientError, errors.ClientHTTPError, stderr.New("response doesn't contain certificate."))
309}
310
311// AuthRemote acts as a Remote with a default Provider for AuthSign.
312type AuthRemote struct {

Callers 2

SignMethod · 0.95
cfssl.jsFile · 0.80

Calls 3

getResultMapMethod · 0.95
WrapFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected