signature

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertSubject

func CertSubject(c *x509.Certificate) string

func LoadPublicKey

func LoadPublicKey(ctx context.Context, keyRef string) (verifier signature.Verifier, err error)

LoadPublicKey is a wrapper for VerifierForKeyRef, hardcoding SHA256 as the hash algorithm

func LoadPublicKeyRaw

func LoadPublicKeyRaw(raw []byte, hashAlgorithm crypto.Hash) (signature.Verifier, error)

LoadPublicKeyRaw loads a verifier from a PEM-encoded public key

func PublicKeyFromKeyRef

func PublicKeyFromKeyRef(ctx context.Context, keyRef string) (signature.Verifier, error)

func PublicKeyFromKeyRefWithHashAlgo

func PublicKeyFromKeyRefWithHashAlgo(ctx context.Context, keyRef string, hashAlgorithm crypto.Hash) (signature.Verifier, error)

func PublicKeyPem

func PublicKeyPem(key signature.PublicKeyProvider, pkOpts ...signature.PublicKeyOption) ([]byte, error)

func SignerFromKeyRef

func SignerFromKeyRef(ctx context.Context, keyRef string, pf cosign.PassFunc) (signature.Signer, error)

func SignerVerifierFromKeyRef

func SignerVerifierFromKeyRef(ctx context.Context, keyRef string, pf cosign.PassFunc) (signature.SignerVerifier, error)

func VerifierForKeyRef

func VerifierForKeyRef(ctx context.Context, keyRef string, hashAlgorithm crypto.Hash) (verifier signature.Verifier, err error)

VerifierForKeyRef parses the given keyRef, loads the key and returns an appropriate verifier using the provided hash algorithm

Types

type AnnotationsMap

type AnnotationsMap struct {
	Annotations map[string]interface{}
}

func (*AnnotationsMap) Set

func (a *AnnotationsMap) Set(s string) error

func (*AnnotationsMap) String

func (a *AnnotationsMap) String() string

Jump to

Keyboard shortcuts

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