Documentation ¶
Index ¶
Constants ¶
const PayloadType = "application/vnd.gittuf+json"
Variables ¶
This section is empty.
Functions ¶
func CreateEnvelope ¶
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.