mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952863, Part 3: Remove more dead code, r=briansmith
--HG-- extra : rebase_source : 2f1793584597aed0d559538aa1ed00c0d3afc788
This commit is contained in:
parent
ab604352ec
commit
842d6217d1
@ -84,12 +84,8 @@ typedef uint8_t nsHttpVersion;
|
||||
// group is currently blocking on some resources
|
||||
#define NS_HTTP_LOAD_UNBLOCKED (1<<8)
|
||||
|
||||
// These flags allow a transaction to use TLS false start with
|
||||
// weaker security profiles based on past history
|
||||
#define NS_HTTP_ALLOW_RSA_FALSESTART (1<<9)
|
||||
|
||||
// This flag indicates the transaction should accept associated pushes
|
||||
#define NS_HTTP_ONPUSH_LISTENER (1<<10)
|
||||
#define NS_HTTP_ONPUSH_LISTENER (1<<9)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// some default values
|
||||
|
@ -326,7 +326,6 @@ nsHttpChannel::Connect()
|
||||
mConnectionInfo->SetNoSpdy(mCaps & NS_HTTP_DISALLOW_SPDY);
|
||||
|
||||
// Consider opening a TCP connection right away
|
||||
RetrieveSSLOptions();
|
||||
SpeculativeConnect();
|
||||
|
||||
// Don't allow resuming when cache must be used
|
||||
@ -455,8 +454,7 @@ nsHttpChannel::SpeculativeConnect()
|
||||
return;
|
||||
|
||||
gHttpHandler->SpeculativeConnect(
|
||||
mConnectionInfo, callbacks,
|
||||
mCaps & (NS_HTTP_ALLOW_RSA_FALSESTART | NS_HTTP_DISALLOW_SPDY));
|
||||
mConnectionInfo, callbacks, mCaps & NS_HTTP_DISALLOW_SPDY);
|
||||
}
|
||||
|
||||
void
|
||||
@ -621,31 +619,6 @@ nsHttpChannel::SetupTransactionLoadGroupInfo()
|
||||
mTransaction->SetLoadGroupConnectionInfo(ci);
|
||||
}
|
||||
|
||||
void
|
||||
nsHttpChannel::RetrieveSSLOptions()
|
||||
{
|
||||
if (!IsHTTPS() || mPrivateBrowsing)
|
||||
return;
|
||||
|
||||
nsIPrincipal *principal = GetPrincipal(true);
|
||||
if (!principal)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIPermissionManager> permMgr =
|
||||
services::GetPermissionManager();
|
||||
if (!permMgr)
|
||||
return;
|
||||
|
||||
uint32_t perm;
|
||||
nsresult rv = permMgr->TestPermissionFromPrincipal(principal,
|
||||
"falsestart-rsa", &perm);
|
||||
if (NS_SUCCEEDED(rv) && perm == nsIPermissionManager::ALLOW_ACTION) {
|
||||
LOG(("nsHttpChannel::RetrieveSSLOptions [this=%p] "
|
||||
"falsestart-rsa permission found\n", this));
|
||||
mCaps |= NS_HTTP_ALLOW_RSA_FALSESTART;
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
SafeForPipelining(nsHttpRequestHead::ParsedMethodType method,
|
||||
const nsCString &methodString)
|
||||
@ -1226,10 +1199,9 @@ nsHttpChannel::ProcessSSLInformation()
|
||||
!IsHTTPS() || mPrivateBrowsing)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsISSLSocketControl> ssl = do_QueryInterface(mSecurityInfo);
|
||||
nsCOMPtr<nsISSLStatusProvider> statusProvider =
|
||||
do_QueryInterface(mSecurityInfo);
|
||||
if (!ssl || !statusProvider)
|
||||
if (!statusProvider)
|
||||
return;
|
||||
nsCOMPtr<nsISSLStatus> sslstat;
|
||||
statusProvider->GetSSLStatus(getter_AddRefs(sslstat));
|
||||
@ -1277,45 +1249,6 @@ nsHttpChannel::ProcessSSLInformation()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If certificate exceptions are being used don't record this information
|
||||
// in the permission manager.
|
||||
bool trustCheck;
|
||||
if (NS_FAILED(sslstat->GetIsDomainMismatch(&trustCheck)) || trustCheck)
|
||||
return;
|
||||
if (NS_FAILED(sslstat->GetIsNotValidAtThisTime(&trustCheck)) || trustCheck)
|
||||
return;
|
||||
if (NS_FAILED(sslstat->GetIsUntrusted(&trustCheck)) || trustCheck)
|
||||
return;
|
||||
|
||||
int16_t kea = ssl->GetKEAUsed();
|
||||
|
||||
nsIPrincipal *principal = GetPrincipal(true);
|
||||
if (!principal)
|
||||
return;
|
||||
|
||||
// set a permission manager flag that future transactions can
|
||||
// use via RetrieveSSLOptions(()
|
||||
|
||||
nsCOMPtr<nsIPermissionManager> permMgr =
|
||||
services::GetPermissionManager();
|
||||
if (!permMgr)
|
||||
return;
|
||||
|
||||
// Allow this to stand for a week
|
||||
int64_t expireTime = (PR_Now() / PR_USEC_PER_MSEC) +
|
||||
(86400 * 7 * PR_MSEC_PER_SEC);
|
||||
|
||||
if (kea == ssl_kea_rsa) {
|
||||
permMgr->AddFromPrincipal(principal, "falsestart-rsa",
|
||||
nsIPermissionManager::ALLOW_ACTION,
|
||||
nsIPermissionManager::EXPIRE_TIME,
|
||||
expireTime);
|
||||
LOG(("nsHttpChannel::ProcessSSLInformation [this=%p] "
|
||||
"falsestart-rsa permission granted for this host\n", this));
|
||||
} else {
|
||||
permMgr->RemoveFromPrincipal(principal, "falsestart-rsa");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -1435,7 +1368,7 @@ nsHttpChannel::ProcessAltService()
|
||||
|
||||
gHttpHandler->
|
||||
UpdateAltServiceMapping(mapping, proxyInfo, callbacks,
|
||||
mCaps & (NS_HTTP_ALLOW_RSA_FALSESTART | NS_HTTP_DISALLOW_SPDY));
|
||||
mCaps & NS_HTTP_DISALLOW_SPDY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,6 @@ private:
|
||||
nsresult EnsureAssocReq();
|
||||
void ProcessSSLInformation();
|
||||
bool IsHTTPS();
|
||||
void RetrieveSSLOptions();
|
||||
|
||||
nsresult ContinueOnStartRequest1(nsresult);
|
||||
nsresult ContinueOnStartRequest2(nsresult);
|
||||
|
Loading…
Reference in New Issue
Block a user