Merge mozilla-central and mozilla-inbound

This commit is contained in:
Ehsan Akhgari 2011-07-20 15:54:18 -04:00
commit 64a2c57937
3 changed files with 28 additions and 18 deletions

View File

@ -88,7 +88,11 @@ include $(topsrcdir)/config/rules.mk
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
ifndef MOZ_BUILD_DATE
APP_BUILDID = $(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid)
else
APP_BUILDID = $(MOZ_BUILD_DATE)
endif
APP_ICON = mobile
APP_SPLASH = splash

View File

@ -105,13 +105,14 @@ function LoadCerts()
document.getElementById('orphan-tree')
.treeBoxObject.view = orphanTreeView;
enableBackupAllButton();
}
function enableBackupAllButton()
{
var rowCnt = userTreeView.rowCount;
var enableBackupAllButton=document.getElementById('mine_backupAllButton');
if(rowCnt < 1) {
enableBackupAllButton.setAttribute("disabled",true);
} else {
enableBackupAllButton.setAttribute("enabled",true);
}
var backupAllButton=document.getElementById('mine_backupAllButton');
backupAllButton.disabled = (rowCnt < 1);
}
function getSelectedCerts()
@ -428,6 +429,7 @@ function restoreCerts()
userTreeView.selection.clearSelection();
caTreeView.loadCertsFromCache(certcache, nsIX509Cert.CA_CERT);
caTreeView.selection.clearSelection();
enableBackupAllButton();
}
}
@ -528,6 +530,9 @@ function deleteCerts()
selected_tree_items = [];
selected_index = [];
treeView.selection.clearSelection();
if (selTabID == 'mine_tab') {
enableBackupAllButton();
}
}
}

View File

@ -181,10 +181,13 @@ nsUsageArrayHelper::GetUsagesArray(const char *suffix,
PRUint32 &count = *_count;
count = 0;
SECCertificateUsage usages = 0;
SECStatus verifyResult;
int err = 0;
if (!nsNSSComponent::globalConstFlagUsePKIXVerification) {
verifyResult =
// CERT_VerifyCertificateNow returns SECFailure unless the certificate is
// valid for all the given usages. Hoewver, we are only looking for the list
// of usages for which the cert *is* valid.
(void)
CERT_VerifyCertificateNow(defaultcertdb, mCert, PR_TRUE,
certificateUsageSSLClient |
certificateUsageSSLServer |
@ -195,6 +198,7 @@ if (!nsNSSComponent::globalConstFlagUsePKIXVerification) {
certificateUsageSSLCA |
certificateUsageStatusResponder,
NULL, &usages);
err = PR_GetError();
}
else {
nsresult nsrv;
@ -215,20 +219,13 @@ else {
cvout[0].value.scalar.usages = 0;
cvout[1].type = cert_po_end;
verifyResult =
CERT_PKIXVerifyCert(mCert, certificateUsageCheckAllUsages,
survivingParams->GetRawPointerForNSS(),
cvout, NULL);
err = PR_GetError();
usages = cvout[0].value.scalar.usages;
}
if (verifyResult != SECSuccess) {
int err = PR_GetError();
verifyFailed(_verified, err);
return NS_OK;
}
// The following list of checks must be < max_returned_out_array_size
check(suffix, usages & certificateUsageSSLClient, count, outUsages);
@ -254,6 +251,10 @@ else {
nssComponent->SkipOcspOff();
}
*_verified = nsNSSCertificate::VERIFIED_OK;
if (count == 0) {
verifyFailed(_verified, err);
} else {
*_verified = nsNSSCertificate::VERIFIED_OK;
}
return NS_OK;
}