MCPcopy
hub / github.com/grpc/grpc-go / ReadCRLFile

Function ReadCRLFile

security/advancedtls/crl.go:92–102  ·  view source on GitHub ↗

ReadCRLFile reads a file from the provided path, and returns constructed CRL struct from it.

(path string)

Source from the content-addressed store, hash-verified

90// ReadCRLFile reads a file from the provided path, and returns constructed CRL
91// struct from it.
92func ReadCRLFile(path string) (*CRL, error) {
93 b, err := os.ReadFile(path)
94 if err != nil {
95 return nil, fmt.Errorf("cannot read file from provided path %q: %v", path, err)
96 }
97 crl, err := NewCRL(b)
98 if err != nil {
99 return nil, fmt.Errorf("cannot construct CRL from file %q: %v", path, err)
100 }
101 return crl, nil
102}
103
104const tagDirectoryName = 4
105

Callers 2

scanCRLDirectoryMethod · 0.85
loadCRLFunction · 0.85

Calls 2

NewCRLFunction · 0.85
ErrorfMethod · 0.65

Tested by 1

loadCRLFunction · 0.68