MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / writeKey

Function writeKey

sshgen/sshgen.go:187–194  ·  view source on GitHub ↗

writeKey will write a key to disk in DER format (it's a standard pem key)

(filename string, data []byte)

Source from the content-addressed store, hash-verified

185
186// writeKey will write a key to disk in DER format (it's a standard pem key)
187func writeKey(filename string, data []byte) error {
188 filepath, err := homedir.Expand(filename)
189 if err != nil {
190 return err
191 }
192
193 return os.WriteFile(filepath, data, 0600)
194}

Callers 2

generateKeyPairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected