Skip to content

Commit 465ebac

Browse files
committed
Promote Close() to the interface level
1 parent d97b6a9 commit 465ebac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

security/advancedtls/crl_provider.go

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ type CRLProvider interface {
5252
//
5353
// [RFC5280 - Undetermined]: https://datatracker.ietf.org/doc/html/rfc5280#section-6.3.3
5454
CRL(cert *x509.Certificate) (*CRL, error)
55+
56+
// Close cleans up resources allocated by the provider.
57+
Close()
5558
}
5659

5760
// StaticCRLProvider implements CRLProvider interface by accepting raw content
@@ -87,6 +90,9 @@ func (p *StaticCRLProvider) CRL(cert *x509.Certificate) (*CRL, error) {
8790
return p.crls[cert.Issuer.ToRDNSequence().String()], nil
8891
}
8992

93+
// Close is a no-op.
94+
func (p *StaticCRLProvider) Close() {}
95+
9096
// FileWatcherOptions represents a data structure holding a configuration for
9197
// FileWatcherCRLProvider.
9298
type FileWatcherOptions struct {

0 commit comments

Comments
 (0)