forked from sigstore/sigstore-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a new struct named SignedArtifactBundle which represents a signed artifact bundle as produced when signing with cosign and specifying the --bundle option. The motivation for change comes from trying to implement an example that verifies a blob using a bundle. For example, first a blob is signed using the following command: cosign sign-blob --bundle=artifact.bundle artifact.txt The `artifact.bundle` file generated by the above command will look something like this (shortened to fit the commit message format): { "base64Signature": "...", "cert": "...", "rekorBundle": { "SignedEntryTimestamp": "...", "Payload": { "body": "...", "integratedTime": 1669361833, "logIndex": 7810348, "logID": "..." } } } Currently, to create Bundle from this, one would have to parse the string as json, and then access the `rekorBundle` element, and then serialize it so that it can be passed to `Bundle::new_verified`. With the changes in this commit it will be possible to call `SignedArtifactBundle::new_verified` and pass in the contents for the bundle file directly. Refs: sigstore#117 Signed-off-by: Daniel Bevenius <[email protected]>
- Loading branch information
Showing
1 changed file
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters