Issue #1498 - Part 4: Remove clearPreloads.

Also tag #1280
This commit is contained in:
wolfbeast
2020-03-27 15:13:00 +01:00
committed by Roy Tam
parent bcfc5b3a88
commit 6fe7731e5e
4 changed files with 0 additions and 21 deletions
@@ -151,11 +151,6 @@ interface nsISiteSecurityService : nsISupports
*/
void clearAll();
/**
* Removes all preloaded security state.
*/
void clearPreloads();
/**
* Returns an array of sha256-hashed key pins for the given domain, if any.
* If these pins also apply to subdomains of the given domain,
@@ -1101,17 +1101,6 @@ nsSiteSecurityService::ClearAll()
return mSiteStateStorage->Clear();
}
NS_IMETHODIMP
nsSiteSecurityService::ClearPreloads()
{
// Child processes are not allowed direct access to this.
if (!XRE_IsParentProcess()) {
MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::ClearPreloads");
}
return mPreloadStateStorage->Clear();
}
bool entryStateNotOK(SiteHPKPState& state, mozilla::pkix::Time& aEvalTime) {
return state.mState != SecurityPropertySet || state.IsExpired(aEvalTime) ||
state.mSHA256keys.Length() < 1;
@@ -239,9 +239,5 @@ function checkPreloadClear() {
gSSService.clearAll();
checkFail(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
// Check that the preloaded pins are cleared when we clear preloads
gSSService.clearPreloads();
checkOK(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
do_test_finished();
}
-1
View File
@@ -134,7 +134,6 @@ cert.InsecureSweepingOverride = function() {
// clear collected HSTS and HPKP state
// through the site security service
sss.clearAll();
sss.clearPreloads();
},
};
};