Struct webrtc_dtls::crypto::Certificate
source · pub struct Certificate {
pub certificate: Vec<Certificate>,
pub private_key: CryptoPrivateKey,
}
Expand description
A X.509 certificate(s) used to authenticate a DTLS connection.
Fields§
§certificate: Vec<Certificate>
DER-encoded certificates.
private_key: CryptoPrivateKey
Private key.
Implementations§
source§impl Certificate
impl Certificate
sourcepub fn generate_self_signed(
subject_alt_names: impl Into<Vec<String>>
) -> Result<Self, Error>
pub fn generate_self_signed( subject_alt_names: impl Into<Vec<String>> ) -> Result<Self, Error>
Generate a self-signed certificate.
sourcepub fn generate_self_signed_with_alg(
subject_alt_names: impl Into<Vec<String>>,
alg: &'static SignatureAlgorithm
) -> Result<Self, Error>
pub fn generate_self_signed_with_alg( subject_alt_names: impl Into<Vec<String>>, alg: &'static SignatureAlgorithm ) -> Result<Self, Error>
Generate a self-signed certificate with the given algorithm.
Trait Implementations§
source§impl Clone for Certificate
impl Clone for Certificate
source§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
Returns a copy 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 Certificate
impl Debug for Certificate
source§impl PartialEq<Certificate> for Certificate
impl PartialEq<Certificate> for Certificate
source§fn eq(&self, other: &Certificate) -> bool
fn eq(&self, other: &Certificate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.