bug 1431791 - remove "Others" tab from certificate manager r=jaws,mgoodwin

MozReview-Commit-ID: HUPkIAMhNEX

--HG--
extra : rebase_source : a737297d8cb8800b03532d62b39e85711d6f0663
This commit is contained in:
David Keeler 2018-01-19 13:09:22 -08:00
Родитель cf332b3975
Коммит 7840435138
10 изменённых файлов: 0 добавлений и 113 удалений

Просмотреть файл

@ -672,12 +672,10 @@
&certmgr.tab.others2;
&certmgr.tab.websites3;
&certmgr.tab.ca;
&certmgr.tab.orphan2;
&certmgr.mine2;
&certmgr.others2;
&certmgr.websites3;
&certmgr.cas2;
&certmgr.orphans2;
&certmgr.certname;
&certmgr.tokenname;
&certmgr.view2.label;

Просмотреть файл

@ -8,13 +8,11 @@
<!ENTITY certmgr.tab.others2 "People">
<!ENTITY certmgr.tab.websites3 "Servers">
<!ENTITY certmgr.tab.ca "Authorities">
<!ENTITY certmgr.tab.orphan2 "Others">
<!ENTITY certmgr.mine2 "You have certificates from these organizations that identify you">
<!ENTITY certmgr.others2 "You have certificates on file that identify these people">
<!ENTITY certmgr.websites3 "You have certificates on file that identify these servers">
<!ENTITY certmgr.cas2 "You have certificates on file that identify these certificate authorities">
<!ENTITY certmgr.orphans2 "You have certificates on file that do not fit in any of the other categories">
<!ENTITY certmgr.detail.general_tab.title "General">
<!ENTITY certmgr.detail.general_tab.accesskey "G">

Просмотреть файл

@ -32,9 +32,6 @@ deleteEmailCertConfirm=Are you sure you want to delete these peoples e-mail c
deleteEmailCertImpactDesc=If you delete a persons e-mail certificate, you will no longer be able to send encrypted e-mail to that person.
deleteEmailCertTitle=Delete E-Mail Certificates
deleteOrphanCertConfirm=Are you sure you want to delete these certificates?
deleteOrphanCertTitle=Delete Certificates
# PKCS#12 file dialogs
chooseP12RestoreFileDialog2=Certificate File to Import
chooseP12BackupFileDialog=File Name to Backup

Просмотреть файл

@ -1,47 +0,0 @@
<?xml version="1.0"?>
<!-- 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/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://pippki/locale/certManager.dtd">
<overlay id="OrphanOverlay"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cert="http://netscape.com/rdf-cert#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox id="OrphanCerts">
<description>&certmgr.orphans2;</description>
<separator class="thin"/>
<tree id="orphan-tree" flex="1" enableColumnDrag="true"
onselect="orphan_enableButtons()">
<treecols>
<treecol id="certcol" label="&certmgr.certname;" primary="true"
persist="hidden width ordinal" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="tokencol" label="&certmgr.tokenname;"
persist="hidden width ordinal" flex="1"/>
</treecols>
<treechildren ondblclick="viewCerts();"/>
</tree>
<separator class="thin"/>
<hbox>
<button id="orphan_viewButton" class="normal"
label="&certmgr.view2.label;"
accesskey="&certmgr.view2.accesskey;"
disabled="true" oncommand="viewCerts();"/>
<button id="orphan_exportButton" class="normal"
label="&certmgr.export.label;"
accesskey="&certmgr.export.accesskey;"
disabled="true" oncommand="exportCerts();"/>
<button id="orphan_deleteButton" class="normal"
label="&certmgr.delete2.label;"
accesskey="&certmgr.delete2.accesskey;"
disabled="true" oncommand="deleteCerts();"/>
</hbox>
</vbox>
</overlay>

Просмотреть файл

