Skip to content

Commit

Permalink
Fix verify and verify-attestation output flag (#546)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
  • Loading branch information
josedonizetti committed Aug 20, 2021
1 parent 001d55f commit 3733e69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/cosign/cli/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func applyVerifyFlags(cmd *VerifyCommand, flagset *flag.FlagSet) {
flagset.StringVar(&cmd.Slot, "slot", "", "security key slot to use for generated key (default: signature) (authentication|signature|card-authentication|key-management)")
flagset.StringVar(&cmd.RekorURL, "rekor-url", "https://rekor.sigstore.dev", "address of rekor STL server")
flagset.BoolVar(&cmd.CheckClaims, "check-claims", true, "whether to check the claims found")
flagset.StringVar(&cmd.Output, "output", "json", "output the signing image information. Default JSON.")
flagset.StringVar(&cmd.Output, "output", "json", "output format for the signing image information (default JSON) (json|text)")

// parse annotations
flagset.Var(&annotations, "a", "extra key=value pairs to sign")
Expand Down Expand Up @@ -166,7 +166,7 @@ func (c *VerifyCommand) Exec(ctx context.Context, args []string) (err error) {
return err
}

PrintVerification(imageRef, verified, co, "text")
PrintVerification(imageRef, verified, co, c.Output)
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions cmd/cosign/cli/verify_attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func applyVerifyAttestationFlags(cmd *VerifyAttestationCommand, flagset *flag.Fl
flagset.BoolVar(&cmd.Sk, "sk", false, "whether to use a hardware security key")
flagset.StringVar(&cmd.Slot, "slot", "", "security key slot to use for generated key (default: signature) (authentication|signature|card-authentication|key-management)")
flagset.BoolVar(&cmd.CheckClaims, "check-claims", true, "whether to check the claims found")
flagset.StringVar(&cmd.Output, "output", "json", "output the signing image information. Default JSON.")
flagset.StringVar(&cmd.Output, "output", "json", "output format for the signing image information (default JSON) (json|text)")
flagset.StringVar(&cmd.FulcioURL, "fulcio-url", "https://fulcio.sigstore.dev", "[EXPERIMENTAL] address of sigstore PKI server")
flagset.StringVar(&cmd.RekorURL, "rekor-url", "https://rekor.sigstore.dev", "[EXPERIMENTAL] address of rekor STL server")
}
Expand Down Expand Up @@ -155,7 +155,7 @@ func (c *VerifyAttestationCommand) Exec(ctx context.Context, args []string) (err
return err
}

PrintVerification(imageRef, verified, co, "text")
PrintVerification(imageRef, verified, co, c.Output)
}

return nil
Expand Down

0 comments on commit 3733e69

Please sign in to comment.