Files
sousa-gecko/testing/web-platform/tests/webrtc/protocol/crypto-suite.https.html
T
Philipp Hancke c89e1d2ae7 Bug 2048039 [wpt PR 60663] - webrtc: remove incorrect SRTP cipher suite from WPT, a=testonly
Automatic update from web-platform-tests
webrtc: remove incorrect SRTP cipher suite from WPT

after downstream WebRTC was fixed.

Bug: webrtc:518266748
Change-Id: I185acead0076736e53332bc397b485f1aa1e2d1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7936889
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1647634}

--

wpt-commits: 4c86e8c668fa42886384b0b9d0b6cf978f5bb15d
wpt-pr: 60663
2026-06-19 20:56:24 +00:00

81 lines
2.7 KiB
HTML

<!doctype html>
<meta charset=utf-8>
<title>RTCPeerConnection.prototype.createOffer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../RTCPeerConnection-helper.js"></script>
<script>
'use strict';
// RFC 8827 section 6.5
//
// All Implementations MUST support DTLS 1.2 with the
// TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cipher suite and the P-256
// curve [FIPS186].
// ....... The DTLS-SRTP protection profile
// SRTP_AES128_CM_HMAC_SHA1_80 MUST be supported for SRTP.
// Implementations MUST favor cipher suites which support (Perfect
// Forward Secrecy) PFS over non-PFS cipher suites and SHOULD favor AEAD
// over non-AEAD cipher suites.
const acceptableTlsVersions = new Set([
'FEFD', // DTLS 1.2 - RFC 6437 section 4.1
'0304', // TLS 1.3 - RFC 8446 section 5.1
'FEFC', // DTLS 1.3 - RFC 9147 section 5.3
]);
const acceptableDtlsCiphersuites = new Set([
'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
'TLS_AES_128_GCM_SHA256',
]);
const acceptableSrtpCiphersuites = new Set([
'SRTP_AES128_CM_HMAC_SHA1_80',
'SRTP_AEAD_AES_128_GCM',
'SRTP_AEAD_AES_256_GCM',
]);
const acceptableValues = {
'tlsVersion': acceptableTlsVersions,
'dtlsCipher': acceptableDtlsCiphersuites,
'srtpCipher': acceptableSrtpCiphersuites,
};
function verifyStat(name, transportStats) {
assert_not_equals(typeof transportStats, 'undefined');
assert_true(name in transportStats, 'Value present:');
assert_true(acceptableValues[name].has(transportStats[name]));
}
for (const name of Object.keys(acceptableValues)) {
promise_test(async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
pc1.createDataChannel('foo');
exchangeIceCandidates(pc1, pc2);
await exchangeOfferAnswer(pc1, pc2);
await waitForState(pc1.sctp.transport, 'connected');
const statsReport = await pc1.getStats();
const transportStats = [...statsReport.values()].find(({type}) => type === 'transport');
verifyStat(name, transportStats);
}, name + ' is acceptable on data-only');
promise_test(async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
const transceiver = pc1.addTransceiver('video');
exchangeIceCandidates(pc1, pc2);
await exchangeOfferAnswer(pc1, pc2);
await waitForState(transceiver.sender.transport, 'connected');
const statsReport = await pc1.getStats();
const transportStats = [...statsReport.values()].find(({type}) => type === 'transport');
verifyStat(name, transportStats);
}, name + ' is acceptable on video-only');
}
</script>