diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 21:49:04 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 21:49:04 +0200 |
commit | 39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch) | |
tree | 52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /netwerk/base | |
parent | a1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff) | |
parent | c2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff) | |
download | UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip |
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'netwerk/base')
-rw-r--r-- | netwerk/base/Tickler.h | 4 | ||||
-rw-r--r-- | netwerk/base/nsIOService.cpp | 8 | ||||
-rw-r--r-- | netwerk/base/nsNetUtil.cpp | 2 | ||||
-rw-r--r-- | netwerk/base/nsSocketTransport2.cpp | 7 | ||||
-rw-r--r-- | netwerk/base/nsSocketTransportService2.cpp | 15 | ||||
-rw-r--r-- | netwerk/base/security-prefs.js | 21 |
6 files changed, 7 insertions, 50 deletions
diff --git a/netwerk/base/Tickler.h b/netwerk/base/Tickler.h index 63353a924..e38f0d99c 100644 --- a/netwerk/base/Tickler.h +++ b/netwerk/base/Tickler.h @@ -27,10 +27,6 @@ // The tickler only applies to wifi on mobile right now. Hopefully it // can also be restricted to particular handset models in the future. -#if defined(ANDROID) -#define MOZ_USE_WIFI_TICKLER -#endif - #include "mozilla/Attributes.h" #include "nsISupports.h" #include <stdint.h> diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index bd9a4a96f..314f2aeff 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -79,6 +79,7 @@ namespace net { nsIOService* gIOService = nullptr; static bool gHasWarnedUploadChannel2; +static bool gCaptivePortalEnabled = false; static LazyLogModule gIOServiceLog("nsIOService"); #undef LOG #define LOG(args) MOZ_LOG(gIOServiceLog, LogLevel::Debug, args) @@ -1142,7 +1143,7 @@ nsIOService::SetConnectivityInternal(bool aConnectivity) mConnectivity = aConnectivity; if (mCaptivePortalService) { - if (aConnectivity && !xpc::AreNonLocalConnectionsDisabled()) { + if (aConnectivity && !xpc::AreNonLocalConnectionsDisabled() && gCaptivePortalEnabled) { // This will also trigger a captive portal check for the new network static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Start(); } else { @@ -1285,10 +1286,9 @@ nsIOService::PrefsChanged(nsIPrefBranch *prefs, const char *pref) } if (!pref || strcmp(pref, NETWORK_CAPTIVE_PORTAL_PREF) == 0) { - bool captivePortalEnabled; - nsresult rv = prefs->GetBoolPref(NETWORK_CAPTIVE_PORTAL_PREF, &captivePortalEnabled); + nsresult rv = prefs->GetBoolPref(NETWORK_CAPTIVE_PORTAL_PREF, &gCaptivePortalEnabled); if (NS_SUCCEEDED(rv) && mCaptivePortalService) { - if (captivePortalEnabled && !xpc::AreNonLocalConnectionsDisabled()) { + if (gCaptivePortalEnabled && !xpc::AreNonLocalConnectionsDisabled()) { static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Start(); } else { static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Stop(); diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp index 2974e26b0..ce0e2d4ef 100644 --- a/netwerk/base/nsNetUtil.cpp +++ b/netwerk/base/nsNetUtil.cpp @@ -1814,9 +1814,7 @@ NS_RelaxStrictFileOriginPolicy(nsIURI *aTargetURI, NS_FAILED(sourceFileURL->GetFile(getter_AddRefs(sourceFile))) || !targetFile || !sourceFile || NS_FAILED(targetFile->Normalize()) || -#ifndef MOZ_WIDGET_ANDROID NS_FAILED(sourceFile->Normalize()) || -#endif (!aAllowDirectoryTarget && (NS_FAILED(targetFile->IsDirectory(&targetIsDir)) || targetIsDir))) { return false; diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index 0c8434813..76a357aa3 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -3048,9 +3048,8 @@ nsSocketTransport::PRFileDescAutoLock::SetKeepaliveVals(bool aEnabled, #elif defined(XP_UNIX) // Not all *nix OSes support the following setsockopt() options - // ... but we assume they are supported in the Android kernel; // build errors will tell us if they are not. -#if defined(ANDROID) || defined(TCP_KEEPIDLE) +#ifdef TCP_KEEPIDLE // Idle time until first keepalive probe; interval between ack'd probes; seconds. int err = setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &aIdleTime, sizeof(aIdleTime)); @@ -3061,7 +3060,7 @@ nsSocketTransport::PRFileDescAutoLock::SetKeepaliveVals(bool aEnabled, } #endif -#if defined(ANDROID) || defined(TCP_KEEPINTVL) +#ifdef TCP_KEEPINTVL // Interval between unack'd keepalive probes; seconds. err = setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &aRetryInterval, sizeof(aRetryInterval)); @@ -3072,7 +3071,7 @@ nsSocketTransport::PRFileDescAutoLock::SetKeepaliveVals(bool aEnabled, } #endif -#if defined(ANDROID) || defined(TCP_KEEPCNT) +#ifdef TCP_KEEPCNT // Number of unack'd keepalive probes before connection times out. err = setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &aProbeCount, sizeof(aProbeCount)); diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketTransportService2.cpp index af5742564..4a8d80eed 100644 --- a/netwerk/base/nsSocketTransportService2.cpp +++ b/netwerk/base/nsSocketTransportService2.cpp @@ -25,7 +25,6 @@ #include "nsThreadUtils.h" #include "nsIFile.h" #include "nsIWidget.h" -#include "mozilla/dom/FlyWebService.h" namespace mozilla { namespace net { @@ -681,20 +680,6 @@ nsSocketTransportService::CreateRoutedTransport(const char **types, nsIProxyInfo *proxyInfo, nsISocketTransport **result) { - // Check FlyWeb table for host mappings. If one exists, then use that. - RefPtr<mozilla::dom::FlyWebService> fws = - mozilla::dom::FlyWebService::GetExisting(); - if (fws) { - nsresult rv = fws->CreateTransportForHost(types, typeCount, host, port, - hostRoute, portRoute, - proxyInfo, result); - NS_ENSURE_SUCCESS(rv, rv); - - if (*result) { - return NS_OK; - } - } - NS_ENSURE_TRUE(mInitialized, NS_ERROR_NOT_INITIALIZED); NS_ENSURE_TRUE(port >= 0 && port <= 0xFFFF, NS_ERROR_ILLEGAL_VALUE); diff --git a/netwerk/base/security-prefs.js b/netwerk/base/security-prefs.js index 702315d43..973c73123 100644 --- a/netwerk/base/security-prefs.js +++ b/netwerk/base/security-prefs.js @@ -120,27 +120,6 @@ pref("security.webauth.u2f_enable_usbtoken", false); // OCSP must-staple pref("security.ssl.enable_ocsp_must_staple", true); -// HPKP settings - -// Enable pinning checks by default. -pref("security.cert_pinning.enforcement_level", 2); -// Do not process hpkp headers rooted by not built in roots by default. -// This is to prevent accidental pinning from MITM devices and is used -// for tests. -pref("security.cert_pinning.process_headers_from_non_builtin_roots", false); -// Impose a maximum age on HPKP headers, to avoid sites getting permanently -// blacking themselves out by setting a bad pin. (60 days by default) -// https://tools.ietf.org/html/rfc7469#section-4.1 -pref("security.cert_pinning.max_max_age_seconds", 5184000); -// Controls whether or not HPKP (the HTTP Public Key Pinning header) is enabled. -// If true, the header is processed and collected HPKP information is consulted -// when looking for pinning information. -// If false, the header is not processed and collected HPKP information is not -// consulted when looking for pinning information. Preloaded pins are not -// affected by this preference. -// Default: false -pref("security.cert_pinning.hpkp.enabled", false); - // If a request is mixed-content, send an HSTS priming request to attempt to // see if it is available over HTTPS. pref("security.mixed_content.send_hsts_priming", true); |