OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/core/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/core/crypto/quic_crypto_client_config.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 !QuicUtils::FindMutualTag( | 543 !QuicUtils::FindMutualTag( |
544 kexs, their_key_exchanges, num_their_key_exchanges, | 544 kexs, their_key_exchanges, num_their_key_exchanges, |
545 QuicUtils::LOCAL_PRIORITY, &out_params->key_exchange, | 545 QuicUtils::LOCAL_PRIORITY, &out_params->key_exchange, |
546 &key_exchange_index)) { | 546 &key_exchange_index)) { |
547 *error_details = "Unsupported AEAD or KEXS"; | 547 *error_details = "Unsupported AEAD or KEXS"; |
548 return QUIC_CRYPTO_NO_SUPPORT; | 548 return QUIC_CRYPTO_NO_SUPPORT; |
549 } | 549 } |
550 out->SetVector(kAEAD, QuicTagVector{out_params->aead}); | 550 out->SetVector(kAEAD, QuicTagVector{out_params->aead}); |
551 out->SetVector(kKEXS, QuicTagVector{out_params->key_exchange}); | 551 out->SetVector(kKEXS, QuicTagVector{out_params->key_exchange}); |
552 | 552 |
553 if (!tb_key_params.empty()) { | 553 if (!tb_key_params.empty() && |
| 554 server_id.privacy_mode() == PRIVACY_MODE_DISABLED) { |
554 const QuicTag* their_tbkps; | 555 const QuicTag* their_tbkps; |
555 size_t num_their_tbkps; | 556 size_t num_their_tbkps; |
556 switch (scfg->GetTaglist(kTBKP, &their_tbkps, &num_their_tbkps)) { | 557 switch (scfg->GetTaglist(kTBKP, &their_tbkps, &num_their_tbkps)) { |
557 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: | 558 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: |
558 break; | 559 break; |
559 case QUIC_NO_ERROR: | 560 case QUIC_NO_ERROR: |
560 if (QuicUtils::FindMutualTag(tb_key_params, their_tbkps, | 561 if (QuicUtils::FindMutualTag(tb_key_params, their_tbkps, |
561 num_their_tbkps, QuicUtils::LOCAL_PRIORITY, | 562 num_their_tbkps, QuicUtils::LOCAL_PRIORITY, |
562 &out_params->token_binding_key_param, | 563 &out_params->token_binding_key_param, |
563 nullptr)) { | 564 nullptr)) { |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 } | 989 } |
989 | 990 |
990 // Update canonical version to point at the "most recent" entry. | 991 // Update canonical version to point at the "most recent" entry. |
991 canonical_server_map_[suffix_server_id] = server_id; | 992 canonical_server_map_[suffix_server_id] = server_id; |
992 | 993 |
993 server_state->InitializeFrom(*canonical_state); | 994 server_state->InitializeFrom(*canonical_state); |
994 return true; | 995 return true; |
995 } | 996 } |
996 | 997 |
997 } // namespace net | 998 } // namespace net |
OLD | NEW |