tuf

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defaultfetcher

func Defaultfetcher() fetcher.Fetcher

Defaultfetcher returns a default TUF fetcher configured with the bind UA

func GetClient

func GetClient(opts *TufOptions) (*tuf.Client, error)

GetClient returns a TUF client configured with the options. The underlying tuf.New call is retried with exponential backoff on transient errors (see the tufInit* constants for rationale); the last error is returned after exhausting attempts so legitimate configuration problems still surface.

When a valid TUF cache is already present on disk (e.g. pre-baked into an air-gapped image), ForceCache is enabled so sigstore-go uses the local copy and never makes a network call. ForceCache only disables proactive refresh — sigstore-go still re-fetches on its own when metadata has actually expired, so this is safe by default.

func GetRoot

func GetRoot(opts *TufOptions) ([]byte, error)

GetRoot fetches the trusted root from the configured URL or from the sigstore public instance.

Types

type TufOptions

type TufOptions struct {
	Fetcher     fetcher.Fetcher
	TufRootPath string `json:"tuf-root-path"`
	TufRootURL  string `json:"tuf-root-url"`
	RootData    []byte `json:"root-data"`
}

TufOptions captures the TUF options handled by bind

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL