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

Function EncodeCertificate

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

Source from the content-addressed store, hash-verified

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

Callers 2

writeCertificateAndKeyFunction · 0.85
mainFunction · 0.85

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…