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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes 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
Index: net/quic/quic_crypto_client_stream.cc
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index 80d298e012a359bd571a863832eaaed504d3278c..697efe4ce214e6cf176aad6fc123ff5930f54735 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -58,7 +58,7 @@ void QuicCryptoClientStream::DoHandshakeLoop(
crypto_config_->LookupOrCreate(server_hostname_);
if (in != NULL) {
- DLOG(INFO) << "Client received: " << in->DebugString();
+ DVLOG(1) << "Client received: " << in->DebugString();
}
for (;;) {
@@ -72,11 +72,11 @@ void QuicCryptoClientStream::DoHandshakeLoop(
}
num_client_hellos_++;
- if (!cached->is_complete()) {
+ if (!cached->IsComplete(session()->connection()->clock()->WallNow())) {
crypto_config_->FillInchoateClientHello(
server_hostname_, cached, &crypto_negotiated_params_, &out);
next_state_ = STATE_RECV_REJ;
- DLOG(INFO) << "Client Sending: " << out.DebugString();
+ DVLOG(1) << "Client Sending: " << out.DebugString();
SendHandshakeMessage(out);
return;
}
@@ -91,11 +91,14 @@ void QuicCryptoClientStream::DoHandshakeLoop(
&out,
&error_details);
if (error != QUIC_NO_ERROR) {
+ // Flush the cached config so that, if it's bad, the server has a
+ // chance to send us another in the future.
+ cached->InvalidateServerConfig();
CloseConnectionWithDetails(error, error_details);
return;
}
next_state_ = STATE_RECV_SHLO;
- DLOG(INFO) << "Client Sending: " << out.DebugString();
+ DVLOG(1) << "Client Sending: " << out.DebugString();
SendHandshakeMessage(out);
// Be prepared to decrypt with the new server write key.
session()->connection()->SetAlternativeDecrypter(
@@ -134,9 +137,9 @@ void QuicCryptoClientStream::DoHandshakeLoop(
"Expected REJ");
return;
}
- error = crypto_config_->ProcessRejection(cached, *in,
- &crypto_negotiated_params_,
- &error_details);
+ error = crypto_config_->ProcessRejection(
+ cached, *in, session()->connection()->clock()->WallNow(),
+ &crypto_negotiated_params_, &error_details);
if (error != QUIC_NO_ERROR) {
CloseConnectionWithDetails(error, error_details);
return;

Powered by Google App Engine
This is Rietveld 408576698