Struct webrtc::peer_connection::certificate::RTCCertificate
source · pub struct RTCCertificate { /* private fields */ }
Expand description
Certificate represents a X.509 certificate used to authenticate WebRTC communications.
Implementations
sourceimpl RTCCertificate
impl RTCCertificate
sourcepub fn from_params(params: CertificateParams) -> Result<Self>
pub fn from_params(params: CertificateParams) -> Result<Self>
Generates a new certificate from the given parameters.
sourcepub fn from_key_pair(key_pair: KeyPair) -> Result<Self>
pub fn from_key_pair(key_pair: KeyPair) -> Result<Self>
Generates a new certificate with default CertificateParams
using the given keypair.
sourcepub fn from_existing(dtls_certificate: Certificate, expires: SystemTime) -> Self
pub fn from_existing(dtls_certificate: Certificate, expires: SystemTime) -> Self
Builds a RTCCertificate
using the existing DTLS certificate.
Use this method when you have a persistent certificate (i.e. you don’t want to generate a new one for each DTLS connection).
NOTE: ID used for statistics will be different as it’s neither derived from the given
certificate nor persisted along it when using [serialize_pem
].
sourcepub fn get_fingerprints(&self) -> Vec<RTCDtlsFingerprint> ⓘ
pub fn get_fingerprints(&self) -> Vec<RTCDtlsFingerprint> ⓘ
get_fingerprints returns a SHA-256 fingerprint of this certificate.
TODO: return a fingerprint computed with the digest algorithm used in the certificate signature.
Trait Implementations
sourceimpl Clone for RTCCertificate
impl Clone for RTCCertificate
sourcefn clone(&self) -> RTCCertificate
fn clone(&self) -> RTCCertificate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RTCCertificate
impl Debug for RTCCertificate
sourceimpl PartialEq<RTCCertificate> for RTCCertificate
impl PartialEq<RTCCertificate> for RTCCertificate
Auto Trait Implementations
impl RefUnwindSafe for RTCCertificate
impl Send for RTCCertificate
impl Sync for RTCCertificate
impl Unpin for RTCCertificate
impl UnwindSafe for RTCCertificate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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