bug 1076329 - fix NSSDialogService to properly inspect checkbox state in confirmDownloadCACert r=mfinkle
authorDavid Keeler <dkeeler@mozilla.com>
Mon, 09 Feb 2015 15:09:06 -0800
changeset 228769 e2fbc7f6ac3bb8c063eb3edc305c75bc01dd7875
parent 228768 c448634fb6c945b1d16e003c4d2515407c49487f
child 228770 fe5c25b8b6753af34c96c3007423d7a1f7380b29
push idunknown
push userunknown
push dateunknown
reviewersmfinkle
bugs1076329
milestone38.0a1
bug 1076329 - fix NSSDialogService to properly inspect checkbox state in confirmDownloadCACert r=mfinkle
mobile/android/components/NSSDialogService.js
--- a/mobile/android/components/NSSDialogService.js
+++ b/mobile/android/components/NSSDialogService.js
@@ -80,19 +80,19 @@ NSSDialogs.prototype = {
       if (response.button == 1) {
         this.viewCert(aCtx, aCert);
         continue;
       } else if (response.button != 0) {
         return false;
       }
 
       aTrust.value = Ci.nsIX509CertDB.UNTRUSTED;
-      if (response.trustSSL == "true") aTrust.value |= Ci.nsIX509CertDB.TRUSTED_SSL;
-      if (response.trustEmail == "true") aTrust.value |= Ci.nsIX509CertDB.TRUSTED_EMAIL;
-      if (response.trustSign == "true") aTrust.value |= Ci.nsIX509CertDB.TRUSTED_OBJSIGN;
+      if (response.trustSSL) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_SSL;
+      if (response.trustEmail) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_EMAIL;
+      if (response.trustSign) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_OBJSIGN;
       return true;
     }
   },
 
   notifyCACertExists: function(aCtx) {
     let p = this.getPrompt(this.getString("caCertExists.title"), this.getString("caCertExists.message"));
     this.showPrompt(p);
   },