Backed out changeset 4836c05dd2ee (bug 1583610) for causing toolchanins bustages CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Mon, 30 Sep 2019 22:01:19 +0300
changeset 495719 89eacd68ee62952b3db7bca4617c63c489a9c09b
parent 495718 f45cc699e7a13d15e049feb1cfb36f9d8131df9f
child 495720 6822e913651aa45100b4e91dce1dc44e49439152
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1583610
milestone71.0a1
backs out4836c05dd2eee11bf9d836fb0505e77450b0651b
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
Backed out changeset 4836c05dd2ee (bug 1583610) for causing toolchanins bustages CLOSED TREE
security/manager/ssl/nsNSSIOLayer.cpp
--- a/security/manager/ssl/nsNSSIOLayer.cpp
+++ b/security/manager/ssl/nsNSSIOLayer.cpp
@@ -2,17 +2,16 @@
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsNSSIOLayer.h"
 
 #include <algorithm>
-#include <vector>
 
 #include "NSSCertDBTrustDomain.h"
 #include "NSSErrorsService.h"
 #include "PSMRunnable.h"
 #include "SSLServerCertVerification.h"
 #include "ScopedNSSTypes.h"
 #include "SharedSSLState.h"
 #include "keyhi.h"
@@ -2141,45 +2140,16 @@ static nsresult nsSSLIOLayerSetOptions(P
       SSL_OptionSet(fd, SSL_ENABLE_SIGNED_CERT_TIMESTAMPS, sctsEnabled)) {
     return NS_ERROR_FAILURE;
   }
 
   if (SECSuccess != SSL_OptionSet(fd, SSL_HANDSHAKE_AS_CLIENT, true)) {
     return NS_ERROR_FAILURE;
   }
 
-#ifdef __arm__
-  unsigned int enabledCiphers = 0;
-  std::vector<uint16_t> ciphers(SSL_GetNumImplementedCiphers());
-
-  // Returns only the enabled (reflecting prefs) ciphers, ordered
-  // by their occurence in
-  // https://hg.mozilla.org/projects/nss/file/a75ea4cdacd95282c6c245ebb849c25e84ccd908/lib/ssl/ssl3con.c#l87
-  if (SSL_CipherSuiteOrderGet(fd, ciphers.data(), &enabledCiphers) !=
-      SECSuccess) {
-    return NS_ERROR_FAILURE;
-  }
-
-  // On ARM, prefer (TLS_CHACHA20_POLY1305_SHA256) over AES. However,
-  // it may be disabled. If enabled, it will either be element [0] or [1]*.
-  // If [0], we're done. If [1], swap it with [0] (TLS_AES_128_GCM_SHA256).
-  // * (assuming the compile-time order remains unchanged)
-  if (enabledCiphers > 1) {
-    if (ciphers[0] != TLS_CHACHA20_POLY1305_SHA256 &&
-        ciphers[1] == TLS_CHACHA20_POLY1305_SHA256) {
-      std::swap(ciphers[0], ciphers[1]);
-
-      if (SSL_CipherSuiteOrderSet(fd, ciphers.data(), enabledCiphers) !=
-          SECSuccess) {
-        return NS_ERROR_FAILURE;
-      }
-    }
-  }
-#endif
-
   // Set the Peer ID so that SSL proxy connections work properly and to
   // separate anonymous and/or private browsing connections.
   nsAutoCString peerId;
   infoObject->GetPeerId(peerId);
   if (SECSuccess != SSL_SetSockPeerID(fd, peerId.get())) {
     return NS_ERROR_FAILURE;
   }