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 { ... }
}展开描述
How 到 choose 一个 certificate chain 并 signing key 用于 use in server authentication.
This is suitable when selecting 一个 certificate does not require I/O 或 when the application is using blocking I/O anyhow.
For applications that use async I/O 并 need 到 do I/O 到 choose
一个 certificate (用于 instance, fetching 一个 certificate 从 一个 data store),
the Acceptor interface 更 suitable.
必需方法§
Sourcefn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
选择一个 certificate chain 并 matching key given simplified ClientHello information.
Return None 到 abort the handshake.
提供方法§
Sourcefn only_raw_public_keys(&self) -> bool
fn only_raw_public_keys(&self) -> bool
当服务器仅支持原始公钥时返回 true