diff --git a/mobile/app/Makefile.in b/mobile/app/Makefile.in index 37fb2ae68c53..f5cff054b1b3 100644 --- a/mobile/app/Makefile.in +++ b/mobile/app/Makefile.in @@ -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 diff --git a/security/manager/pki/resources/content/certManager.js b/security/manager/pki/resources/content/certManager.js index 5e6855814d2f..a0aa88d5d6ca 100644 --- a/security/manager/pki/resources/content/certManager.js +++ b/security/manager/pki/resources/content/certManager.js @@ -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(); + } } } diff --git a/security/manager/ssl/src/nsUsageArrayHelper.cpp b/security/manager/ssl/src/nsUsageArrayHelper.cpp index 94ddd7bcd549..bd093bc07808 100644 --- a/security/manager/ssl/src/nsUsageArrayHelper.cpp +++ b/security/manager/ssl/src/nsUsageArrayHelper.cpp @@ -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; }