pub fn create_legacy_rsa_id_cert<Rng: CryptoRng>(
rng: &mut Rng,
now: SystemTime,
hostname: &str,
keypair: &KeyPair,
) -> Result<Vec<u8>, X509CertError>Expand description
Create an X.509 certificate, for use in a CERTS cell, self-certifying the provided RSA identity key.
The resulting certificate will be encoded in DER. Its cert_type field should be 02 when it is sent in a CERTS cell.
The resulting certificate is quite minimal, and has no unnecessary extensions.
Returns an error on failure, or if keypair is not a 1024-bit RSA key
with exponent of 65537.