Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

Profile

Trait Profile 

Source
pub trait Profile:
    PartialEq
    + Debug
    + Eq
    + Ord
    + Clone
    + Copy
    + Default
    + 'static {
    // Provided methods
    fn check_serial_number(serial: &SerialNumber<Self>) -> Result<()> { ... }
    fn time_encoding(time: Time) -> Result<Time> { ... }
}
Expand description

Profile allows the consumer of this crate to customize the behavior when parsing certificates. By default, parsing will be made in a rfc5280-compliant manner.

Provided Methods§

Source

fn check_serial_number(serial: &SerialNumber<Self>) -> Result<()>

Checks to run when parsing serial numbers

Source

fn time_encoding(time: Time) -> Result<Time>

Adjustments to the time to run while serializing validity. See RFC 5280 Section 4.1.2.5:

CAs conforming to this profile MUST always encode certificate
validity dates through the year 2049 as UTCTime; certificate validity
dates in 2050 or later MUST be encoded as GeneralizedTime.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Profile for Raw

Available on crate feature hazmat only.
Source§

impl Profile for Rfc5280