Trait rustls::ClientCertVerifier [−][src]
pub trait ClientCertVerifier: Send + Sync { fn client_auth_root_subjects(&self) -> DistinguishedNames; fn verify_client_cert(
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>; fn offer_client_auth(&self) -> bool { ... } fn client_auth_mandatory(&self) -> bool { ... } }
Expand description
Something that can verify a client certificate chain
Required methods
fn client_auth_root_subjects(&self) -> DistinguishedNames[src]
fn client_auth_root_subjects(&self) -> DistinguishedNames[src]Returns the subject names of the client authentication trust anchors to share with the client when requesting client authentication.
fn verify_client_cert(
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>[src]
fn verify_client_cert(
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>[src]Verify a certificate chain presented_certs is rooted in roots.
Does no further checking of the certificate.
Provided methods
fn offer_client_auth(&self) -> bool[src]
fn offer_client_auth(&self) -> bool[src]Returns true to enable the server to request a client certificate and
false to skip requesting a client certificate. Defaults to true.
fn client_auth_mandatory(&self) -> bool[src]
fn client_auth_mandatory(&self) -> bool[src]Returns true to require a client certificate and false to make client
authentication optional. Defaults to self.offer_client_auth().
Implementors
impl ClientCertVerifier for AllowAnyAnonymousOrAuthenticatedClient[src]
impl ClientCertVerifier for AllowAnyAnonymousOrAuthenticatedClient[src]fn offer_client_auth(&self) -> bool[src]
fn client_auth_mandatory(&self) -> bool[src]
fn client_auth_root_subjects(&self) -> DistinguishedNames[src]
fn verify_client_cert(
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>[src]
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>
impl ClientCertVerifier for AllowAnyAuthenticatedClient[src]
impl ClientCertVerifier for AllowAnyAuthenticatedClient[src]fn offer_client_auth(&self) -> bool[src]
fn client_auth_mandatory(&self) -> bool[src]
fn client_auth_root_subjects(&self) -> DistinguishedNames[src]
fn verify_client_cert(
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>[src]
&self,
presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>
impl ClientCertVerifier for NoClientAuth[src]
impl ClientCertVerifier for NoClientAuth[src]fn offer_client_auth(&self) -> bool[src]
fn client_auth_root_subjects(&self) -> DistinguishedNames[src]
fn verify_client_cert(
&self,
_presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>[src]
&self,
_presented_certs: &[Certificate]
) -> Result<ClientCertVerified, TLSError>