PrintCert outputs a cert, key and csr to stdout
(key, csrBytes, cert []byte)
| 158 | |
| 159 | // PrintCert outputs a cert, key and csr to stdout |
| 160 | func 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…