MCPcopy
hub / github.com/helm/helm / WithCAFile

Function WithCAFile

internal/tlsutil/tls.go:67–82  ·  view source on GitHub ↗
(caFile string)

Source from the content-addressed store, hash-verified

65}
66
67func WithCAFile(caFile string) TLSConfigOption {
68 return func(options *TLSConfigOptions) error {
69 if caFile == "" {
70 return nil
71 }
72
73 caPEMBlock, err := os.ReadFile(caFile)
74 if err != nil {
75 return fmt.Errorf("can't read CA file: %q: %w", caFile, err)
76 }
77
78 options.caPEMBlock = caPEMBlock
79
80 return nil
81 }
82}
83
84func NewTLSConfig(options ...TLSConfigOption) (*tls.Config, error) {
85 to := TLSConfigOptions{}

Callers 9

setupFunction · 0.92
newRegistryClientWithTLSFunction · 0.92
MakeTestTLSConfigFunction · 0.92
TestDownloadTLSFunction · 0.92
newRegistryClientMethod · 0.92
httpClientMethod · 0.92
newRegistryClientMethod · 0.92
TestNewTLSConfigFunction · 0.70

Calls

no outgoing calls

Tested by 4

setupFunction · 0.74
TestDownloadTLSFunction · 0.74
TestNewTLSConfigFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…