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

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

Issue 2241183004: Landing Recent QUIC changes until Sat Aug 13 04:32:36 2016 UTC-0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler error. Created 4 years, 4 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 | « components/domain_reliability/quic_error_mapping.cc ('k') | net/quic/core/quic_config_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/quic_crypto_server_config.cc
diff --git a/net/quic/core/crypto/quic_crypto_server_config.cc b/net/quic/core/crypto/quic_crypto_server_config.cc
index 2c843a6161567a2bae47f6bad855c2a3a7dc40e8..4133899d4020538b380f2c7970d0edc8dbc1ccae 100644
--- a/net/quic/core/crypto/quic_crypto_server_config.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config.cc
@@ -619,7 +619,7 @@ QuicErrorCode QuicCryptoServerConfig::ProcessClientHello(
if (!ClientDemandsX509Proof(client_hello) && FLAGS_quic_require_x509) {
*error_details = "Missing or invalid PDMD";
- return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
+ return QUIC_UNSUPPORTED_PROOF_DEMAND;
}
DCHECK(proof_source_.get());
string chlo_hash;
@@ -1516,9 +1516,9 @@ void QuicCryptoServerConfig::BuildRejection(
bool should_return_sct =
params->sct_supported_by_client && enable_serving_sct_;
const size_t sct_size = should_return_sct ? crypto_proof.cert_sct.size() : 0;
- if (info.valid_source_address_token ||
- crypto_proof.signature.size() + compressed.size() + sct_size <
- max_unverified_size) {
+ const size_t total_size =
+ crypto_proof.signature.size() + compressed.size() + sct_size;
+ if (info.valid_source_address_token || total_size < max_unverified_size) {
out->SetStringPiece(kCertificateTag, compressed);
out->SetStringPiece(kPROF, crypto_proof.signature);
if (should_return_sct) {
@@ -1528,6 +1528,14 @@ void QuicCryptoServerConfig::BuildRejection(
out->SetStringPiece(kCertificateSCTTag, crypto_proof.cert_sct);
}
}
+ } else {
+ if (FLAGS_quic_use_chlo_packet_size) {
+ DLOG(WARNING) << "Sending inchoate REJ for hostname: " << info.sni
+ << " signature: " << crypto_proof.signature.size()
+ << " cert: " << compressed.size() << " sct:" << sct_size
+ << " total: " << total_size
+ << " max: " << max_unverified_size;
+ }
}
}
« no previous file with comments | « components/domain_reliability/quic_error_mapping.cc ('k') | net/quic/core/quic_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698