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: u32
common_name: String
organization: String
organizational_unit: String
country: String
state: String
alt_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
sourceimpl X509Data
impl X509Data
sourcepub fn computer_hostnames() -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn computer_hostnames() -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Gets a list of possible dns hostnames for this device
sourcepub fn alt_host_names(
application_uri: &str,
addresses: Option<Vec<String, Global>>,
add_localhost: bool,
add_computer_name: bool
) -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn alt_host_names(
application_uri: &str,
addresses: Option<Vec<String, Global>>,
add_localhost: bool,
add_computer_name: bool
) -> Vec<String, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Creates a list of uri + DNS hostnames using the supplied arguments
sourcepub fn sample_cert() -> X509Data
pub fn sample_cert() -> X509Data
Creates a sample certificate for testing, sample purposes only
Trait Implementations
sourceimpl From<ApplicationDescription> for X509Data
impl From<ApplicationDescription> for X509Data
sourcefn from(v: ApplicationDescription) -> X509Data
fn from(v: ApplicationDescription) -> X509Data
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for X509Data
impl Send for X509Data
impl Sync for X509Data
impl Unpin for X509Data
impl UnwindSafe for X509Data
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more