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

Function NewCRL

security/advancedtls/crl.go:74–88  ·  view source on GitHub ↗

NewCRL constructs new CRL from the provided byte array.

(b []byte)

Source from the content-addressed store, hash-verified

72
73// NewCRL constructs new CRL from the provided byte array.
74func NewCRL(b []byte) (*CRL, error) {
75 crl, err := parseRevocationList(b)
76 if err != nil {
77 return nil, fmt.Errorf("fail to parse CRL: %v", err)
78 }
79 crlExt, err := parseCRLExtensions(crl)
80 if err != nil {
81 return nil, fmt.Errorf("fail to parse CRL extensions: %v", err)
82 }
83 crlExt.rawIssuer, err = extractCRLIssuer(b)
84 if err != nil {
85 return nil, fmt.Errorf("fail to extract CRL issuer failed err= %v", err)
86 }
87 return crlExt, nil
88}
89
90// ReadCRLFile reads a file from the provided path, and returns constructed CRL
91// struct from it.

Callers 2

NewStaticCRLProviderFunction · 0.85
ReadCRLFileFunction · 0.85

Calls 4

parseRevocationListFunction · 0.85
parseCRLExtensionsFunction · 0.85
extractCRLIssuerFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected