MCPcopy Create free account
hub / github.com/prometheus/common / EncodeCertificate

Function EncodeCertificate

config/generate.go:42–44  ·  view source on GitHub ↗
(w io.Writer, cert *x509.Certificate)

Source from the content-addressed store, hash-verified

40)
41
42func EncodeCertificate(w io.Writer, cert *x509.Certificate) error {
43 return pem.Encode(w, &pem.Block{Type: "CERTIFICATE", Bytes: cert.Raw})
44}
45
46func EncodeKey(w io.Writer, priv *rsa.PrivateKey) error {
47 b, err := x509.MarshalPKCS8PrivateKey(priv)

Callers 2

writeCertificateAndKeyFunction · 0.85
mainFunction · 0.85

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected