writeKey will write a key to disk in DER format (it's a standard pem key)
(filename string, data []byte)
| 185 | |
| 186 | // writeKey will write a key to disk in DER format (it's a standard pem key) |
| 187 | func 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 | } |
no outgoing calls
no test coverage detected