signature

package
v5.33.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// from sigstore/cosign/pkg/types.SimpleSigningMediaType
	SigstoreSignatureMIMEType = "application/vnd.dev.cosign.simplesigning.v1+json"
	// from sigstore/cosign/pkg/oci/static.SignatureAnnotationKey
	SigstoreSignatureAnnotationKey = "dev.cosignproject.cosign/signature"
	// from sigstore/cosign/pkg/oci/static.BundleAnnotationKey
	SigstoreSETAnnotationKey = "dev.sigstore.cosign/bundle"
	// from sigstore/cosign/pkg/oci/static.CertificateAnnotationKey
	SigstoreCertificateAnnotationKey = "dev.sigstore.cosign/certificate"
	// from sigstore/cosign/pkg/oci/static.ChainAnnotationKey
	SigstoreIntermediateCertificateChainAnnotationKey = "dev.sigstore.cosign/chain"
)

Variables

This section is empty.

Functions

func Blob

func Blob(sig Signature) ([]byte, error)

Blob returns a representation of sig as a []byte, suitable for long-term storage.

func UnsupportedFormatError

func UnsupportedFormatError(sig Signature) error

UnsupportedFormatError returns an error complaining about sig having an unsupported format.

Types

type FormatID

type FormatID string

FIXME FIXME: MIME type? Int? String? An interface with a name, parse methods?

const (
	SimpleSigningFormat FormatID = "simple-signing"
	SigstoreFormat      FormatID = "sigstore-json"
)

type Signature

type Signature interface {
	FormatID() FormatID
	// contains filtered or unexported methods
}

Signature is an image signature of some kind.

func FromBlob

func FromBlob(blob []byte) (Signature, error)

FromBlob returns a signature from parsing a blob created by signature.Blob.

type Sigstore

type Sigstore struct {
	// contains filtered or unexported fields
}

Sigstore is a github.com/cosign/cosign signature. For the persistent-storage format used for blobChunk(), we want a degree of forward compatibility against unexpected field changes (as has happened before), which is why this data type contains just a payload + annotations (including annotations that we don’t recognize or support), instead of individual fields for the known annotations.

func SigstoreFromComponents

func SigstoreFromComponents(untrustedMimeType string, untrustedPayload []byte, untrustedAnnotations map[string]string) Sigstore

SigstoreFromComponents returns a Sigstore object from its components.

func (Sigstore) FormatID

func (s Sigstore) FormatID() FormatID

func (Sigstore) UntrustedAnnotations

func (s Sigstore) UntrustedAnnotations() map[string]string

func (Sigstore) UntrustedMIMEType

func (s Sigstore) UntrustedMIMEType() string

func (Sigstore) UntrustedPayload

func (s Sigstore) UntrustedPayload() []byte

type SimpleSigning

type SimpleSigning struct {
	// contains filtered or unexported fields
}

SimpleSigning is a “simple signing” signature.

func SimpleSigningFromBlob

func SimpleSigningFromBlob(blobChunk []byte) SimpleSigning

SimpleSigningFromBlob converts a “simple signing” signature into a SimpleSigning object.

func (SimpleSigning) FormatID

func (s SimpleSigning) FormatID() FormatID

func (SimpleSigning) UntrustedSignature

func (s SimpleSigning) UntrustedSignature() []byte

Jump to

Keyboard shortcuts

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