Bug 1064402 - Part 1: Remove Import button in Servers tab of the Certificate Manager. r=keeler
authorCykesiopka <cykesiopka.bmo@gmail.com>
Sat, 06 Feb 2016 20:40:57 -0800
changeset 283390 2d3ec6c8bfe4c5b93f8385a78a91e5bda77d54f0
parent 283389 b2d2408648755506d0e57b14f1d926d981ca695d
child 283391 1bde49e1fb1379fe45b4b00d02d067f88088964d
push id71508
push userphilringnalda@gmail.com
push dateSun, 07 Feb 2016 04:41:54 +0000
treeherdermozilla-inbound@1bde49e1fb13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler
bugs1064402, 825583, 1202636
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1064402 - Part 1: Remove Import button in Servers tab of the Certificate Manager. r=keeler It no longer serves any useful purpose: 1. It is no longer possible to add explicit trust for server certs post Bug 825583. 1A. The Add Exception feature is better suited for this anyways. 2. It isn't possible to set explicit distrust in the Cert Manager, only remove explicit trust. 3. Importing may also inadvertently cause verification failures (see Bug 1202636).
security/manager/locales/en-US/chrome/pippki/pippki.properties
security/manager/pki/resources/content/WebSitesOverlay.xul
security/manager/pki/resources/content/certManager.js
--- a/security/manager/locales/en-US/chrome/pippki/pippki.properties
+++ b/security/manager/locales/en-US/chrome/pippki/pippki.properties
@@ -105,20 +105,19 @@ devinfo_stat_ready=Ready
 enable_fips=Enable FIPS
 disable_fips=Disable FIPS
 fips_nonempty_password_required=FIPS mode requires that you have a Master Password set for each security device. Please set the password before trying to enable FIPS mode.
 unable_to_toggle_fips=Unable to change the FIPS mode for the security device. It is recommended that you exit and restart this application.
 
 resetPasswordConfirmationTitle=Reset Master Password
 resetPasswordConfirmationMessage=Your password has been reset.
 
-#Import certificate(s) file dialog
+# Import certificate(s) file dialog
 importEmailCertPrompt=Select File containing somebody's Email certificate to import
 importCACertsPrompt=Select File containing CA certificate(s) to import
-importServerCertPrompt=Select File containing Server certificate to import
 file_browse_Certificate_spec=Certificate Files
 
 # Cert export
 SaveCertAs=Save Certificate To File
 CertFormatBase64=X.509 Certificate (PEM)
 CertFormatBase64Chain=X.509 Certificate with chain (PEM)
 CertFormatDER=X.509 Certificate (DER)
 CertFormatPKCS7=X.509 Certificate (PKCS#7)
--- a/security/manager/pki/resources/content/WebSitesOverlay.xul
+++ b/security/manager/pki/resources/content/WebSitesOverlay.xul
@@ -35,20 +35,16 @@
 
     <separator class="thin"/>
 
     <hbox>
       <button id="websites_viewButton"
               label="&certmgr.view2.label;"
               accesskey="&certmgr.view2.accesskey;"
               disabled="true" oncommand="viewCerts();"/>
-      <button id="websites_addButton"
-              label="&certmgr.restore2.label;"
-              accesskey="&certmgr.restore2.accesskey;"
-              oncommand="addWebSiteCert();"/>
       <button id="websites_exportButton"
               label="&certmgr.export.label;"
               accesskey="&certmgr.export.accesskey;"
               disabled="true" oncommand="exportCerts();"/>
       <button id="websites_deleteButton"
               label="&certmgr.delete2.label;"
               accesskey="&certmgr.delete2.accesskey;"
               disabled="true" oncommand="deleteCerts();"/>
--- a/security/manager/pki/resources/content/certManager.js
+++ b/security/manager/pki/resources/content/certManager.js
@@ -526,37 +526,16 @@ function addEmailCert()
     var certcache = certdb.getCerts();
     emailTreeView.loadCertsFromCache(certcache, nsIX509Cert.EMAIL_CERT);
     emailTreeView.selection.clearSelection();
     caTreeView.loadCertsFromCache(certcache, nsIX509Cert.CA_CERT);
     caTreeView.selection.clearSelection();
   }
 }
 
-function addWebSiteCert()
-{
-  var bundle = document.getElementById("pippki_bundle");
-  var fp = Components.classes[nsFilePicker].createInstance(nsIFilePicker);
-  fp.init(window,
-          bundle.getString("importServerCertPrompt"),
-          nsIFilePicker.modeOpen);
-  fp.appendFilter(bundle.getString("file_browse_Certificate_spec"),
-                  gCertFileTypes);
-  fp.appendFilters(nsIFilePicker.filterAll);
-  if (fp.show() == nsIFilePicker.returnOK) {
-    certdb.importCertsFromFile(fp.file, nsIX509Cert.SERVER_CERT);
-
-    var certcache = certdb.getCerts();
-    serverTreeView.loadCertsFromCache(certcache, nsIX509Cert.SERVER_CERT);
-    serverTreeView.selection.clearSelection();
-    caTreeView.loadCertsFromCache(certcache, nsIX509Cert.CA_CERT);
-    caTreeView.selection.clearSelection();
-  }
-}
-
 function addException()
 {
   window.openDialog('chrome://pippki/content/exceptionDialog.xul', "",
                     'chrome,centerscreen,modal');
   var certcache = certdb.getCerts();
   serverTreeView.loadCertsFromCache(certcache, nsIX509Cert.SERVER_CERT);
   serverTreeView.selection.clearSelection();
   orphanTreeView.loadCertsFromCache(certcache, nsIX509Cert.UNKNOWN_CERT);