RTCPeerConnection.generateCertificate({
name: "RSASSA-PKCS1-v1_5",
hash: "SHA-256",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
}).then((cert) => {
const pc = new RTCPeerConnection({ certificates: [cert] });
console.log(cert.expires); // 2592000000 (30 days, the default)
});RTCCertificate: expires property / notebook
RTCCertificate: expires property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.