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

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

Issue 1660443002: QuicCryptoProof now takes a ref to the Config instead of its SCID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@112982328
Patch Set: Created 4 years, 11 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/quic/crypto/quic_crypto_server_config.h ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_server_config.cc
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index d04b44cdd5386c20cda9399d94007f019862c12f..9bf08a6370af3fb8c7df88afdf082fba44598c16 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -522,7 +522,11 @@ void QuicCryptoServerConfig::ValidateClientHello(
requested_config = GetConfigWithScid(requested_scid);
primary_config = primary_config_;
- crypto_proof->primary_scid = primary_config->id;
+ if (FLAGS_quic_crypto_proof_use_ref) {
+ crypto_proof->config = primary_config_;
+ } else {
+ crypto_proof->primary_scid = primary_config->id;
+ }
}
if (result->error_code == QUIC_NO_ERROR) {
@@ -582,7 +586,11 @@ QuicErrorCode QuicCryptoServerConfig::ProcessClientHello(
// Use the config that the client requested in order to do key-agreement.
// Otherwise give it a copy of |primary_config_| to use.
- primary_config = GetConfigWithScid(crypto_proof->primary_scid);
+ if (FLAGS_quic_crypto_proof_use_ref) {
+ primary_config = crypto_proof->config;
+ } else {
+ primary_config = GetConfigWithScid(crypto_proof->primary_scid);
+ }
if (!primary_config) {
*error_details = "Configuration not found";
QUIC_BUG << "Primary config not found";
@@ -1803,4 +1811,6 @@ QuicCryptoServerConfig::Config::~Config() {
STLDeleteElements(&key_exchanges);
}
+QuicCryptoProof::QuicCryptoProof() : certs(nullptr) {}
+QuicCryptoProof::~QuicCryptoProof() {}
} // namespace net
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.h ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698