@ -47,11 +47,6 @@ var emailTreeView;
* @type nsICertTree
*/
var userTreeView;
/**
* Cert tree for the "Other" tab.
* @type nsICertTree
*/
var orphanTreeView;
function LoadCerts() {
certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);
@ -77,11 +72,6 @@ function LoadCerts() {
userTreeView.loadCertsFromCache(certcache, nsIX509Cert.USER_CERT);
document.getElementById("user-tree").view = userTreeView;
orphanTreeView = Components.classes[nsCertTree]
.createInstance(nsICertTree);
orphanTreeView.loadCertsFromCache(certcache, nsIX509Cert.UNKNOWN_CERT);
document.getElementById("orphan-tree").view = orphanTreeView;
enableBackupAllButton();
}
@ -95,7 +85,6 @@ function getSelectedCerts() {
var mine_tab = document.getElementById("mine_tab");
var others_tab = document.getElementById("others_tab");
var websites_tab = document.getElementById("websites_tab");
var orphan_tab = document.getElementById("orphan_tab");
var items = null;
if (ca_tab.selected) {
items = caTreeView.selection;
@ -105,8 +94,6 @@ function getSelectedCerts() {
items = emailTreeView.selection;
} else if (websites_tab.selected) {
items = serverTreeView.selection;
} else if (orphan_tab.selected) {
items = orphanTreeView.selection;
}
selected_certs = [];
var cert = null;
@ -128,8 +115,6 @@ function getSelectedCerts() {
cert = emailTreeView.getCert(j);
} else if (websites_tab.selected) {
cert = serverTreeView.getCert(j);
} else if (orphan_tab.selected) {
cert = orphanTreeView.getCert(j);
}
if (cert) {
var sc = selected_certs.length;
@ -146,7 +131,6 @@ function getSelectedTreeItems() {
var mine_tab = document.getElementById("mine_tab");
var others_tab = document.getElementById("others_tab");
var websites_tab = document.getElementById("websites_tab");
var orphan_tab = document.getElementById("orphan_tab");
var items = null;
if (ca_tab.selected) {
items = caTreeView.selection;
@ -156,8 +140,6 @@ function getSelectedTreeItems() {
items = emailTreeView.selection;
} else if (websites_tab.selected) {
items = serverTreeView.selection;
} else if (orphan_tab.selected) {
items = orphanTreeView.selection;
}
selected_certs = [];
selected_tree_items = [];
@ -181,8 +163,6 @@ function getSelectedTreeItems() {
tree_item = emailTreeView.getTreeItem(j);
} else if (websites_tab.selected) {
tree_item = serverTreeView.getTreeItem(j);
} else if (orphan_tab.selected) {
tree_item = orphanTreeView.getTreeItem(j);
}
if (tree_item) {
var sc = selected_tree_items.length;
@ -278,15 +258,6 @@ function email_enableButtons() {
enableButtonsForCertTree(emailTreeView, idList);
}
function orphan_enableButtons() {
let idList = [
"orphan_viewButton",
"orphan_exportButton",
"orphan_deleteButton",
];
enableButtonsForCertTree(orphanTreeView, idList);
}
function backupCerts() {
getSelectedCerts();
var numcerts = selected_certs.length;
@ -405,7 +376,6 @@ function deleteCerts() {
"websites_tab": serverTreeView,
"ca_tab": caTreeView,
"others_tab": emailTreeView,
"orphan_tab": orphanTreeView,
};
let selTab = document.getElementById("certMgrTabbox").selectedItem;
let selTabID = selTab.getAttribute("id");
@ -490,6 +460,4 @@ function addException() {
var certcache = certdb.getCerts();
serverTreeView.loadCertsFromCache(certcache, nsIX509Cert.SERVER_CERT);
serverTreeView.selection.clearSelection();
orphanTreeView.loadCertsFromCache(certcache, nsIX509Cert.UNKNOWN_CERT);
orphanTreeView.selection.clearSelection();
}

Просмотреть файл

@ -9,7 +9,6 @@
<?xul-overlay href="chrome://pippki/content/OthersOverlay.xul"?>
<?xul-overlay href="chrome://pippki/content/WebSitesOverlay.xul"?>
<?xul-overlay href="chrome://pippki/content/CAOverlay.xul"?>
<?xul-overlay href="chrome://pippki/content/OrphanOverlay.xul"?>
<!DOCTYPE dialog SYSTEM "chrome://pippki/locale/certManager.dtd">
@ -34,14 +33,12 @@
<tab id="others_tab" label="&certmgr.tab.others2;"/>
<tab id="websites_tab" label="&certmgr.tab.websites3;"/>
<tab id="ca_tab" label="&certmgr.tab.ca;" selected="true"/>
<tab id="orphan_tab" label="&certmgr.tab.orphan2;"/>
</tabs>
<tabpanels flex="1">
<vbox id="myCerts" flex="1"/>
<vbox id="othersCerts" flex="1"/>
<vbox id="webCerts" flex="1"/>
<vbox id="CACerts" flex="1"/>
<vbox id="OrphanCerts" flex="1"/>
</tabpanels>
</tabbox>

Просмотреть файл

@ -83,11 +83,6 @@ function onLoad() {
confirm = bundle.getString("deleteEmailCertConfirm");
impact = bundle.getString("deleteEmailCertImpactDesc");
break;
case "orphan_tab":
title = bundle.getString("deleteOrphanCertTitle");
confirm = bundle.getString("deleteOrphanCertConfirm");
impact = "";
break;
default:
return;
}

Просмотреть файл

@ -6,7 +6,6 @@ pippki.jar:
% content pippki %content/pippki/
content/pippki/CAOverlay.xul (content/CAOverlay.xul)
content/pippki/MineOverlay.xul (content/MineOverlay.xul)
content/pippki/OrphanOverlay.xul (content/OrphanOverlay.xul)
content/pippki/OthersOverlay.xul (content/OthersOverlay.xul)
content/pippki/WebSitesOverlay.xul (content/WebSitesOverlay.xul)
content/pippki/certDump.xul (content/certDump.xul)

Просмотреть файл

@ -483,14 +483,6 @@ nsCertTree::GetCertsByTypeFromCertList(CERTCertList *aCertList,
addOverrides = true;
}
else
if (aWantedType == nsIX509Cert::UNKNOWN_CERT
&& thisCertType == nsIX509Cert::UNKNOWN_CERT) {
// This unknown cert was stored without trust.
// If there are associated overrides, do not show as unknown.
// If there are no associated overrides, display as unknown.
wantThisCertIfNoOverrides = true;
}
else
if (aWantedType == nsIX509Cert::SERVER_CERT
&& thisCertType == nsIX509Cert::SERVER_CERT) {
// This server cert is explicitly marked as a web site peer,

Просмотреть файл

@ -181,16 +181,6 @@ add_task(async function testDeleteCACerts() {
expectedImpact);
});
// Test deleting certs from the "Other" tab.
add_task(async function testDeleteOtherCerts() {
const expectedTitle = "Delete Certificates";
const expectedConfirmMsg =
"Are you sure you want to delete these certificates?";
const expectedImpact = "";
await testHelper("orphan_tab", expectedTitle, expectedConfirmMsg,
expectedImpact);
});
// Test that the right values are returned when the dialog is accepted.
add_task(async function testAcceptDialogReturnValues() {
let [win, retVals] = await openDeleteCertConfirmDialog("ca_tab" /* arbitrary */);