mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 825583 - Remove server tab cert trust editing. r=keeler
This commit is contained in:
parent
58d8e60c37
commit
066db840e7
@ -39,14 +39,10 @@
|
||||
|
||||
<!ENTITY certmgr.editcert.title "Edit Security Certificate Settings">
|
||||
<!ENTITY certmgr.editcacert.title "Edit CA certificate trust settings">
|
||||
<!ENTITY certmgr.editsslcert.title "Edit website certificate trust settings">
|
||||
<!ENTITY certmgr.editcert.edittrust "Edit trust settings:">
|
||||
<!ENTITY certmgr.editcert.trustssl "This certificate can identify websites.">
|
||||
<!ENTITY certmgr.editcert.trustemail "This certificate can identify mail users.">
|
||||
<!ENTITY certmgr.editcert.trustobjsign "This certificate can identify software makers.">
|
||||
<!ENTITY certmgr.editsslcert.edittrust "Edit certificate trust settings:">
|
||||
<!ENTITY certmgr.editsslcert.dotrust "Trust the authenticity of this certificate.">
|
||||
<!ENTITY certmgr.editsslcert.donttrust "Do not trust the authenticity of this certificate.">
|
||||
<!ENTITY certmgr.editemailcert.title "Edit email certificate trust settings">
|
||||
<!ENTITY certmgr.editemailcert.edittrust "Edit certificate trust settings:">
|
||||
<!ENTITY certmgr.editemailcert.dotrust "Trust the authenticity of this certificate.">
|
||||
|
@ -13,7 +13,6 @@ unnamedCA=Certificate Authority (unnamed)
|
||||
#For editing cert trust
|
||||
editTrustWindowTitle=Edit certificate trust
|
||||
editTrustCA=The certificate "%S" represents a Certificate Authority.
|
||||
editTrustSSL=The certificate "%S" was issued by:
|
||||
editTrustEmail=The certificate "%S" was issued by:
|
||||
issuerNotTrusted=Because you do not trust the certificate authority that issued this certificate, you do not trust the authenticity of this certificate unless otherwise indicated here.
|
||||
issuerTrusted=Because you trust the certificate authority that issued this certificate, you trust the authenticity of this certificate unless otherwise indicated here.
|
||||
|
@ -40,10 +40,6 @@
|
||||
label="&certmgr.view2.label;"
|
||||
accesskey="&certmgr.view2.accesskey;"
|
||||
disabled="true" oncommand="viewCerts();"/>
|
||||
<button id="websites_editButton"
|
||||
label="&certmgr.edit3.label;"
|
||||
accesskey="&certmgr.edit3.accesskey;"
|
||||
disabled="true" oncommand="editCerts();"/>
|
||||
<button id="websites_addButton"
|
||||
label="&certmgr.restore2.label;"
|
||||
accesskey="&certmgr.restore2.accesskey;"
|
||||
|
@ -248,7 +248,6 @@ function websites_enableButtons()
|
||||
|
||||
var enable_delete = false;
|
||||
var enable_view = false;
|
||||
var enable_edit = false;
|
||||
|
||||
if (count_ranges > 0) {
|
||||
enable_delete = true;
|
||||
@ -266,12 +265,6 @@ function websites_enableButtons()
|
||||
if (ti.cert) {
|
||||
enable_view = true;
|
||||
}
|
||||
// Trust editing is not possible for override
|
||||
// entries that are bound to host:port,
|
||||
// where the cert is stored for convenince only.
|
||||
if (!ti.hostPort.length) {
|
||||
enable_edit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
@ -281,8 +274,6 @@ function websites_enableButtons()
|
||||
|
||||
var enableViewButton=document.getElementById('websites_viewButton');
|
||||
enableViewButton.setAttribute("disabled", !enable_view);
|
||||
var enableEditButton=document.getElementById('websites_editButton');
|
||||
enableEditButton.setAttribute("disabled", !enable_edit);
|
||||
var enableExportButton=document.getElementById('websites_exportButton');
|
||||
enableExportButton.setAttribute("disabled", !enable_view);
|
||||
var enableDeleteButton=document.getElementById('websites_deleteButton');
|
||||
@ -364,13 +355,6 @@ function editCerts()
|
||||
} else if (document.getElementById("others_tab").selected) {
|
||||
window.openDialog('chrome://pippki/content/editemailcert.xul', certkey,
|
||||
'chrome,centerscreen,modal');
|
||||
} else if (!document.getElementById("websites_tab").selected
|
||||
|| !serverTreeView.isHostPortOverride(selected_index[t])) {
|
||||
// If the web sites tab is select, trust editing is only allowed
|
||||
// if the entry refers to a real cert, but not if it's
|
||||
// a host:port override, where the cert is stored for convenince only.
|
||||
window.openDialog('chrome://pippki/content/editsslcert.xul', certkey,
|
||||
'chrome,centerscreen,modal');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,59 +73,6 @@ function doOK()
|
||||
return true;
|
||||
}
|
||||
|
||||
function doLoadForSSLCert()
|
||||
{
|
||||
var dbkey = self.name;
|
||||
|
||||
// Get the cert from the cert database
|
||||
certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);
|
||||
cert = certdb.findCertByDBKey(dbkey, null);
|
||||
|
||||
var bundle = document.getElementById("pippki_bundle");
|
||||
var windowReference = document.getElementById('editWebsiteCert');
|
||||
|
||||
var message1 = bundle.getFormattedString("editTrustSSL", [cert.commonName]);
|
||||
setText("certmsg", message1);
|
||||
|
||||
setText("issuer", cert.issuerName);
|
||||
|
||||
var cacert = getCaCertForEntityCert(cert);
|
||||
if(cacert == null)
|
||||
{
|
||||
setText("explanations", bundle.getString("issuerNotKnown"));
|
||||
}
|
||||
else if(certdb.isCertTrusted(cacert, nsIX509Cert.CA_CERT,
|
||||
nsIX509CertDB.TRUSTED_SSL))
|
||||
{
|
||||
setText("explanations", bundle.getString("issuerTrusted"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setText("explanations", bundle.getString("issuerNotTrusted"));
|
||||
}
|
||||
/*
|
||||
if(cacert == null)
|
||||
{
|
||||
var editButton = document.getElementById('editca-button');
|
||||
editButton.setAttribute("disabled","true");
|
||||
}
|
||||
*/
|
||||
var sslTrust = document.getElementById("sslTrustGroup");
|
||||
sslTrust.value = certdb.isCertTrusted(cert, nsIX509Cert.SERVER_CERT,
|
||||
nsIX509CertDB.TRUSTED_SSL);
|
||||
}
|
||||
|
||||
function doSSLOK()
|
||||
{
|
||||
var sslTrust = document.getElementById("sslTrustGroup");
|
||||
var trustssl = sslTrust.value ? nsIX509CertDB.TRUSTED_SSL : 0;
|
||||
//
|
||||
// Set the cert trust
|
||||
//
|
||||
certdb.setCertTrust(cert, nsIX509Cert.SERVER_CERT, trustssl);
|
||||
return true;
|
||||
}
|
||||
|
||||
function doLoadForEmailCert()
|
||||
{
|
||||
var dbkey = self.name;
|
||||
|
@ -1,38 +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 dialog SYSTEM "chrome://pippki/locale/certManager.dtd">
|
||||
|
||||
<dialog id="editWebsiteCert"
|
||||
title="&certmgr.editsslcert.title;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return doSSLOK();"
|
||||
onload="doLoadForSSLCert();"
|
||||
>
|
||||
|
||||
<stringbundle id="pippki_bundle" src="chrome://pippki/locale/pippki.properties"/>
|
||||
|
||||
<script type="application/javascript" src="chrome://pippki/content/pippki.js"/>
|
||||
<script type="application/javascript" src="chrome://pippki/content/editcerts.js"/>
|
||||
|
||||
<description id="certmsg"/>
|
||||
<description id="issuer"/>
|
||||
<separator/>
|
||||
<description id="explanations"/>
|
||||
<separator />
|
||||
<description>&certmgr.editsslcert.edittrust;</description>
|
||||
<radiogroup id="sslTrustGroup">
|
||||
<radio label="&certmgr.editsslcert.dotrust;" value="true"/>
|
||||
<radio label="&certmgr.editsslcert.donttrust;" value="false"/>
|
||||
</radiogroup>
|
||||
<hbox>
|
||||
<button id="editca-button" label="&certmgr.editca.label;"
|
||||
oncommand="editCaTrust();"/>
|
||||
</hbox>
|
||||
|
||||
</dialog>
|
@ -23,7 +23,6 @@ pippki.jar:
|
||||
content/pippki/viewCertDetails.xul (content/viewCertDetails.xul)
|
||||
content/pippki/editcacert.xul (content/editcacert.xul)
|
||||
content/pippki/editemailcert.xul (content/editemailcert.xul)
|
||||
content/pippki/editsslcert.xul (content/editsslcert.xul)
|
||||
content/pippki/editcerts.js (content/editcerts.js)
|
||||
* content/pippki/exceptionDialog.xul (content/exceptionDialog.xul)
|
||||
content/pippki/exceptionDialog.js (content/exceptionDialog.js)
|
||||
|
Loading…
x
Reference in New Issue
Block a user