Skip to main content

ResolvesServerCert

Trait ResolvesServerCert 

Source
pub trait ResolvesServerCert:
    Debug
    + Send
    + Sync {
    // Required method
    fn resolve(
        &self,
        client_hello: &ClientHello<'_>,
    ) -> Option<Arc<CertifiedKey>>;

    // Provided method
    fn resolve_any(&self) -> Option<Arc<CertifiedKey>> { ... }
}
Expand description

Custom ResolvesServerCert trait that borrows ClientHello. It’s needed because Rustls’ ResolvesServerCert consumes ClientHello https://github.com/rustls/rustls/issues/1908

Required Methods§

Source

fn resolve(&self, client_hello: &ClientHello<'_>) -> Option<Arc<CertifiedKey>>

Provided Methods§

Source

fn resolve_any(&self) -> Option<Arc<CertifiedKey>>

Return first available certificate, if any. Can be used as a fallback option.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§