Bug 1052610 - Removing cipher suite profiling. r=ekr
authorMartin Thomson <martin.thomson@gmail.com>
Wed, 13 Aug 2014 14:08:00 -0500
changeset 199398 8ee163409ca1b297285e5dbe194bf80b73b699e9
parent 199397 bbc2ccf36d2e6635a60b3c5ae448221da134e187
child 199399 0a9a9fe9853873911bcaca45859132aabe98f060
push id47642
push useradam@nostrum.com
push dateWed, 13 Aug 2014 22:46:21 +0000
treeherdermozilla-inbound@8ee163409ca1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs1052610
milestone34.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 1052610 - Removing cipher suite profiling. r=ekr
media/mtransport/test/transport_unittests.cpp
media/mtransport/transportlayerdtls.cpp
--- a/media/mtransport/test/transport_unittests.cpp
+++ b/media/mtransport/test/transport_unittests.cpp
@@ -916,28 +916,30 @@ TEST_F(TransportTest, TestNoDtlsVerifica
   ConnectSocketExpectFail();
 }
 
 TEST_F(TransportTest, TestConnect) {
   SetDtlsPeer();
   ConnectSocket();
 
   // check that we got the right suite
-  ASSERT_EQ(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
+  // bug 1052610
+  //ASSERT_EQ(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
 
   // no SRTP on this one
   ASSERT_EQ(0, p1_->srtpCipher());
 }
 
 TEST_F(TransportTest, TestConnectSrtp) {
   SetupSrtp();
   SetDtlsPeer();
   ConnectSocket();
 
-  ASSERT_EQ(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
+  // bug 1052610
+  //ASSERT_EQ(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
 
   // SRTP is on
   ASSERT_EQ(SRTP_AES128_CM_HMAC_SHA1_80, p1_->srtpCipher());
 }
 
 
 TEST_F(TransportTest, TestConnectDestroyFlowsMainThread) {
   SetDtlsPeer();
@@ -1082,17 +1084,18 @@ static void ConfigureOneCipher(Transport
 
 TEST_F(TransportTest, TestCipherMismatch) {
   SetDtlsPeer();
   ConfigureOneCipher(p1_, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256);
   ConfigureOneCipher(p2_, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA);
   ConnectSocketExpectFail();
 }
 
-TEST_F(TransportTest, TestCipherMandatoryOnlyGcm) {
+// TODO(mt@mozilla.com) restore; bug 1052610
+TEST_F(TransportTest, DISABLED_TestCipherMandatoryOnlyGcm) {
   SetDtlsPeer();
   ConfigureOneCipher(p1_, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256);
   ConnectSocket();
   ASSERT_EQ(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
 }
 
 TEST_F(TransportTest, TestCipherMandatoryOnlyCbc) {
   SetDtlsPeer();
--- a/media/mtransport/transportlayerdtls.cpp
+++ b/media/mtransport/transportlayerdtls.cpp
@@ -496,17 +496,17 @@ bool TransportLayerDtls::Setup() {
       return false;
     }
   }
 
   // Require TLS 1.1 or 1.2. Perhaps some day in the future we will allow TLS
   // 1.0 for stream modes.
   SSLVersionRange version_range = {
     SSL_LIBRARY_VERSION_TLS_1_1,
-    SSL_LIBRARY_VERSION_TLS_1_2
+    SSL_LIBRARY_VERSION_TLS_1_1 // version intolerance; bug 1052610
   };
 
   rv = SSL_VersionRangeSet(ssl_fd, &version_range);
   if (rv != SECSuccess) {
     MOZ_MTLOG(ML_ERROR, "Can't disable SSLv3");
     return false;
   }
 
@@ -667,16 +667,18 @@ bool TransportLayerDtls::SetupCipherSuit
     rv = SSL_CipherPrefSet(ssl_fd, EnabledCiphers[i], PR_TRUE);
     if (rv != SECSuccess) {
       MOZ_MTLOG(ML_ERROR, LAYER_INFO <<
                 "Unable to enable suite: " << EnabledCiphers[i]);
       return false;
     }
   }
 
+// Don't remove suites; TODO(mt@mozilla.com) restore; bug 1052610
+#if 0
   for (size_t i = 0; i < PR_ARRAY_SIZE(DisabledCiphers); ++i) {
     MOZ_MTLOG(ML_INFO, LAYER_INFO << "Disabling: " << DisabledCiphers[i]);
 
     PRBool enabled = false;
     rv = SSL_CipherPrefGet(ssl_fd, DisabledCiphers[i], &enabled);
     if (rv != SECSuccess) {
       MOZ_MTLOG(ML_NOTICE, LAYER_INFO <<
                 "Unable to check if suite is enabled: " << DisabledCiphers[i]);
@@ -686,16 +688,17 @@ bool TransportLayerDtls::SetupCipherSuit
       rv = SSL_CipherPrefSet(ssl_fd, DisabledCiphers[i], PR_FALSE);
       if (rv != SECSuccess) {
         MOZ_MTLOG(ML_NOTICE, LAYER_INFO <<
                   "Unable to disable suite: " << DisabledCiphers[i]);
         return false;
       }
     }
   }
+#endif
   return true;
 }
 
 nsresult TransportLayerDtls::GetCipherSuite(uint16_t* cipherSuite) const {
   CheckThread();
   if (!cipherSuite) {
     MOZ_MTLOG(ML_ERROR, LAYER_INFO << "GetCipherSuite passed a nullptr");
     return NS_ERROR_NULL_POINTER;