Write a private key file with secure permissions (0o400). This function enforces restrictive permissions to prevent accidental exposure.
Path to write the key file
Key content (PEM string or DER buffer)
If directory cannot be created
If file cannot be written
Write a private key file with secure permissions (0o400). This function enforces restrictive permissions to prevent accidental exposure.