Add --tuf-channel flag to set tuf prefix path

This commit is contained in:
Jonny Stoten
2024-09-17 10:41:42 +01:00
parent 5e97ee0163
commit d1eddd594d
4 changed files with 14 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ type ValidationResult struct {
type ValidateHandlerOptions struct {
TUFRoot string
TUFChannel string
TUFOutputPath string
TUFMetadataURL string
TUFTargetsURL string
@@ -74,6 +75,7 @@ func (h *validateHandler) newVerifier(ctx context.Context) (attest.Verifier, err
LocalStorageDir: h.opts.TUFOutputPath,
MetadataSource: h.opts.TUFMetadataURL,
TargetsSource: h.opts.TUFTargetsURL,
PathPrefix: h.opts.TUFChannel,
VersionChecker: tuf.NewDefaultVersionChecker(),
},
LocalTargetsDir: h.opts.PolicyCacheDir,