signer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package signer implements simplified cosign-compatible OCI image signer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

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

Signer holds a key used to sign the images.

We are not using directly 'cosign' implementation here, as it's behind series of internal/ packages.

func NewSigner

func NewSigner(key crypto.PrivateKey) (*Signer, error)

NewSigner creates a new signer.

func (*Signer) GetCheckOpts

func (s *Signer) GetCheckOpts() *cosign.CheckOpts

GetCheckOpts returns cosign compatible image signature verification options.

func (*Signer) GetPublicKeyPEM

func (s *Signer) GetPublicKeyPEM() []byte

GetPublicKeyPEM returns the public key in PEM format.

func (*Signer) GetVerifier

func (s *Signer) GetVerifier() signature.Verifier

GetVerifier returns the verifier for the signature.

func (*Signer) SignImage

func (s *Signer) SignImage(ctx context.Context, imageRef name.Digest, pusher *remote.Pusher) error

SignImage signs the image in the OCI repository.

Jump to

Keyboard shortcuts

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