Trait rustls::server::ResolvesServerCert
source · pub trait ResolvesServerCert:
Debug
+ Send
+ Sync {
// Required method
fn resolve(
&self,
client_hello: ClientHello<'_>,
) -> Option<Arc<CertifiedKey>>;
// Provided method
fn only_raw_public_keys(&self) -> bool { ... }
}
Expand description
How to choose a certificate chain and signing key for use in server authentication.
This is suitable when selecting a certificate does not require I/O or when the application is using blocking I/O anyhow.
For applications that use async I/O and need to do I/O to choose
a certificate (for instance, fetching a certificate from a data store),
the Acceptor
interface is more suitable.
Required Methods§
sourcefn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
Choose a certificate chain and matching key given simplified ClientHello information.
Return None
to abort the handshake.
Provided Methods§
sourcefn only_raw_public_keys(&self) -> bool
fn only_raw_public_keys(&self) -> bool
Return true when the server only supports raw public keys.