dsse

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PayloadType = "application/vnd.gittuf+json"

Variables

This section is empty.

Functions

func CreateEnvelope

func CreateEnvelope(v any) (*dsse.Envelope, error)

CreateEnvelope is an opinionated interface to create a DSSE envelope. It accepts instances of tuf.RootMetadata, tuf.TargetsMetadata, etc. and marshals the input prior to storing it as the envelope's payload.

func SignEnvelope

func SignEnvelope(ctx context.Context, envelope *dsse.Envelope, signer dsse.Signer) (*dsse.Envelope, error)

SignEnvelope is an opinionated API to sign DSSE envelopes. It's opinionated because it assumes the payload is Base 64 encoded, which is the expectation for gittuf metadata. If one or more signatures from the provided signing key already exist, they are all removed in favor of the new signature from that key.

func VerifyEnvelope

func VerifyEnvelope(ctx context.Context, envelope *dsse.Envelope, verifiers []dsse.Verifier, threshold int) error

VerifyEnvelope verifies a DSSE envelope against an expected threshold using a slice of verifiers passed into it. Threshold indicates the number of providers that must validate the envelope.

Types

This section is empty.

Jump to

Keyboard shortcuts

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