Skip to content

Commit

Permalink
fix bundle requirement on keys and certs
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <[email protected]>
  • Loading branch information
asraa committed Nov 16, 2022
1 parent e39a0ad commit 746ea56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/cosign/cli/verify/verify_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ func (c *VerifyBlobCmd) Exec(ctx context.Context, blobRef string) error {
if err != nil {
return err
}
if b.Cert == "" {
// A certificate is required in the bundle unless we specified with
// --key, --sk, or --certificate.
if b.Cert == "" && co.SigVerifier == nil && cert == nil {
return fmt.Errorf("bundle does not contain cert for verification, please provide public key")
}
// b.Cert can either be a certificate or public key
Expand Down

0 comments on commit 746ea56

Please sign in to comment.