Function hyper_tls_hack::acceptor_from_p12_file[][src]

pub fn acceptor_from_p12_file(
    path: impl AsRef<Path>,
    password: &str
) -> Result<TlsAcceptor>

Simple utility function that reads a certificate file, and returns a TlsAcceptor. Useful for examples in documentation :)

If you have a cert in the form of a PEM .key and .crt file, you can generate a .p12 file using openssl:

 openssl pkcs12 -export -out cert.p12 -inkey cert.key -in chained-cert.crt