Struct rustls::AllowAnyAnonymousOrAuthenticatedClient [−][src]
pub struct AllowAnyAnonymousOrAuthenticatedClient { /* fields omitted */ }Expand description
A ClientCertVerifier that will allow both anonymous and authenticated
clients, without any name checking.
Client authentication will be requested during the TLS handshake. If the
client offers a certificate then this acts like
AllowAnyAuthenticatedClient, otherwise this acts like NoClientAuth.
Implementations
impl AllowAnyAnonymousOrAuthenticatedClient[src]
impl AllowAnyAnonymousOrAuthenticatedClient[src]pub fn new(roots: RootCertStore) -> Arc<dyn ClientCertVerifier>[src]
pub fn new(roots: RootCertStore) -> Arc<dyn ClientCertVerifier>[src]Construct a new AllowAnyAnonymousOrAuthenticatedClient.
roots is the list of trust anchors to use for certificate validation.
Trait Implementations
impl ClientCertVerifier for AllowAnyAnonymousOrAuthenticatedClient[src]
impl ClientCertVerifier for AllowAnyAnonymousOrAuthenticatedClient[src]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. Read more
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(). Read more
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. Read more
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. Read more