Class DtlsCertificate
A self-signed ECDSA P-256 certificate for DTLS-SRTP; WebRTC trusts it by the fingerprint that the signalled SDP carries, not by any authority.
Inherited Members
Namespace: Uniform.Matrix.WebRtc.Dtls
Assembly: Uniform.Matrix.WebRtc.dll
Syntax
public sealed class DtlsCertificate
Constructors
| Edit this page View SourceDtlsCertificate()
Generate a key and a certificate valid for thirty days.
Declaration
public DtlsCertificate()
Properties
| Edit this page View SourceDer
The certificate, DER encoded.
Declaration
public byte[] Der { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
Fingerprint
The fingerprint for the SDP's a=fingerprint, e.g. sha-256 AB:CD:….
Declaration
public string Fingerprint { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceFingerprintOf(byte[])
Return the SHA-256 fingerprint of a DER certificate as SDP writes it.
Declaration
public static string FingerprintOf(byte[] der)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | der |
Returns
| Type | Description |
|---|---|
| string |
Matches(byte[], string)
Return whether a DER certificate matches an SDP fingerprint; only SHA-256 is known, as browsers use.
Declaration
public static bool Matches(byte[] der, string fingerprint)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | der | |
| string | fingerprint |
Returns
| Type | Description |
|---|---|
| bool |