MCPcopy Create free account
hub / github.com/temporalio/temporal / pemEncodeToFile

Function pemEncodeToFile

tests/testutils/tls.go:170–176  ·  view source on GitHub ↗
(file string, block *pem.Block)

Source from the content-addressed store, hash-verified

168}
169
170func pemEncodeToFile(file string, block *pem.Block) error {
171 bytes, err := pemEncodeToBytes(block)
172 if err != nil {
173 return err
174 }
175 return os.WriteFile(file, bytes, os.FileMode(0644))
176}
177
178func pemEncodeToBytes(block *pem.Block) ([]byte, error) {
179 pemBuffer := new(bytes.Buffer)

Callers 2

GenerateSelfSignedCAFunction · 0.85
GenerateServerCertFunction · 0.85

Calls 1

pemEncodeToBytesFunction · 0.85

Tested by

no test coverage detected