Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Unified Diff: net/cert/signed_certificate_timestamp_unittest.cc

Issue 997533002: Certificate Transparency: Correctly handle SCT origin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/signed_certificate_timestamp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/signed_certificate_timestamp_unittest.cc
diff --git a/net/cert/signed_certificate_timestamp_unittest.cc b/net/cert/signed_certificate_timestamp_unittest.cc
index 393725d04390b1d086ef1ba1dd3753da53597032..79f46214a98ec9452bc5384d7b2621363ee63998 100644
--- a/net/cert/signed_certificate_timestamp_unittest.cc
+++ b/net/cert/signed_certificate_timestamp_unittest.cc
@@ -47,6 +47,17 @@ TEST_F(SignedCertificateTimestampTest, PicklesAndUnpickles) {
ASSERT_EQ(sample_sct_->log_description, unpickled_sct->log_description);
}
+TEST_F(SignedCertificateTimestampTest, SCTsWithDifferentOriginsNotEqual) {
+ scoped_refptr<SignedCertificateTimestamp> another_sct;
+ GetX509CertSCT(&another_sct);
+ another_sct->origin = SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION;
+
+ SignedCertificateTimestamp::LessThan less_than;
+
+ ASSERT_TRUE(less_than(sample_sct_, another_sct) ||
+ less_than(another_sct, sample_sct_));
+}
+
} // namespace
} // namespace ct
« no previous file with comments | « net/cert/signed_certificate_timestamp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698