pub trait Certifiable {
    type PublicKey;
    type KeyPair;

    fn keypair_to_certificate(
        subject_names: impl Into<Vec<String>>,
        kp: Self::KeyPair
    ) -> Result<Certificate, Error>; fn public_key_to_spki(public_key: &Self::PublicKey) -> Vec<u8>; }
Expand description

A trait that offers the key conversions necessary for generating and verifying self-signed certificates matching an expected key

Required Associated Types

Required Methods

This generates a self-signed X509 certificate with the provided key pair

This generates X.509 SubjectPublicKeyInfo (SPKI) bytes (in DER format) from the provided public key

Implementors