pub struct ClientVerifierBuilder { /* private fields */ }Expand description
A client-certificate verifier builder preserving hints, authentication and revocation modes.
Implementations§
Source§impl ClientVerifierBuilder
impl ClientVerifierBuilder
Sourcepub fn with_crls(
self,
crls: impl IntoIterator<Item = CertificateRevocationListDer<'static>>,
) -> Self
pub fn with_crls( self, crls: impl IntoIterator<Item = CertificateRevocationListDer<'static>>, ) -> Self
Appends certificate revocation lists.
Sourcepub fn only_check_end_entity_revocation(self) -> Self
pub fn only_check_end_entity_revocation(self) -> Self
Checks only the leaf’s revocation status.
Sourcepub fn allow_unknown_revocation_status(self) -> Self
pub fn allow_unknown_revocation_status(self) -> Self
Allows unknown revocation status.
Sourcepub fn enforce_revocation_expiration(self) -> Self
pub fn enforce_revocation_expiration(self) -> Self
Enforces CRL expiration.
Sourcepub fn clear_root_hint_subjects(self) -> Self
pub fn clear_root_hint_subjects(self) -> Self
Clears the advertised CA subjects.
Sourcepub fn add_root_hint_subjects(
self,
hints: impl IntoIterator<Item = DistinguishedName>,
) -> Self
pub fn add_root_hint_subjects( self, hints: impl IntoIterator<Item = DistinguishedName>, ) -> Self
Appends advertised CA subjects.
Sourcepub fn allow_unauthenticated(self) -> Self
pub fn allow_unauthenticated(self) -> Self
Offers client authentication but permits clients without a certificate.
Sourcepub fn with_peer_identity(self, identity: Arc<dyn PeerIdentity>) -> Self
pub fn with_peer_identity(self, identity: Arc<dyn PeerIdentity>) -> Self
Adds identity, run after the path, EKU, revocation and the policy’s peer-certificate
rule pass. A second call replaces the first.
rustls verifies only a certificate the client presents: with
allow_unauthenticated, a client that presents none is
admitted without reaching identity.
Sourcepub fn build(self) -> Result<Arc<ClientVerifierHandle>, VerifierBuilderError>
pub fn build(self) -> Result<Arc<ClientVerifierHandle>, VerifierBuilderError>
Builds an owned verifier, refusing empty roots or invalid CRLs.
Trait Implementations§
Source§impl Clone for ClientVerifierBuilder
impl Clone for ClientVerifierBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for ClientVerifierBuilder
impl !UnwindSafe for ClientVerifierBuilder
impl Forget for ClientVerifierBuilder
impl Freeze for ClientVerifierBuilder
impl Move for ClientVerifierBuilder
impl Send for ClientVerifierBuilder
impl Sync for ClientVerifierBuilder
impl Unpin for ClientVerifierBuilder
impl UnsafeUnpin for ClientVerifierBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more