Skip to content

Commit

Permalink
fix: simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Nov 12, 2024
1 parent 45849ab commit fc29f0c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmd/notation/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,12 @@ func getVerifier(ctx context.Context) (notation.Verifier, error) {
if err != nil {
// discard NewFileCache error directly as cache is not critical
logger.Debugf("failed to create file cache: %v", err)
}
var cache corecrl.Cache
if fileCache != nil {
cache = &clicrl.CacheWithLog{
} else {
crlFetcher.Cache = &clicrl.CacheWithLog{
Cache: fileCache,
DiscardCacheError: crlFetcher.DiscardCacheError,
}
}
crlFetcher.Cache = cache
revocationCodeSigningValidator, err := revocation.NewWithOptions(revocation.Options{
OCSPHTTPClient: ocspHttpClient,
CRLFetcher: crlFetcher,
Expand Down

0 comments on commit fc29f0c

Please sign in to comment.