MCPcopy Create free account
hub / github.com/google/go-github / getTrustedMaterial

Function getTrustedMaterial

example/verifyartifact/main.go:121–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119}
120
121func getTrustedMaterial() (root.TrustedMaterialCollection, error) {
122 trustedRootJSON, err := os.ReadFile(*trustedRootJSONPath)
123 if err != nil {
124 return nil, fmt.Errorf("failed to read %v: %w", *trustedRootJSONPath, err)
125 }
126
127 trustedRoot, err := root.NewTrustedRootFromJSON(trustedRootJSON)
128 if err != nil {
129 return nil, err
130 }
131
132 trustedMaterial := root.TrustedMaterialCollection{
133 trustedRoot,
134 }
135
136 return trustedMaterial, nil
137}
138
139func getIdentityPolicies() ([]verify.PolicyOption, error) {
140 certID, err := verify.NewShortCertificateIdentity(*expectedIssuer, "", *expectedSAN, "")

Callers 1

getSignedEntityVerifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…