Skip to content

Commit

Permalink
Update error message for verify/verify attestation (#1686)
Browse files Browse the repository at this point in the history
A certificate can also be provided in addition to a key ref or hardware
token.

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
  • Loading branch information
haydentherapper authored Mar 30, 2022
1 parent b848df7 commit e2017af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cosign/cli/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *VerifyCommand) Exec(ctx context.Context, images []string) (err error) {
}

if !options.OneOf(c.KeyRef, c.CertRef, c.Sk) && !options.EnableExperimental() {
return &options.KeyParseError{}
return &options.PubKeyParseError{}
}
ociremoteOpts, err := c.ClientOpts(ctx)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cosign/cli/verify/verify_attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (c *VerifyAttestationCommand) Exec(ctx context.Context, images []string) (e
}

if !options.OneOf(c.KeyRef, c.Sk, c.CertRef) && !options.EnableExperimental() {
return &options.KeyParseError{}
return &options.PubKeyParseError{}
}

ociremoteOpts, err := c.ClientOpts(ctx)
Expand Down

0 comments on commit e2017af

Please sign in to comment.