pub enum ChainNegative {
HostnameMismatch {
wrong_hostname: String,
},
UnknownCa,
ExpiredLeaf,
NotYetValidLeaf,
ExpiredIntermediate,
NotYetValidIntermediate,
IntermediateNotCa,
IntermediateWrongKeyUsage,
RevokedLeaf,
}Expand description
Types of invalid certificate chains for negative testing.
Variants§
HostnameMismatch
Leaf cert has a SAN that doesn’t match the expected hostname.
UnknownCa
Chain is anchored to a different (unknown) root certificate identity. This variant intentionally reuses the same underlying RSA key material and changes certificate-level identity fields for the root certificate.
ExpiredLeaf
Leaf certificate is expired.
NotYetValidLeaf
Leaf certificate is not yet valid.
ExpiredIntermediate
Intermediate certificate is expired.
NotYetValidIntermediate
Intermediate certificate is not yet valid.
IntermediateNotCa
Intermediate certificate no longer claims CA status.
IntermediateWrongKeyUsage
Intermediate certificate claims CA status but lacks CA signing usage.
RevokedLeaf
Leaf certificate is listed as revoked in a CRL signed by the intermediate CA.
Implementations§
Source§impl ChainNegative
impl ChainNegative
Sourcepub fn variant_name(&self) -> String
pub fn variant_name(&self) -> String
Variant name for cache keys.
Sourcepub fn apply_to_spec(&self, base_spec: &ChainSpec) -> ChainSpec
pub fn apply_to_spec(&self, base_spec: &ChainSpec) -> ChainSpec
Apply this negative variant to a chain spec.
Trait Implementations§
Source§impl Clone for ChainNegative
impl Clone for ChainNegative
Source§fn clone(&self) -> ChainNegative
fn clone(&self) -> ChainNegative
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 moreSource§impl Debug for ChainNegative
impl Debug for ChainNegative
Source§impl Hash for ChainNegative
impl Hash for ChainNegative
Source§impl PartialEq for ChainNegative
impl PartialEq for ChainNegative
impl Eq for ChainNegative
impl StructuralPartialEq for ChainNegative
Auto Trait Implementations§
impl Freeze for ChainNegative
impl RefUnwindSafe for ChainNegative
impl Send for ChainNegative
impl Sync for ChainNegative
impl Unpin for ChainNegative
impl UnsafeUnpin for ChainNegative
impl UnwindSafe for ChainNegative
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