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

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

Issue 2511643002: Refactoring output of ProofSource::GetProof (no functional changes). (Closed)
Patch Set: Refactoring output of ProofSource::GetProof (no functional changes). Created 4 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/quic/chromium/crypto/proof_test_chromium.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_server_test.cc
diff --git a/net/quic/core/crypto/crypto_server_test.cc b/net/quic/core/crypto/crypto_server_test.cc
index 51d15b29d00c5e8238ae188e26723a55e36e03d6..76c17974c53377bb62f387a0cf1b7188bded812e 100644
--- a/net/quic/core/crypto/crypto_server_test.cc
+++ b/net/quic/core/crypto/crypto_server_test.cc
@@ -112,7 +112,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
compressed_certs_cache_(
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
params_(new QuicCryptoNegotiatedParameters),
- crypto_proof_(new QuicCryptoProof),
+ signed_config_(new QuicSignedServerConfig),
chlo_packet_size_(kDefaultMaxPacketSize) {
supported_versions_ = GetParam().supported_versions;
config_.set_enable_serving_sct(true);
@@ -183,8 +183,9 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
ASSERT_TRUE(server_config_->GetStringPiece(kSCID, &scid));
scid_hex_ = "#" + QuicUtils::HexEncode(scid);
- crypto_proof_ = scoped_refptr<QuicCryptoProof>(new QuicCryptoProof());
- DCHECK(crypto_proof_->chain.get() == nullptr);
+ signed_config_ =
+ scoped_refptr<QuicSignedServerConfig>(new QuicSignedServerConfig());
+ DCHECK(signed_config_->chain.get() == nullptr);
}
// Helper used to accept the result of ValidateClientHello and pass
@@ -248,7 +249,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
IPAddress server_ip;
config_.ValidateClientHello(
message, client_address_.address(), server_ip,
- supported_versions_.front(), &clock_, crypto_proof_,
+ supported_versions_.front(), &clock_, signed_config_,
std::unique_ptr<ValidateCallback>(
new ValidateCallback(this, true, "", &called)));
EXPECT_TRUE(called);
@@ -267,7 +268,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
IPAddress server_ip;
config_.ValidateClientHello(
message, client_address_.address(), server_ip,
- supported_versions_.front(), &clock_, crypto_proof_,
+ supported_versions_.front(), &clock_, signed_config_,
std::unique_ptr<ValidateCallback>(
new ValidateCallback(this, false, error_substr, called)));
}
@@ -329,7 +330,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
result, /*reject_only=*/false, /*connection_id=*/1, server_ip,
client_address_, supported_versions_.front(), supported_versions_,
use_stateless_rejects_, server_designated_connection_id, &clock_, rand_,
- &compressed_certs_cache_, params_, crypto_proof_,
+ &compressed_certs_cache_, params_, signed_config_,
/*total_framing_overhead=*/50, chlo_packet_size_,
std::unique_ptr<ProcessCallback>(new ProcessCallback(
result, should_succeed, error_substr, &called, &out_)));
@@ -410,7 +411,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
QuicCompressedCertsCache compressed_certs_cache_;
QuicCryptoServerConfig::ConfigOptions config_options_;
scoped_refptr<QuicCryptoNegotiatedParameters> params_;
- scoped_refptr<QuicCryptoProof> crypto_proof_;
+ scoped_refptr<QuicSignedServerConfig> signed_config_;
CryptoHandshakeMessage out_;
uint8_t orbit_[kOrbitSize];
bool use_stateless_rejects_;
@@ -1219,8 +1220,8 @@ TEST_P(AsyncStrikeServerVerificationTest, AsyncReplayProtection) {
IPAddress server_ip;
config_.ValidateClientHello(
msg, client_address_.address(), server_ip, client_version_, &clock_,
- crypto_proof_, std::unique_ptr<ValidateCallback>(
- new ValidateCallback(this, true, "", &called)));
+ signed_config_, std::unique_ptr<ValidateCallback>(
+ new ValidateCallback(this, true, "", &called)));
// The verification request was queued.
ASSERT_FALSE(called);
EXPECT_EQ(0u, out_.tag());
@@ -1236,8 +1237,8 @@ TEST_P(AsyncStrikeServerVerificationTest, AsyncReplayProtection) {
// Rejected if replayed.
config_.ValidateClientHello(
msg, client_address_.address(), server_ip, client_version_, &clock_,
- crypto_proof_, std::unique_ptr<ValidateCallback>(
- new ValidateCallback(this, true, "", &called)));
+ signed_config_, std::unique_ptr<ValidateCallback>(
+ new ValidateCallback(this, true, "", &called)));
// The verification request was queued.
ASSERT_FALSE(called);
EXPECT_EQ(1, strike_register_client_->PendingVerifications());
« no previous file with comments | « net/quic/chromium/crypto/proof_test_chromium.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698