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

Function LoadPEMCertPool

helpers/helpers.go:346–356  ·  view source on GitHub ↗

LoadPEMCertPool loads a pool of PEM certificates from file.

(certsFile string)

Source from the content-addressed store, hash-verified

344
345// LoadPEMCertPool loads a pool of PEM certificates from file.
346func LoadPEMCertPool(certsFile string) (*x509.CertPool, error) {
347 if certsFile == "" {
348 return nil, nil
349 }
350 pemCerts, err := os.ReadFile(certsFile)
351 if err != nil {
352 return nil, err
353 }
354
355 return PEMToCertPool(pemCerts)
356}
357
358// PEMToCertPool concerts PEM certificates to a CertPool.
359func PEMToCertPool(pemCerts []byte) (*x509.CertPool, error) {

Callers 8

NewCFSSLFunction · 0.92
NewCFSSLProviderFunction · 0.92
remoteTLSInfoFunction · 0.92
remoteTLSSignFunction · 0.92
serverMainFunction · 0.92
getInfoFromRemoteFunction · 0.92
LoadRootCAsFunction · 0.92
SetRemoteCAsFromFileMethod · 0.92

Calls 1

PEMToCertPoolFunction · 0.85

Tested by 2

remoteTLSInfoFunction · 0.74
remoteTLSSignFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…