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

Unified Diff: trunk/src/net/quic/crypto/proof_test.cc

Issue 15018013: Revert 198736 "Land Recent QUIC changes" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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 | « trunk/src/net/quic/crypto/null_encrypter.cc ('k') | trunk/src/net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/quic/crypto/proof_test.cc
===================================================================
--- trunk/src/net/quic/crypto/proof_test.cc (revision 198763)
+++ trunk/src/net/quic/crypto/proof_test.cc (working copy)
@@ -1,58 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/crypto/proof_source.h"
-#include "net/quic/crypto/proof_verifier.h"
-#include "net/quic/test_tools/crypto_test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using std::string;
-using std::vector;
-
-namespace net {
-namespace test {
-
-TEST(Proof, Verify) {
- // TODO(rtenneti): Enable testing of ProofVerifier.
-#if 0
- scoped_ptr<ProofSource> source(CryptoTestUtils::ProofSourceForTesting());
- scoped_ptr<ProofVerifier> verifier(
- CryptoTestUtils::ProofVerifierForTesting());
-
- const string server_config = "server config bytes";
- const string hostname = "test.example.com";
- const vector<string>* certs;
- const vector<string>* first_certs;
- string error_details, signature, first_signature;
-
- ASSERT_TRUE(source->GetProof(hostname, server_config, &first_certs,
- &first_signature));
- ASSERT_TRUE(source->GetProof(hostname, server_config, &certs, &signature));
-
- // Check that the proof source is caching correctly:
- ASSERT_EQ(first_certs, certs);
- ASSERT_EQ(signature, first_signature);
-
- ASSERT_TRUE(verifier->VerifyProof(hostname, server_config, *certs, signature,
- &error_details));
- ASSERT_FALSE(verifier->VerifyProof("foo.com", server_config, *certs,
- signature, &error_details));
- ASSERT_FALSE(
- verifier->VerifyProof(hostname, server_config.substr(1, string::npos),
- *certs, signature, &error_details));
- const string corrupt_signature = "1" + signature;
- ASSERT_FALSE(verifier->VerifyProof(hostname, server_config, *certs,
- corrupt_signature, &error_details));
-
- vector<string> wrong_certs;
- for (size_t i = 1; i < certs->size(); i++) {
- wrong_certs.push_back((*certs)[i]);
- }
- ASSERT_FALSE(verifier->VerifyProof("foo.com", server_config, wrong_certs,
- signature, &error_details));
-#endif // 0
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « trunk/src/net/quic/crypto/null_encrypter.cc ('k') | trunk/src/net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698