envelope

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Supported envelope format.
	COSE = "cose"
	JWS  = "jws"

	// MediaTypePayloadV1 is the supported content type for signature's payload.
	MediaTypePayloadV1 = "application/vnd.cncf.notary.payload.v1+json"
)

Variables

This section is empty.

Functions

func DescriptorFromSignaturePayload

func DescriptorFromSignaturePayload(payload *signature.Payload) (*ocispec.Descriptor, error)

DescriptorFromPayload parses a signature payload and returns the descriptor that was signed. Note: the descriptor was signed but may not be trusted

func GetEnvelopeMediaType

func GetEnvelopeMediaType(sigFormat string) (string, error)

GetEnvelopeMediaType converts the envelope type to mediaType name.

func ValidatePayloadContentType

func ValidatePayloadContentType(payload *signature.Payload) error

ValidatePayloadContentType validates signature payload's content type.

Types

type Payload

type Payload struct {
	TargetArtifact ocispec.Descriptor `json:"targetArtifact"`
}

Payload describes the content that gets signed.

Jump to

Keyboard shortcuts

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