pub fn gen_self_signed_certificate(hostname: &str) -> X509
generates a really terrible self-signed certificate for testing purposes