#[non_exhaustive]pub enum ClientAuth {
None,
Required(Trust),
Verifier(Arc<dyn ClientCertVerifier>),
}Expand description
How a server treats the client’s certificate.
A value the ServerBuilder takes, so no default hides the choice.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Ask for no client certificate: the server proves itself, the client does not at the TLS layer.
The application must authenticate the client inside the encrypted channel (a key
proof, a token) before trusting it. A handshake with this configuration finishes with no
peer certificate: see
TlsHandshake::finish_unauthenticated.
Required(Trust)
Require a client certificate this trust accepts.
Verifier(Arc<dyn ClientCertVerifier>)
Verify clients with a verifier of the host’s own (one of this crate’s wrapped, for example).
A verifier whose client authentication is optional
(ClientCertVerifier::client_auth_mandatory is false) admits a client without a
certificate; under an access control list such a client is decided by address alone, as
one that proves no identity, so a rule naming a fingerprint never admits it.