From 1fc061e3852877d2e504ebb2d9161251e4ea03b3 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Thu, 26 Dec 2024 13:15:58 +0800 Subject: [PATCH] update docs Signed-off-by: Patrick Zheng --- example_signBlob_test.go | 2 +- example_verifyBlob_test.go | 4 ++-- verifier/trustpolicy/blob.go | 4 ++-- verifier/trustpolicy/oci.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example_signBlob_test.go b/example_signBlob_test.go index bb93e9de..08b7e2fc 100644 --- a/example_signBlob_test.go +++ b/example_signBlob_test.go @@ -33,7 +33,7 @@ func Example_signBlob() { // Users should replace `exampleCertTuple.PrivateKey` with their own private // key and replace `exampleCerts` with the corresponding certificate chain, // following the Notary Project certificate requirements: - // https://github.com/notaryproject/notaryproject/blob/v1.0.0/specs/signature-specification.md#certificate-requirements + // https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/signature-specification.md#certificate-requirements exampleSigner, err := signer.NewGenericSigner(exampleCertTuple.PrivateKey, exampleCerts) if err != nil { panic(err) // Handle error diff --git a/example_verifyBlob_test.go b/example_verifyBlob_test.go index 8fd64b1e..291dd54b 100644 --- a/example_verifyBlob_test.go +++ b/example_verifyBlob_test.go @@ -55,7 +55,7 @@ func Example_verifyBlob() { // createTrustStoreForBlobVerify creates a trust store directory for demo purpose. // Users could use the default trust store from Notary Project and add trusted // certificates into it following the trust store spec: - // https://github.com/notaryproject/notaryproject/blob/v1.1.0/specs/trust-store-trust-policy.md#trust-store + // https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/trust-store-trust-policy.md#trust-store if err := createTrustStoreForBlobVerify(); err != nil { panic(err) // Handle error } @@ -112,7 +112,7 @@ func createTrustStoreForBlobVerify() error { // Users should replace `exampleX509Certificate` with their own trusted // certificate and add to the trust store, following the // Notary Project certificate requirements: - // https://github.com/notaryproject/notaryproject/blob/v1.1.0/specs/signature-specification.md#certificate-requirements + // https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/signature-specification.md#certificate-requirements exampleX509Certificate := `-----BEGIN CERTIFICATE----- MIIEbDCCAtSgAwIBAgIBUzANBgkqhkiG9w0BAQsFADBkMQswCQYDVQQGEwJVUzEL MAkGA1UECBMCV0ExEDAOBgNVBAcTB1NlYXR0bGUxDzANBgNVBAoTBk5vdGFyeTEl diff --git a/verifier/trustpolicy/blob.go b/verifier/trustpolicy/blob.go index bed6e182..b316a022 100644 --- a/verifier/trustpolicy/blob.go +++ b/verifier/trustpolicy/blob.go @@ -115,7 +115,7 @@ func (policyDoc *BlobDocument) Validate() error { // GetApplicableTrustPolicy returns a pointer to the deep copied [BlobTrustPolicy] // for given policy name. -// see https://github.com/notaryproject/notaryproject/blob/v1.1.0/specs/trust-store-trust-policy.md#blob-trust-policy +// see https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/trust-store-trust-policy.md#blob-trust-policy func (policyDoc *BlobDocument) GetApplicableTrustPolicy(policyName string) (*BlobTrustPolicy, error) { if strings.TrimSpace(policyName) == "" { return nil, errors.New("policy name cannot be empty") @@ -132,7 +132,7 @@ func (policyDoc *BlobDocument) GetApplicableTrustPolicy(policyName string) (*Blo // GetGlobalTrustPolicy returns a pointer to the deep copied [BlobTrustPolicy] // that is marked as global policy. -// see https://github.com/notaryproject/notaryproject/blob/v1.1.0/specs/trust-store-trust-policy.md#blob-trust-policy +// see https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/trust-store-trust-policy.md#blob-trust-policy func (policyDoc *BlobDocument) GetGlobalTrustPolicy() (*BlobTrustPolicy, error) { for _, policyStatement := range policyDoc.TrustPolicies { if policyStatement.GlobalPolicy { diff --git a/verifier/trustpolicy/oci.go b/verifier/trustpolicy/oci.go index 838e4aa9..19a73f88 100644 --- a/verifier/trustpolicy/oci.go +++ b/verifier/trustpolicy/oci.go @@ -140,7 +140,7 @@ func (policyDoc *OCIDocument) Validate() error { // GetApplicableTrustPolicy returns a pointer to the deep copied [OCITrustPolicy] // statement that applies to the given registry scope. If no applicable trust // policy is found, returns an error. -// see https://github.com/notaryproject/notaryproject/blob/v1.0.0/specs/trust-store-trust-policy.md#selecting-a-trust-policy-based-on-artifact-uri +// see https://github.com/notaryproject/specifications/tree/9c81dc773508dedc5a81c02c8d805de04f65050b/specs/trust-store-trust-policy.md#selecting-a-trust-policy-based-on-artifact-uri func (policyDoc *OCIDocument) GetApplicableTrustPolicy(artifactReference string) (*OCITrustPolicy, error) { artifactPath, err := getArtifactPathFromReference(artifactReference) if err != nil {