mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1130418 - Remove broken e-mail cert trust editing UI. r=emk
This commit is contained in:
parent
9ab87a604b
commit
0333f769fa
@ -39,10 +39,6 @@
|
|||||||
<!ENTITY certmgr.editcert.trustssl "This certificate can identify websites.">
|
<!ENTITY certmgr.editcert.trustssl "This certificate can identify websites.">
|
||||||
<!ENTITY certmgr.editcert.trustemail "This certificate can identify mail users.">
|
<!ENTITY certmgr.editcert.trustemail "This certificate can identify mail users.">
|
||||||
<!ENTITY certmgr.editcert.trustobjsign "This certificate can identify software makers.">
|
<!ENTITY certmgr.editcert.trustobjsign "This certificate can identify software makers.">
|
||||||
<!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.">
|
|
||||||
<!ENTITY certmgr.editemailcert.donttrust "Do not trust the authenticity of this certificate.">
|
|
||||||
|
|
||||||
<!ENTITY certmgr.deletecert.title "Delete Certificate">
|
<!ENTITY certmgr.deletecert.title "Delete Certificate">
|
||||||
|
|
||||||
@ -61,8 +57,6 @@
|
|||||||
<!ENTITY certmgr.view2.accesskey "V">
|
<!ENTITY certmgr.view2.accesskey "V">
|
||||||
<!ENTITY certmgr.edit3.label "Edit Trust…">
|
<!ENTITY certmgr.edit3.label "Edit Trust…">
|
||||||
<!ENTITY certmgr.edit3.accesskey "E">
|
<!ENTITY certmgr.edit3.accesskey "E">
|
||||||
<!ENTITY certmgr.editca.label "Edit CA Trust">
|
|
||||||
<!ENTITY certmgr.editca.accesskey "d">
|
|
||||||
<!ENTITY certmgr.export.label "Export…">
|
<!ENTITY certmgr.export.label "Export…">
|
||||||
<!ENTITY certmgr.export.accesskey "x">
|
<!ENTITY certmgr.export.accesskey "x">
|
||||||
<!ENTITY certmgr.delete2.label "Delete…">
|
<!ENTITY certmgr.delete2.label "Delete…">
|
||||||
|
@ -12,11 +12,6 @@ unnamedCA=Certificate Authority (unnamed)
|
|||||||
|
|
||||||
#For editing cert trust
|
#For editing cert trust
|
||||||
editTrustCA=The certificate "%S" represents a Certificate Authority.
|
editTrustCA=The certificate "%S" represents a Certificate Authority.
|
||||||
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.
|
|
||||||
issuerNotKnown=Because you do not know the certificate authority that issued this certificate, you do not trust the authenticity of this certificate unless otherwise indicated here.
|
|
||||||
issuerCertNotFound=Certificate for this certificate authority was not found
|
|
||||||
|
|
||||||
#For Deleting Certificates
|
#For Deleting Certificates
|
||||||
deleteSslCertConfirm3=Are you sure you want to delete these server exceptions?
|
deleteSslCertConfirm3=Are you sure you want to delete these server exceptions?
|
||||||
|
@ -37,10 +37,6 @@
|
|||||||
label="&certmgr.view2.label;"
|
label="&certmgr.view2.label;"
|
||||||
accesskey="&certmgr.view2.accesskey;"
|
accesskey="&certmgr.view2.accesskey;"
|
||||||
disabled="true" oncommand="viewCerts();"/>
|
disabled="true" oncommand="viewCerts();"/>
|
||||||
<button id="email_editButton"
|
|
||||||
label="&certmgr.edit3.label;"
|
|
||||||
accesskey="&certmgr.edit3.accesskey;"
|
|
||||||
disabled="true" oncommand="editCerts();"/>
|
|
||||||
<button id="email_addButton"
|
<button id="email_addButton"
|
||||||
label="&certmgr.restore2.label;"
|
label="&certmgr.restore2.label;"
|
||||||
accesskey="&certmgr.restore2.accesskey;"
|
accesskey="&certmgr.restore2.accesskey;"
|
||||||
|
@ -273,8 +273,6 @@ function email_enableButtons()
|
|||||||
|
|
||||||
var enableViewButton=document.getElementById('email_viewButton');
|
var enableViewButton=document.getElementById('email_viewButton');
|
||||||
enableViewButton.setAttribute("disabled", disableButtons);
|
enableViewButton.setAttribute("disabled", disableButtons);
|
||||||
var enableEditButton=document.getElementById('email_editButton');
|
|
||||||
enableEditButton.setAttribute("disabled", disableButtons);
|
|
||||||
var enableExportButton=document.getElementById('email_exportButton');
|
var enableExportButton=document.getElementById('email_exportButton');
|
||||||
enableExportButton.setAttribute("disabled", disableButtons);
|
enableExportButton.setAttribute("disabled", disableButtons);
|
||||||
var enableDeleteButton=document.getElementById('email_deleteButton');
|
var enableDeleteButton=document.getElementById('email_deleteButton');
|
||||||
@ -329,14 +327,8 @@ function editCerts()
|
|||||||
return;
|
return;
|
||||||
for (var t=0; t<numcerts; t++) {
|
for (var t=0; t<numcerts; t++) {
|
||||||
var cert = selected_certs[t];
|
var cert = selected_certs[t];
|
||||||
var certkey = cert.dbKey;
|
window.openDialog("chrome://pippki/content/editcacert.xul", cert.dbKey,
|
||||||
if (document.getElementById("ca_tab").selected) {
|
"chrome,centerscreen,modal");
|
||||||
window.openDialog('chrome://pippki/content/editcacert.xul', certkey,
|
|
||||||
'chrome,centerscreen,modal');
|
|
||||||
} else if (document.getElementById("others_tab").selected) {
|
|
||||||
window.openDialog('chrome://pippki/content/editemailcert.xul', certkey,
|
|
||||||
'chrome,centerscreen,modal');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,89 +68,3 @@ function doOK()
|
|||||||
trustssl | trustemail | trustobjsign);
|
trustssl | trustemail | trustobjsign);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function doLoadForEmailCert()
|
|
||||||
{
|
|
||||||
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 message1 = bundle.getFormattedString("editTrustEmail", [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_EMAIL))
|
|
||||||
{
|
|
||||||
setText("explanations", bundle.getString("issuerTrusted"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setText("explanations", bundle.getString("issuerNotTrusted"));
|
|
||||||
}
|
|
||||||
var sslTrust = document.getElementById("sslTrustGroup");
|
|
||||||
sslTrust.value = certdb.isCertTrusted(cert, nsIX509Cert.EMAIL_CERT,
|
|
||||||
nsIX509CertDB.TRUSTED_EMAIL);
|
|
||||||
}
|
|
||||||
|
|
||||||
function doEmailOK()
|
|
||||||
{
|
|
||||||
var sslTrust = document.getElementById("sslTrustGroup");
|
|
||||||
var trustemail = sslTrust.value == "true"
|
|
||||||
? nsIX509CertDB.TRUSTED_EMAIL
|
|
||||||
: nsIX509CertDB.UNTRUSTED;
|
|
||||||
//
|
|
||||||
// Set the cert trust
|
|
||||||
//
|
|
||||||
certdb.setCertTrust(cert, nsIX509Cert.EMAIL_CERT, trustemail);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function editCaTrust()
|
|
||||||
{
|
|
||||||
var cacert = getCaCertForEntityCert(cert);
|
|
||||||
if(cacert != null)
|
|
||||||
{
|
|
||||||
window.openDialog('chrome://pippki/content/editcacert.xul', cacert.dbKey,
|
|
||||||
'chrome,centerscreen,modal');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var bundle = document.getElementById("pippki_bundle");
|
|
||||||
doPrompt(bundle.getString("issuerCertNotFound"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCaCertForEntityCert(cert)
|
|
||||||
{
|
|
||||||
var nextCertInChain;
|
|
||||||
nextCertInChain = cert;
|
|
||||||
var lastSubjectName="";
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
if(nextCertInChain == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if((nextCertInChain.type == nsIX509Cert.CA_CERT) ||
|
|
||||||
(nextCertInChain.subjectName == lastSubjectName))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastSubjectName = nextCertInChain.subjectName;
|
|
||||||
nextCertInChain = nextCertInChain.issuer;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nextCertInChain;
|
|
||||||
}
|
|
||||||
|
@ -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="editEmailCert"
|
|
||||||
title="&certmgr.editemailcert.title;"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
buttons="accept,cancel"
|
|
||||||
ondialogaccept="return doEmailOK();"
|
|
||||||
onload="doLoadForEmailCert();"
|
|
||||||
>
|
|
||||||
|
|
||||||
<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.editemailcert.edittrust;</description>
|
|
||||||
<radiogroup id="sslTrustGroup">
|
|
||||||
<radio label="&certmgr.editemailcert.dotrust;" value="true"/>
|
|
||||||
<radio label="&certmgr.editemailcert.donttrust;" value="false"/>
|
|
||||||
</radiogroup>
|
|
||||||
<hbox>
|
|
||||||
<button id="editca-button" label="&certmgr.editca.label;"
|
|
||||||
accesskey="&certmgr.editca.accesskey;" oncommand="editCaTrust();"/>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
</dialog>
|
|
@ -19,7 +19,6 @@ pippki.jar:
|
|||||||
content/pippki/OrphanOverlay.xul (content/OrphanOverlay.xul)
|
content/pippki/OrphanOverlay.xul (content/OrphanOverlay.xul)
|
||||||
content/pippki/viewCertDetails.xul (content/viewCertDetails.xul)
|
content/pippki/viewCertDetails.xul (content/viewCertDetails.xul)
|
||||||
content/pippki/editcacert.xul (content/editcacert.xul)
|
content/pippki/editcacert.xul (content/editcacert.xul)
|
||||||
content/pippki/editemailcert.xul (content/editemailcert.xul)
|
|
||||||
content/pippki/editcerts.js (content/editcerts.js)
|
content/pippki/editcerts.js (content/editcerts.js)
|
||||||
* content/pippki/exceptionDialog.xul (content/exceptionDialog.xul)
|
* content/pippki/exceptionDialog.xul (content/exceptionDialog.xul)
|
||||||
content/pippki/exceptionDialog.js (content/exceptionDialog.js)
|
content/pippki/exceptionDialog.js (content/exceptionDialog.js)
|
||||||
|
Loading…
Reference in New Issue
Block a user