summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 16:52:48 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 16:52:48 +0000
commitdb215301990c0c89e6029da5314520e7b2c66b29 (patch)
tree400bbe0ae19e6ca106fdd365942b4726f45d7fce /net
parentfc60def0e5c58408d56e62516b73812e06751755 (diff)
downloadchromium_src-db215301990c0c89e6029da5314520e7b2c66b29.zip
chromium_src-db215301990c0c89e6029da5314520e7b2c66b29.tar.gz
chromium_src-db215301990c0c89e6029da5314520e7b2c66b29.tar.bz2
Resolve a strict-weak-ordering issue when sorting certificates and both are expired
BUG=89267 Review URL: https://chromiumcodereview.appspot.com/11368120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/x509_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/base/x509_util.cc b/net/base/x509_util.cc
index 246c173..a272470 100644
--- a/net/base/x509_util.cc
+++ b/net/base/x509_util.cc
@@ -22,8 +22,8 @@ bool ClientCertSorter::operator()(
base::Time now = base::Time::Now();
bool a_is_valid = now >= a->valid_start() && now <= a->valid_expiry();
bool b_is_valid = now >= b->valid_start() && now <= b->valid_expiry();
- if (a_is_valid && !b_is_valid)
- return true;
+ if (a_is_valid != b_is_valid)
+ return a_is_valid && !b_is_valid;
// Certificates with longer expirations appear as higher priority (less
// than) certificates with shorter expirations.