Victor Rodriguez eb8496e874
Commence refactoring to decouple revocation code from main PKI backend (#27417)
* Rename crlConfig to CrlConfig.

Rename defaultCrlConfig to DefaultCrlConfig.

* Move CrlConfig and DefaultCrlConfig to new package pki/revocation.

* Rename revocationInfo to RevocationInfo.

* Move RevocationInfo to pki/revocation.

* Add StorageContext interface to PKI's revocation package.

* Add CrlBuilderType interface to pki_backend package.

The purpose of the interface is to make it possible to gradually move (refactor)
CrlBuilder to the revocation package.

* Move CrlConfig and DefaultCrlConfig to package pki_backend.

* Make StorageContext.CrlBuilder() return a CrlBuilderType.

Add methods SetLastDeltaRebuildCheckTime() and ShouldInvalidate() to
CrlBuilderType.

* Move fetchIssuerMapForRevocationChecking to PKI's revocation package.

* Run make fmt.
2024-06-10 16:41:47 +00:00

21 lines
748 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package pki_backend
import "time"
type CrlBuilderType interface {
RebuildIfForced(sc StorageContext) ([]string, error)
Rebuild(sc StorageContext, forceNew bool) ([]string, error)
RebuildDeltaCRLsHoldingLock(sc StorageContext, forceNew bool) ([]string, error)
GetPresentLocalDeltaWALForClearing(sc StorageContext) ([]string, error)
GetPresentUnifiedDeltaWALForClearing(sc StorageContext) ([]string, error)
GetConfigWithUpdate(sc StorageContext) (*CrlConfig, error)
ClearLocalDeltaWAL(sc StorageContext, walSerials []string) error
ClearUnifiedDeltaWAL(sc StorageContext, walSerials []string) error
SetLastDeltaRebuildCheckTime(t time.Time)
ShouldInvalidate() bool
}