MCPcopy
hub / github.com/grpc/grpc-go / makeIdentityProvider

Function makeIdentityProvider

credentials/xds/xds_client_test.go:200–207  ·  view source on GitHub ↗

makeIdentityProvider creates a new instance of the fakeProvider returning the identity key material specified in the provider file paths.

(t *testing.T, certPath, keyPath string)

Source from the content-addressed store, hash-verified

198// makeIdentityProvider creates a new instance of the fakeProvider returning the
199// identity key material specified in the provider file paths.
200func makeIdentityProvider(t *testing.T, certPath, keyPath string) certprovider.Provider {
201 t.Helper()
202 cert, err := tls.LoadX509KeyPair(testdata.Path(certPath), testdata.Path(keyPath))
203 if err != nil {
204 t.Fatal(err)
205 }
206 return &fakeProvider{km: &certprovider.KeyMaterial{Certs: []tls.Certificate{cert}}}
207}
208
209// makeRootProvider creates a new instance of the fakeProvider returning the
210// root key material specified in the provider file paths.

Calls 2

PathFunction · 0.92
FatalMethod · 0.65

Tested by

no test coverage detected