跳到主要内容

ResolvesServerCert

特性 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 { ... }
}
展开描述

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.

必需方法§

Source

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

选择一个 certificate chain 并 matching key given simplified ClientHello information.

Return None 到 abort the handshake.

提供方法§

Source

fn only_raw_public_keys(&self) -> bool

当服务器仅支持原始公钥时返回 true

实现者§