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

Function makeRootProvider

examples/features/advancedtls/client/main.go:52–63  ·  view source on GitHub ↗

-- TLS --

(credsDirectory string)

Source from the content-addressed store, hash-verified

50// -- TLS --
51
52func makeRootProvider(credsDirectory string) certprovider.Provider {
53 rootOptions := pemfile.Options{
54 RootFile: filepath.Join(credsDirectory, "ca_cert.pem"),
55 RefreshDuration: credRefreshInterval,
56 }
57 rootProvider, err := pemfile.NewProvider(rootOptions)
58 if err != nil {
59 fmt.Printf("Error %v\n", err)
60 os.Exit(1)
61 }
62 return rootProvider
63}
64
65func makeIdentityProvider(revoked bool, credsDirectory string) certprovider.Provider {
66 var certFile string

Callers 3

tlsWithCRLsToGoodServerFunction · 0.70

Calls 3

NewProviderFunction · 0.92
JoinMethod · 0.80
PrintfMethod · 0.65

Tested by

no test coverage detected