Skip to main content

self_signed_server_auth

Function self_signed_server_auth 

pub fn self_signed_server_auth(
    data: SelfSignedData,
) -> Result<(Vec<CertificateDer<'static>>, PrivateKeyDer<'static>), Box<dyn Error + Send + Sync>>
Available on crate features boring and crypto and std only.
Expand description

Generate a self-signed server certificate (leaf signed by a generated CA).

Returns the certificate chain ([leaf, ca]) and the leaf private key, all DER-encoded. The crypto provider is chosen at compile time by cargo feature (see the module docs).