Skip to content

Commit

Permalink
Promote Close() to the interface level
Browse files Browse the repository at this point in the history
  • Loading branch information
erm-g committed Nov 6, 2023
1 parent d97b6a9 commit 465ebac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions security/advancedtls/crl_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ type CRLProvider interface {
//
// [RFC5280 - Undetermined]: https://datatracker.ietf.org/doc/html/rfc5280#section-6.3.3
CRL(cert *x509.Certificate) (*CRL, error)

// Close cleans up resources allocated by the provider.
Close()
}

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

// Close is a no-op.
func (p *StaticCRLProvider) Close() {}

// FileWatcherOptions represents a data structure holding a configuration for
// FileWatcherCRLProvider.
type FileWatcherOptions struct {
Expand Down

0 comments on commit 465ebac

Please sign in to comment.