pub trait KeyProvider: Send + Sync + Debug {
    // Required method
    fn load_private_key(
        &self,
        key_der: PrivateKeyDer<'static>
    ) -> Result<Arc<dyn SigningKey>, Error>;
}
Expand description

A mechanism for loading private SigningKeys from PrivateKeyDer.

Required Methods§

source

fn load_private_key( &self, key_der: PrivateKeyDer<'static> ) -> Result<Arc<dyn SigningKey>, Error>

Decode and validate a private signing key from key_der.

This is used by ConfigBuilder::with_client_auth_cert(), ConfigBuilder::with_single_cert(), and ConfigBuilder::with_single_cert_with_ocsp(). The key types and formats supported by this function directly defines the key types and formats supported in those APIs.

Return an error if the key type encoding is not supported, or if the key fails validation.

Implementors§