pub fn generate(hosts: &[String], days: u32) -> Result<SelfSigned>Expand description
Build a self-signed certificate covering hosts, valid for days.
Every host becomes a subject-alternative name — a DNS SAN, or an IP SAN when it parses as an address, because clients match IP literals against IP SANs and ignore DNS entries for them. The CN is set to the first host for the benefit of old tooling that still reads it, but SANs are what every current client actually checks.