singular print-attestation

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
This commit is contained in:
Ramon Petgrave
2024-06-19 00:32:31 +00:00
parent 610ef6f1af
commit 944c9a6f4c
3 changed files with 5 additions and 5 deletions

View File

@@ -199,7 +199,7 @@ func verifyVSACmd() *cobra.Command {
VerifierID: &o.VerifierID,
ResourceUri: &o.ResourceUri,
VerifiedLevels: &o.VerifiedLevels,
PrintAttestations: &o.PrintAttestations,
PrintAttestation: &o.PrintAttestation,
PublicKeyPath: &o.PublicKeyPath,
PublicKeyID: &o.PublicKeyID,
SignatureHashAlgo: &o.SignatureHashAlgo,

View File

@@ -137,7 +137,7 @@ type VerifyVSAOptions struct {
PublicKeyPath string
PublicKeyID string
SignatureHashAlgo string
PrintAttestations bool
PrintAttestation bool
}
var _ Interface = (*VerifyVSAOptions)(nil)
@@ -159,7 +159,7 @@ func (o *VerifyVSAOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringSliceVar(&o.VerifiedLevels, "verified-levels", []string{},
"the levels of verification to be performed")
cmd.Flags().BoolVar(&o.PrintAttestations, "print-attestations", false,
cmd.Flags().BoolVar(&o.PrintAttestation, "print-attestation", false,
"[optional] print the verified attestations to stdout")
cmd.Flags().StringVar(&o.PublicKeyPath, "public-key-path", "",

View File

@@ -35,7 +35,7 @@ type VerifyVSACommand struct {
VerifierID *string
ResourceUri *string
VerifiedLevels *[]string
PrintAttestations *bool
PrintAttestation *bool
PublicKeyPath *string
PublicKeyID *string
SignatureHashAlgo *string
@@ -93,7 +93,7 @@ func (c *VerifyVSACommand) Exec(ctx context.Context) (*utils.TrustedAttesterID,
printFailed(err)
return nil, err
}
if *c.PrintAttestations {
if *c.PrintAttestation {
fmt.Fprintf(os.Stdout, "%s\n", string(verifiedProvenance))
}
// verfiers.VerifyVSA already checks if the producerID matches