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

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

Issue 1437893002: Add token binding negotiation to QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107261172
Patch Set: Created 5 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/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_client_config.cc
diff --git a/net/quic/crypto/quic_crypto_client_config.cc b/net/quic/crypto/quic_crypto_client_config.cc
index b9b0bcd46fcfeec9fe1a7710e178eefde590c30e..eec1861e83068d4ec9da4e01a5aa357068d70520 100644
--- a/net/quic/crypto/quic_crypto_client_config.cc
+++ b/net/quic/crypto/quic_crypto_client_config.cc
@@ -497,6 +497,26 @@ QuicErrorCode QuicCryptoClientConfig::FillClientHello(
out->SetTaglist(kAEAD, out_params->aead, 0);
out->SetTaglist(kKEXS, out_params->key_exchange, 0);
+ if (!tb_key_params.empty()) {
+ const QuicTag* their_tbkps;
+ size_t num_their_tbkps;
+ switch (scfg->GetTaglist(kTBKP, &their_tbkps, &num_their_tbkps)) {
+ case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
+ break;
+ case QUIC_NO_ERROR:
+ if (QuicUtils::FindMutualTag(tb_key_params, their_tbkps,
+ num_their_tbkps, QuicUtils::LOCAL_PRIORITY,
+ &out_params->token_binding_key_param,
+ nullptr)) {
+ out->SetTaglist(kTBKP, out_params->token_binding_key_param, 0);
+ }
+ break;
+ default:
+ *error_details = "Invalid TBKP";
+ return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
+ }
+ }
+
StringPiece public_value;
if (scfg->GetNthValue24(kPUBS, key_exchange_index, &public_value) !=
QUIC_NO_ERROR) {
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698