Bug 785259: Fix override bit masking, r=bsmith, sr=honzab
authorcviecco@mozilla.com
Wed, 26 Sep 2012 12:08:00 -0700
changeset 108285 1a989993c992618fe16f0339c37554ee68142075
parent 108284 cbfe6a468a1202143916a4805736b9b73f51b335
child 108286 a25086637d1fcb604d2dbe6aebc189a657cf994b
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersbsmith, honzab
bugs785259
milestone18.0a1
Bug 785259: Fix override bit masking, r=bsmith, sr=honzab
security/manager/ssl/src/SSLServerCertVerification.cpp
--- a/security/manager/ssl/src/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/src/SSLServerCertVerification.cpp
@@ -316,17 +316,17 @@ CertErrorRunnable::CheckCertOverrides()
       nsrv = overrideService->HasMatchingOverride(hostString, port,
                                                   mCert,
                                                   &overrideBits,
                                                   &isTemporaryOverride, 
                                                   &haveOverride);
       if (NS_SUCCEEDED(nsrv) && haveOverride) 
       {
        // remove the errors that are already overriden
-        remaining_display_errors -= overrideBits;
+        remaining_display_errors &= !overrideBits;
       }
     }
 
     if (!remaining_display_errors) {
       // all errors are covered by override rules, so let's accept the cert
       PR_LOG(gPIPNSSLog, PR_LOG_DEBUG,
              ("[%p][%p] All errors covered by override rules\n",
              mFdForLogging, this));