pub enum CertMatcher {
ExactCn(String),
CnGlob(String),
SanDnsGlob(String),
PublicKeyHashHex(String),
}Expand description
How to match a certificate to a role.
Patterns are evaluated in order; first match wins.
Variants§
ExactCn(String)
Exact common-name match.
CnGlob(String)
Glob pattern over common-name (* matches any sequence).
SanDnsGlob(String)
Glob pattern over DNS subject alternative names.
PublicKeyHashHex(String)
Exact SHA-256 of the certificate’s subject public key (hex-encoded).
Implementations§
Source§impl CertMatcher
impl CertMatcher
Sourcepub fn matches(&self, cert: &PeerCertInfo) -> bool
pub fn matches(&self, cert: &PeerCertInfo) -> bool
Test whether this matcher matches a peer with the given CN / SANs.
Trait Implementations§
Source§impl Clone for CertMatcher
impl Clone for CertMatcher
Source§fn clone(&self) -> CertMatcher
fn clone(&self) -> CertMatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CertMatcher
impl RefUnwindSafe for CertMatcher
impl Send for CertMatcher
impl Sync for CertMatcher
impl Unpin for CertMatcher
impl UnsafeUnpin for CertMatcher
impl UnwindSafe for CertMatcher
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