From 9c466a8b8df6a1886292e0a82023bc217968da9e Mon Sep 17 00:00:00 2001 From: Trishank Karthik Kuppusamy Date: Fri, 24 Jan 2025 14:26:17 -0500 Subject: [PATCH] docs: minor edits to docs (#370) * minor edits to docs Signed-off-by: Trishank Karthik Kuppusamy * Update verification.md Signed-off-by: Trishank Karthik Kuppusamy * Update verification.md Signed-off-by: Trishank Karthik Kuppusamy * Update signed_entity.go `WithoutAnyObserverTimestampsUnsafe` doesn't seem to exist anymore Signed-off-by: Trishank Karthik Kuppusamy --------- Signed-off-by: Trishank Karthik Kuppusamy --- docs/signing.md | 2 +- docs/verification.md | 12 ++---------- pkg/verify/signed_entity.go | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/signing.md b/docs/signing.md index 404545f4..110dfe6c 100644 --- a/docs/signing.md +++ b/docs/signing.md @@ -12,7 +12,7 @@ This document will walk you through using `sigstore-go` to generate a Sigstore b Clone this repository and run the following command: ```shell -$ make examples +$ make build-examples $ go install ./examples/sigstore-go-signing ``` diff --git a/docs/verification.md b/docs/verification.md index b0b16c45..3858db8b 100644 --- a/docs/verification.md +++ b/docs/verification.md @@ -63,12 +63,8 @@ Going through this step-by-step, we'll start by loading the trusted root from th if err != nil { panic(err) } - trustedrootJSON, err := client.GetTarget("trusted_root.json") - if err != nil { - panic(err) - } - trustedMaterial, err := root.NewTrustedRootFromJSON(trustedrootJSON) + trustedMaterial, err := root.GetTrustedRoot(client) if err != nil { panic(err) } @@ -201,12 +197,8 @@ func main() { if err != nil { panic(err) } - trustedrootJSON, err := client.GetTarget("trusted_root.json") - if err != nil { - panic(err) - } - trustedMaterial, err := root.NewTrustedRootFromJSON(trustedrootJSON) + trustedMaterial, err := root.GetTrustedRoot(client) if err != nil { panic(err) } diff --git a/pkg/verify/signed_entity.go b/pkg/verify/signed_entity.go index 857596d9..918bf545 100644 --- a/pkg/verify/signed_entity.go +++ b/pkg/verify/signed_entity.go @@ -192,7 +192,7 @@ func WithCurrentTime() VerifierOption { func (c *VerifierConfig) Validate() error { if !c.requireObserverTimestamps && !c.requireSignedTimestamps && !c.requireIntegratedTimestamps && !c.useCurrentTime { return errors.New("when initializing a new SignedEntityVerifier, you must specify at least one of " + - "WithObserverTimestamps(), WithSignedTimestamps(), WithIntegratedTimestamps(), or WithoutAnyObserverTimestampsUnsafe()") + "WithObserverTimestamps(), WithSignedTimestamps(), or WithIntegratedTimestamps()") } return nil