repo

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressFS added in v0.4.12

func CompressFS(fsys fs.FS, buf io.Writer, skipDirs map[string]bool) error

CompressFS archives a TUF repository so that it can be written to Secret for later use.

func CreateRepo

func CreateRepo(ctx context.Context, files map[string][]byte) (tuf.LocalStore, string, error)

CreateRepo creates and initializes a TUF repo for Sigstore by adding keys to bytes. keys are typically for a basic setup like: "fulcio_v1.crt.pem" - Fulcio root cert in PEM format "ctfe.pub" - CTLog public key in PEM format "rekor.pub" - Rekor public key in PEM format "tsa_leaf.crt.pem" - TSA leaf certificate in PEM format "tsa_intermediate_0.crt.pem" - TSA Intermediate certificate in PEM format "tsa_root.crt.pem" - TSA Intermediate certificate in PEM format but additional keys can be added here.

This will also deduce the Usage for the keys based off the filename: if the filename contains:

  • `fulcio` = it will get Usage set to `Fulcio`
  • `ctfe` = it will get Usage set to `CTFE`
  • `rekor` = it will get Usage set to `Rekor`
  • `tsa` = it will get Usage set to `tsa`.
  • Anything else will get set to `Unknown`

func CreateRepoWithMetadata added in v0.4.13

func CreateRepoWithMetadata(ctx context.Context, targets []TargetWithMetadata) (tuf.LocalStore, string, error)

CreateRepoWithMetadata will create a TUF repo for Sigstore by adding targets to the Root with custom metadata.

func Uncompress added in v0.4.12

func Uncompress(src io.Reader, dst string) error

Uncompress takes a TUF repository that's been compressed with Compress and writes to dst directory.

Types

type CustomMetadata added in v0.4.13

type CustomMetadata struct {
	Usage  string `json:"usage"`
	Status string `json:"status"`
	URI    string `json:"uri"`
}

type TargetWithMetadata added in v0.4.13

type TargetWithMetadata struct {
	Name           string
	Bytes          []byte
	CustomMetadata []byte
}

TargetWithMetadata describes a TUF target with the given Name, Bytes, and CustomMetadata

Jump to

Keyboard shortcuts

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