Struct sfu::RTCCertificate
source · pub struct RTCCertificate {
pub dtls_certificate: Certificate,
pub expires: SystemTime,
}
Expand description
RTCCertificate represents a X.509 certificate used to authenticate WebRTC communications.
Fields§
§dtls_certificate: Certificate
DTLS certificate.
expires: SystemTime
Timestamp after which this certificate is no longer valid.
Implementations§
source§impl 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§
source§impl Clone for RTCCertificate
impl Clone for RTCCertificate
source§fn clone(&self) -> RTCCertificate
fn clone(&self) -> RTCCertificate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more