Bug 910986 - Fix cert trust editing in People tab of Cert Manager. r=dkeeler
authorCykesiopka <cykesiopka.bmo@gmail.com>
Tue, 10 Dec 2013 10:36:47 -0500
changeset 159667 418110dd6003198ccafd4c868c33673544554e14
parent 159666 4889070e0eeab737d0bc5ea66b90fc907859372e
child 159668 4db1dae484358e29ba007a76d60c384f227ba63d
push id37387
push userryanvm@gmail.com
push dateTue, 10 Dec 2013 15:37:51 +0000
treeherdermozilla-inbound@ff6976885129 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdkeeler
bugs910986
milestone29.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 910986 - Fix cert trust editing in People tab of Cert Manager. r=dkeeler
security/manager/pki/resources/content/editcerts.js
--- a/security/manager/pki/resources/content/editcerts.js
+++ b/security/manager/pki/resources/content/editcerts.js
@@ -101,17 +101,19 @@ function doLoadForEmailCert()
   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 ? nsIX509CertDB.TRUSTED_EMAIL : 0;
+  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()