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 for Certificate
impl PartialEq 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 ==
.impl StructuralPartialEq for Certificate
Auto Trait Implementations§
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more