Skip to content

Commit

Permalink
Make payload types public (#564)
Browse files Browse the repository at this point in the history
Signed-off-by: Priya Wadhwa <priyawadhwa@google.com>
  • Loading branch information
priyawadhwa committed Aug 24, 2021
1 parent 8ce7d29 commit 0783cc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/cosign/cli/attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ EXAMPLES
}

const (
intotoPayloadType = "application/vnd.in-toto+json"
dssePayloadType = "application/vnd.dsse.envelope.v1+json"
IntotoPayloadType = "application/vnd.in-toto+json"
DssePayloadType = "application/vnd.dsse.envelope.v1+json"
)

func AttestCmd(ctx context.Context, ko KeyOpts, imageRef string, certPath string,
Expand Down Expand Up @@ -139,7 +139,7 @@ func AttestCmd(ctx context.Context, ko KeyOpts, imageRef string, certPath string
if err != nil {
return errors.Wrap(err, "getting signer")
}
wrapped := dsse.WrapSigner(sv, intotoPayloadType)
wrapped := dsse.WrapSigner(sv, IntotoPayloadType)

fmt.Fprintln(os.Stderr, "Using payload from:", predicatePath)

Expand Down Expand Up @@ -182,7 +182,7 @@ func AttestCmd(ctx context.Context, ko KeyOpts, imageRef string, certPath string
Chain: sv.Chain,
DupeDetector: sv,
RemoteOpts: remoteOpts,
MediaType: dssePayloadType,
MediaType: DssePayloadType,
}

uploadTLog, err := shouldUploadToTlog(ref, force, ko.RekorURL)
Expand Down

0 comments on commit 0783cc9

Please sign in to comment.