// Verify builds and returns an ffcli command
Verify builds and returns an ffcli command
// Verify builds and returns an ffcli command
func Verify() *ffcli.Command {
	cmd := VerifyCommand{}
	flagset := flag.NewFlagSet("cosign verify", flag.ExitOnError)
	annotations := annotationsMap{}
	flagset.StringVar(&cmd.Key, "key", "", "path to the public key")
	flagset.StringVar(&cmd.KmsVal, "kms", "", "verify via a public key stored in a KMS")
	flagset.BoolVar(&cmd.CheckClaims, "check-claims", true, "whether to check the claims found")
	flagset.Var(&annotations, "a", "extra key=value pairs to sign")
	cmd.Annotations = &annotations.annotations
	return &ffcli.Command{
		Name:       "verify",
		ShortUsage: "cosign verify -key <key>|-kms <kms> <image uri>",
		ShortHelp:  "Verify a signature on the supplied container image",
		LongHelp: `Verify signature and annotations on an image by checking the claims
against the transparency log.
EXAMPLES
  # verify cosign claims and signing certificates on the image
  cosign verify <IMAGE>
  # additionally verify specified annotations
  cosign verify -a key1=val1 -a key2=val2 <IMAGE>
  # (experimental) additionally, verify with the transparency log
  COSIGN_EXPERIMENTAL=1 cosign verify <IMAGE>
  # verify image with public key
  cosign verify -key <FILE> <IMAGE>
  # verify image with public key stored in Google Cloud KMS
  cosign verify -kms  gcpkms://projects/<PROJECT>/locations/global/keyRings/<KEYRING>/cryptoKeys/<KEY> <IMAGE>`,
		FlagSet: flagset,
		Exec:    cmd.Exec,
	}
}
func Verify ( ) * ffcli . Command { cmd := VerifyCommand { } flagset := flag . NewFlagSet ( " " , flag . ExitOnError ) annotations := annotationsMap { } flagset . StringVar ( & cmd . Key , " " , " " , " " ) flagset . StringVar ( & cmd . KmsVal , " " , " " , " " ) flagset . BoolVar ( & cmd . CheckClaims , " " , true , " " ) flagset . Var ( & annotations , " " , " " ) cmd . Annotations = & annotations . annotations return & ffcli . Command { Name : " " , ShortUsage : " " , ShortHelp : " " , LongHelp : `Verify signature and annotations on an image by checking the claims
against the transparency log.

EXAMPLES
  # verify cosign claims and signing certificates on the image
  cosign verify <IMAGE>

  # additionally verify specified annotations
  cosign verify -a key1=val1 -a key2=val2 <IMAGE>

  # (experimental) additionally, verify with the transparency log
  COSIGN_EXPERIMENTAL=1 cosign verify <IMAGE>

  # verify image with public key
  cosign verify -key <FILE> <IMAGE>

  # verify image with public key stored in Google Cloud KMS
  cosign verify -kms  gcpkms://projects/<PROJECT>/locations/global/keyRings/<KEYRING>/cryptoKeys/<KEY> <IMAGE>` , FlagSet : flagset , Exec : cmd . Exec , } }
Verify builds and returns an ffcli command
Verify builds and returns an ffcli command
// parse annotations