Skip to main content

Crate uselesskey_core_x509_negative

Crate uselesskey_core_x509_negative 

Source
Expand description

X.509 negative-fixture policy helpers.

§Examples

Apply a negative policy to a base X.509 spec:

use uselesskey_core_x509_negative::X509Negative;
use uselesskey_core_x509_spec::{NotBeforeOffset, X509Spec};

let base = X509Spec::self_signed("test.example.com");
let expired = X509Negative::Expired.apply_to_spec(&base);
assert_eq!(expired.not_before_offset, NotBeforeOffset::DaysAgo(395));

Enums§

ChainNegative
Types of invalid certificate chains for negative testing.
X509Negative
Types of invalid X.509 certificates for negative testing.