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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 320663002: Change the prototype of ChannelIDSource::GetChannelIDKey() to allow an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unrelated changes Created 6 years, 6 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_client_config_test.cc ('k') | 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/quic_crypto_client_stream.cc
===================================================================
--- net/quic/quic_crypto_client_stream.cc (revision 275522)
+++ net/quic/quic_crypto_client_stream.cc (working copy)
@@ -4,6 +4,7 @@
#include "net/quic/quic_crypto_client_stream.h"
+#include "net/quic/crypto/channel_id.h"
#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/crypto/crypto_utils.h"
#include "net/quic/crypto/null_encrypter.h"
@@ -151,6 +152,35 @@
return;
}
session()->config()->ToHandshakeMessage(&out);
+
+ scoped_ptr<ChannelIDKey> channel_id_key;
+ bool do_channel_id = false;
+ if (crypto_config_->channel_id_source()) {
+ const CryptoHandshakeMessage* scfg = cached->GetServerConfig();
+ DCHECK(scfg);
+ const QuicTag* their_proof_demands;
+ size_t num_their_proof_demands;
+ if (scfg->GetTaglist(kPDMD, &their_proof_demands,
+ &num_their_proof_demands) == QUIC_NO_ERROR) {
+ for (size_t i = 0; i < num_their_proof_demands; i++) {
+ if (their_proof_demands[i] == kCHID) {
+ do_channel_id = true;
+ break;
+ }
+ }
+ }
+ }
+ if (do_channel_id) {
+ QuicAsyncStatus status =
+ crypto_config_->channel_id_source()->GetChannelIDKey(
+ server_id_.host(), &channel_id_key, NULL);
+ if (status != QUIC_SUCCESS) {
+ CloseConnectionWithDetails(QUIC_INVALID_CHANNEL_ID_SIGNATURE,
+ "Channel ID lookup failed");
+ return;
+ }
+ }
+
error = crypto_config_->FillClientHello(
server_id_,
session()->connection()->connection_id(),
@@ -159,6 +189,7 @@
cached,
session()->connection()->clock()->WallNow(),
session()->connection()->random_generator(),
+ channel_id_key.get(),
&crypto_negotiated_params_,
&out,
&error_details);
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config_test.cc ('k') | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698