signing

package
v0.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(printer common.Printer, state *WalkingState, cv ocm.ComponentVersionAccess, opts *Options, closecv ...bool) (*metav1.DigestSpec, error)

func RequireReProcessing

func RequireReProcessing(vi *VersionInfo, opts *Options) bool

func ToDigestSpec

func ToDigestSpec(v interface{}) *metav1.DigestSpec

Types

type Option

type Option interface {
	ApplySigningOption(o *Options)
}

func Issuer

func Issuer(name string) Option

func PrivateKey

func PrivateKey(name string, key interface{}) Option

func PublicKey

func PublicKey(name string, key interface{}) Option

func Recursive

func Recursive(flags ...bool) Option

func Registry

func Registry(h signing.Registry) Option

func Resolver

func Resolver(h ...ocm.ComponentVersionResolver) Option

func RootCertificates

func RootCertificates(pool *x509.CertPool) Option

func Sign

func Sign(h signing.Signer, name string) Option

func SkipAccessTypes

func SkipAccessTypes(names ...string) Option

func Update

func Update(flags ...bool) Option

func VerifyDigests

func VerifyDigests(flags ...bool) Option

func VerifySignature

func VerifySignature(names ...string) Option

type Options

type Options struct {
	Update            bool
	Recursively       bool
	Verify            bool
	Signer            signing.Signer
	Issuer            string
	VerifySignature   bool
	RootCerts         *x509.CertPool
	Hasher            signing.Hasher
	Keys              signing.KeyRegistry
	Registry          signing.Registry
	Resolver          ocm.ComponentVersionResolver
	SkipAccessTypes   map[string]bool
	SignatureNames    []string
	NormalizationAlgo string
}

func NewOptions

func NewOptions(list ...Option) *Options

func (*Options) ApplySigningOption

func (o *Options) ApplySigningOption(opts *Options)

func (*Options) Complete

func (o *Options) Complete(registry signing.Registry) error

func (*Options) DoSign

func (o *Options) DoSign() bool

func (*Options) DoUpdate

func (o *Options) DoUpdate() bool

func (*Options) DoVerify

func (o *Options) DoVerify() bool

func (*Options) Eval

func (opts *Options) Eval(list ...Option) *Options

func (*Options) For

func (o *Options) For(digest *metav1.DigestSpec) (*Options, error)

func (*Options) PrivateKey

func (o *Options) PrivateKey() interface{}

func (*Options) PublicKey

func (o *Options) PublicKey(sig string) interface{}

func (*Options) SignatureConfigured

func (o *Options) SignatureConfigured(name string) bool

func (*Options) SignatureName

func (o *Options) SignatureName() string

type VersionInfo

type VersionInfo struct {
	Descriptor *compdesc.ComponentDescriptor
	Digest     *metav1.DigestSpec
	Signed     bool
}

type WalkingState

type WalkingState = common.WalkingState[*VersionInfo]

func NewWalkingState

func NewWalkingState() WalkingState

Jump to

Keyboard shortcuts

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