MCPcopy
hub / github.com/cloudflare/cloudflared / readOriginCert

Function readOriginCert

credentials/origin_cert.go:113–120  ·  view source on GitHub ↗
(originCertPath string)

Source from the content-addressed store, hash-verified

111}
112
113func readOriginCert(originCertPath string) ([]byte, error) {
114 originCert, err := os.ReadFile(originCertPath)
115 if err != nil {
116 return nil, fmt.Errorf("cannot read %s to load origin certificate", originCertPath)
117 }
118
119 return originCert, nil
120}
121
122// FindOriginCert will check to make sure that the certificate exists at the specified file path.
123func FindOriginCert(originCertPath string, log *zerolog.Logger) (string, error) {

Callers 1

ReadFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected