ReadCRLFile reads a file from the provided path, and returns constructed CRL struct from it.
(path string)
| 90 | // ReadCRLFile reads a file from the provided path, and returns constructed CRL |
| 91 | // struct from it. |
| 92 | func 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 | |
| 104 | const tagDirectoryName = 4 |
| 105 |