sign

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 38 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttachedImageRef

func GetAttachedImageRef(ref name.Reference, attachment string, opts ...ociremote.Option) (name.Reference, error)

func ShouldUploadToTlog

func ShouldUploadToTlog(ctx context.Context, ref name.Reference, force bool, url string) bool

func SignBlobCmd

func SignBlobCmd(ro *options.RootOptions, ko KeyOpts, regOpts options.RegistryOptions, payloadPath string, b64 bool, outputSignature string, outputCertificate string) ([]byte, error)

nolint

func SignCmd

func SignCmd(ro *options.RootOptions, ko KeyOpts, regOpts options.RegistryOptions, annotations map[string]interface{},
	imgs []string, certPath string, certChainPath string, upload bool, outputSignature, outputCertificate string,
	payloadPath string, force bool, recursive bool, attachment string) error

nolint

Types

type KeyOpts

type KeyOpts struct {
	Sk               bool
	Slot             string
	KeyRef           string
	FulcioURL        string
	RekorURL         string
	IDToken          string
	PassFunc         cosign.PassFunc
	OIDCIssuer       string
	OIDCClientID     string
	OIDCClientSecret string
	OIDCRedirectURL  string
	BundlePath       string

	// Modeled after InsecureSkipVerify in tls.Config, this disables
	// verifying the SCT.
	InsecureSkipFulcioVerify bool
}

type SignerVerifier added in v1.4.0

type SignerVerifier struct {
	Cert  []byte
	Chain []byte
	signature.SignerVerifier
	// contains filtered or unexported fields
}

func SignerFromKeyOpts

func SignerFromKeyOpts(ctx context.Context, certPath string, certChainPath string, ko KeyOpts) (*SignerVerifier, error)

func (*SignerVerifier) Bytes added in v1.4.0

func (c *SignerVerifier) Bytes(ctx context.Context) ([]byte, error)

func (*SignerVerifier) Close added in v1.4.0

func (c *SignerVerifier) Close()

Jump to

Keyboard shortcuts

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