Skip to content

Commit

Permalink
fix verify command examples
Browse files Browse the repository at this point in the history
Signed-off-by: rgnote <5878554+rgnote@users.noreply.github.com>
  • Loading branch information
rgnote committed Oct 28, 2023
1 parent bd9fc27 commit a4bfe37
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions specs/commandline/blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ notation certificate add --type ca --store wabbit-networks wabbit-networks.crt
# Create a JSON file named "trustpolicy.json" under directory "{NOTATION_CONFIG}".

# Verify the detached signature
notation blob verify /tmp/my-blob-signature.sig
notation blob verify --signature /tmp/my-blob-signature.sig /tmp/my-blob.bin
```

An example of output messages for a successful verification:
Expand All @@ -297,7 +297,7 @@ Use the `--user-metadata` flag to verify that provided key-value pairs are prese

```shell
# Verify the signature and verify that io.wabbit-networks.buildId=123 is present in the signed payload
notation blob verify --user-metadata io.wabbit-networks.buildId=123 /tmp/my-blob-signature.sig
notation blob verify --user-metadata io.wabbit-networks.buildId=123 --signature /tmp/my-blob-signature.sig /tmp/my-blob.bin
```

An example of output messages for a successful verification:
Expand All @@ -323,7 +323,7 @@ Use the `--media-type` flag to verify that signature is for the provided media-t

```shell
# Verify the signature and verify that io.wabbit-networks.buildId=123 is present in the signed payload
notation blob verify --media-type application/my-media-octet-stream /tmp/my-blob-signature.sig
notation blob verify --media-type application/my-media-octet-stream --signature /tmp/my-blob-signature.sig /tmp/my-blob.bin
```

An example of output messages for a successful verification:
Expand All @@ -346,16 +346,14 @@ Error: signature verification failed: The blob is not of media type `application
Use the `--policy-scope` flag to select a Policy scope to verify the signature against.

```shell
notation blob verify --policy-scope my-blob-verification-selector /tmp/my-blob-signature.sig
notation blob verify --policy-scope my-blob-verification-selector --signature /tmp/my-blob-signature.sig /tmp/my-blob.bin
```

An example of output messages for a successful verification:

```text
Successfully verified signature /tmp/my-blob-signature.sig using policy scope `my-blob-verification-selector`
The blob is of media type `application/my-media-octet-stream`.
```
An example of output messages for an unsuccessful verification:

Expand Down

0 comments on commit a4bfe37

Please sign in to comment.