pub fn write_to(
hosts: &[String],
days: u32,
cert_path: &str,
key_path: &str,
) -> Result<SelfSigned>Expand description
Generate a certificate for hosts and write it to cert_path/key_path.
Creates parent directories as needed. The key is written 0600 on Unix — a private key that
lands world-readable is a worse outcome than the missing certificate we set out to fix.