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

Unified Diff: net/cert/ct_log_verifier_unittest.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/ct_log_verifier_openssl.cc ('k') | net/data/url_request_unittest/simple.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_log_verifier_unittest.cc
diff --git a/net/cert/ct_log_verifier_unittest.cc b/net/cert/ct_log_verifier_unittest.cc
index 373f69eeaa575ff12b0267784eefa47322b880fa..e8d1bc4e7bd299882aa5cb70d0ea105f1f05de13 100644
--- a/net/cert/ct_log_verifier_unittest.cc
+++ b/net/cert/ct_log_verifier_unittest.cc
@@ -89,4 +89,13 @@ TEST_F(CTLogVerifierTest, DoesNotSetInvalidSTH) {
ASSERT_FALSE(log_->SetSignedTreeHead(sth.Pass()));
}
+// Test that excess data after the public key is rejected.
+TEST_F(CTLogVerifierTest, ExcessDataInPublicKey) {
+ std::string key = ct::GetTestPublicKey();
+ key += "extra";
+
+ scoped_ptr<CTLogVerifier> log = CTLogVerifier::Create(key, "testlog");
+ EXPECT_FALSE(log);
+}
+
} // namespace net
« no previous file with comments | « net/cert/ct_log_verifier_openssl.cc ('k') | net/data/url_request_unittest/simple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698