servo/tests/wpt/web-platform-tests/webrtc/resources/RTCCertificate-postMessage-iframe.html

9 lines
285 B
HTML

<!doctype html>
<script>
window.onmessage = async (event) => {
let certificate = event.data;
if (!certificate)
certificate = await RTCPeerConnection.generateCertificate({ name: 'ECDSA', namedCurve: 'P-256'});
event.source.postMessage(certificate, "*");
}
</script>