Bug 1304919 - Update TLS server tests to expect TLS 1.3 cipher suite, r=ekr
☠☠ backed out by ddd64e2cf55f ☠ ☠
authorMartin Thomson <martin.thomson@gmail.com>
Fri, 23 Sep 2016 13:17:12 +1000
changeset 315226 bb62ee48735e56b8792ba8256edeed5971f93a34
parent 315225 b54d608edfa874dfd3d8305e771490a4b25cf641
child 315227 f1aace586e14a276cc43dd00111d5c9d04580ea0
push id32563
push userihsiao@mozilla.com
push dateMon, 26 Sep 2016 11:18:33 +0000
treeherderautoland@eb840c87b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs1304919
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1304919 - Update TLS server tests to expect TLS 1.3 cipher suite, r=ekr MozReview-Commit-ID: Bz5v08xPNA6
netwerk/test/unit/test_tls_server.js
--- a/netwerk/test/unit/test_tls_server.js
+++ b/netwerk/test/unit/test_tls_server.js
@@ -65,17 +65,23 @@ function startServer(cert, expectingPeer
         ok(!!status.peerCert, "Has peer cert");
         ok(status.peerCert.equals(cert), "Peer cert matches expected cert");
       } else {
         ok(!status.peerCert, "No peer cert (as expected)");
       }
 
       equal(status.tlsVersionUsed, expectedVersion,
             "Using " + expectedVersionStr);
-      equal(status.cipherName, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+      let expectedCipher;
+      if (expectedVersion >= 772) {
+        expectedCipher = "TLS_AES_128_GCM_SHA256";
+      } else {
+        expectedCipher = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
+      }
+      equal(status.cipherName, expectedCipher,
             "Using expected cipher");
       equal(status.keyLength, 128, "Using 128-bit key");
       equal(status.macLength, 128, "Using 128-bit MAC");
 
       input.asyncWait({
         onInputStreamReady: function(input) {
           NetUtil.asyncCopy(input, output);
         }