pub struct X509Data {
    pub key_size: u32,
    pub common_name: String,
    pub organization: String,
    pub organizational_unit: String,
    pub country: String,
    pub state: String,
    pub alt_host_names: Vec<String, Global>,
    pub certificate_duration_days: u32,
}
Expand description

Used to create an X509 cert (and private key)

Fields

key_size: u32common_name: Stringorganization: Stringorganizational_unit: Stringcountry: Stringstate: Stringalt_host_names: Vec<String, Global>

A list of alternate host names as text. The first entry is expected to be the application uri. The remainder are treated as IP addresses or DNS names depending on whether they parse as IPv4, IPv6 or neither. IP addresses are expected to be in their canonical form and you will run into trouble especially in IPv6 if they are not because string comparison may be used during validation. e.g. IPv6 canonical format shortens addresses by stripping leading zeros, sequences of zeros and using lowercase hex.

certificate_duration_days: u32

The number of days the certificate is valid for, i.e. it will be valid from now until now + duration_days.

Implementations

Gets a list of possible dns hostnames for this device

Creates a list of uri + DNS hostnames using the supplied arguments

Creates a sample certificate for testing, sample purposes only

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.