Skip to content

Commit

Permalink
Fix verification example (#194)
Browse files Browse the repository at this point in the history
`GetTrustedrootJSON` was removed in 40d7422, so update the example for
the new API.

Signed-off-by: Colleen Murphy <[email protected]>
  • Loading branch information
cmurphy authored May 30, 2024
1 parent a23a4d5 commit 3a6a109
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ To verify a bundle with the Go API, you'll need to:
Going through this step-by-step, we'll start by loading the trusted root from the Sigstore TUF repo:

```go
trustedrootJSON, err := tuf.GetTrustedrootJSON("tuf-repo-cdn.sigstore.dev", "tufcache")
opts := tuf.DefaultOptions()
client, err := tuf.New(opts)
if err != nil {
panic(err)
}
trustedrootJSON, err := client.GetTarget("trusted_root.json")
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -187,7 +192,12 @@ import (
)

func main() {
trustedrootJSON, err := tuf.GetTrustedrootJSON("tuf-repo-cdn.sigstore.dev", "tufcache")
opts := tuf.DefaultOptions()
client, err := tuf.New(opts)
if err != nil {
panic(err)
}
trustedrootJSON, err := client.GetTarget("trusted_root.json")
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 3a6a109

Please sign in to comment.