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

Function PrintCert

cli/cli.go:160–179  ·  view source on GitHub ↗

PrintCert outputs a cert, key and csr to stdout

(key, csrBytes, cert []byte)

Source from the content-addressed store, hash-verified

158
159// PrintCert outputs a cert, key and csr to stdout
160func PrintCert(key, csrBytes, cert []byte) {
161 out := map[string]string{}
162 if cert != nil {
163 out["cert"] = string(cert)
164 }
165
166 if key != nil {
167 out["key"] = string(key)
168 }
169
170 if csrBytes != nil {
171 out["csr"] = string(csrBytes)
172 }
173
174 jsonOut, err := json.Marshal(out)
175 if err != nil {
176 return
177 }
178 fmt.Printf("%s\n", jsonOut)
179}
180
181// PrintOCSPResponse outputs an OCSP response to stdout
182// ocspResponse is base64 encoded

Callers 5

genkeyMainFunction · 0.92
gencertMainFunction · 0.92
signerMainFunction · 0.92
gencsrMainFunction · 0.92
selfSignMainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…