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

Unified Diff: net/quic/crypto/crypto_server_test.cc

Issue 2011983004: Add a new CryptoTestUtils::LeafCertHashForTesting for generating expected leaf cert hashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122750844
Patch Set: Created 4 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 | « no previous file | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_server_test.cc
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index 929a6003c3ada70e8714870d1303c269f1fabb93..40fccaec96141c5e20a5d62dac30f643741832c5 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -368,21 +368,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
}
string XlctHexString() {
- scoped_refptr<ProofSource::Chain> chain;
- IPAddress server_ip;
- string sig;
- string cert_sct;
- std::unique_ptr<ProofSource> proof_source(
- CryptoTestUtils::ProofSourceForTesting());
- if (!proof_source->GetProof(server_ip, "", "", client_version_, "", false,
- &chain, &sig, &cert_sct) ||
- chain->certs.empty()) {
- return "#0100000000000000";
- }
-
- std::ostringstream xlct_stream;
- uint64_t xlct = QuicUtils::FNV1a_64_Hash(chain->certs.at(0).c_str(),
- chain->certs.at(0).length());
+ uint64_t xlct = CryptoTestUtils::LeafCertHashForTesting();
return "#" +
QuicUtils::HexEncode(reinterpret_cast<char*>(&xlct), sizeof(xlct));
}
« no previous file with comments | « no previous file | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698