mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 11:13:29 +00:00
c57d400961
HSTS priming changes the order of mixed-content blocking and HSTS upgrades, and adds a priming request to check if a mixed-content load is accesible over HTTPS and the server supports upgrading via the Strict-Transport-Security header. Every call site that uses AsyncOpen2 passes through the mixed-content blocker, and has a LoadInfo. If the mixed-content blocker marks the load as needing HSTS priming, nsHttpChannel will build and send an HSTS priming request on the same URI with the scheme upgraded to HTTPS. If the server allows the upgrade, then channel performs an internal redirect to the HTTPS URI, otherwise use the result of mixed-content blocker to allow or block the load. nsISiteSecurityService adds an optional boolean out parameter to determine if the HSTS state is already cached for negative assertions. If the host has been probed within the previous 24 hours, no HSTS priming check will be sent. MozReview-Commit-ID: ES1JruCtDdX --HG-- extra : rebase_source : 2ac6c93c49f2862fc0b9e595eb0598cd1ea4bedf
128 lines
3.1 KiB
Python
128 lines
3.1 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# 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/.
|
|
|
|
XPIDL_SOURCES += [
|
|
'nsIHstsPrimingCallback.idl',
|
|
'nsIHttpActivityObserver.idl',
|
|
'nsIHttpAuthenticableChannel.idl',
|
|
'nsIHttpAuthenticator.idl',
|
|
'nsIHttpAuthManager.idl',
|
|
'nsIHttpChannel.idl',
|
|
'nsIHttpChannelAuthProvider.idl',
|
|
'nsIHttpChannelChild.idl',
|
|
'nsIHttpChannelInternal.idl',
|
|
'nsIHttpEventSink.idl',
|
|
'nsIHttpHeaderVisitor.idl',
|
|
'nsIHttpProtocolHandler.idl',
|
|
'nsIWellKnownOpportunisticUtils.idl',
|
|
]
|
|
|
|
XPIDL_MODULE = 'necko_http'
|
|
|
|
EXPORTS += [
|
|
'nsCORSListenerProxy.h',
|
|
'nsHttp.h',
|
|
'nsHttpAtomList.h',
|
|
'nsHttpHeaderArray.h',
|
|
'nsHttpRequestHead.h',
|
|
'nsHttpResponseHead.h',
|
|
]
|
|
|
|
EXPORTS.mozilla.net += [
|
|
'AltDataOutputStreamChild.h',
|
|
'AltDataOutputStreamParent.h',
|
|
'HttpBaseChannel.h',
|
|
'HttpChannelChild.h',
|
|
'HttpChannelParent.h',
|
|
'HttpInfo.h',
|
|
'NullHttpChannel.h',
|
|
'PackagedAppService.h',
|
|
'PackagedAppVerifier.h',
|
|
'PHttpChannelParams.h',
|
|
'PSpdyPush.h',
|
|
'TimingStruct.h',
|
|
]
|
|
|
|
# ASpdySession.cpp and nsHttpAuthCache cannot be built in unified mode because
|
|
# they use plarena.h.
|
|
SOURCES += [
|
|
'AlternateServices.cpp',
|
|
'ASpdySession.cpp',
|
|
'nsHttpAuthCache.cpp',
|
|
'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
'AltDataOutputStreamChild.cpp',
|
|
'AltDataOutputStreamParent.cpp',
|
|
'CacheControlParser.cpp',
|
|
'ConnectionDiagnostics.cpp',
|
|
'HSTSPrimerListener.cpp',
|
|
'Http2Compression.cpp',
|
|
'Http2Push.cpp',
|
|
'Http2Session.cpp',
|
|
'Http2Stream.cpp',
|
|
'HttpBaseChannel.cpp',
|
|
'HttpChannelChild.cpp',
|
|
'HttpChannelParent.cpp',
|
|
'HttpChannelParentListener.cpp',
|
|
'HttpInfo.cpp',
|
|
'InterceptedChannel.cpp',
|
|
'nsCORSListenerProxy.cpp',
|
|
'nsHttp.cpp',
|
|
'nsHttpActivityDistributor.cpp',
|
|
'nsHttpAuthManager.cpp',
|
|
'nsHttpBasicAuth.cpp',
|
|
'nsHttpChannel.cpp',
|
|
'nsHttpChunkedDecoder.cpp',
|
|
'nsHttpConnection.cpp',
|
|
'nsHttpConnectionInfo.cpp',
|
|
'nsHttpConnectionMgr.cpp',
|
|
'nsHttpDigestAuth.cpp',
|
|
'nsHttpHeaderArray.cpp',
|
|
'nsHttpNTLMAuth.cpp',
|
|
'nsHttpPipeline.cpp',
|
|
'nsHttpRequestHead.cpp',
|
|
'nsHttpResponseHead.cpp',
|
|
'nsHttpTransaction.cpp',
|
|
'NullHttpChannel.cpp',
|
|
'NullHttpTransaction.cpp',
|
|
'PackagedAppService.cpp',
|
|
'PackagedAppVerifier.cpp',
|
|
'TunnelUtils.cpp',
|
|
]
|
|
|
|
# These files cannot be built in unified mode because of OS X headers.
|
|
SOURCES += [
|
|
'nsHttpHandler.cpp',
|
|
]
|
|
|
|
IPDL_SOURCES += [
|
|
'PAltDataOutputStream.ipdl',
|
|
'PHttpChannel.ipdl',
|
|
]
|
|
|
|
EXTRA_JS_MODULES += [
|
|
'UserAgentOverrides.jsm',
|
|
'UserAgentUpdates.jsm',
|
|
]
|
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
FINAL_LIBRARY = 'xul'
|
|
|
|
LOCAL_INCLUDES += [
|
|
'/dom/base',
|
|
'/netwerk/base',
|
|
]
|
|
|
|
EXTRA_COMPONENTS += [
|
|
'PackagedAppUtils.js',
|
|
'PackagedAppUtils.manifest',
|
|
'WellKnownOpportunisticUtils.js',
|
|
'WellKnownOpportunisticUtils.manifest',
|
|
]
|