mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-16 21:46:40 +00:00
singular print-attestation
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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", "",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user