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

Side by Side Diff: net/quic/core/crypto/quic_crypto_server_config.cc

Issue 2508393002: Get rid of the unused Priority argument to QuicUtils::FindMutualTag. No behavior change. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config.cc ('k') | net/quic/core/quic_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_server_config.h" 5 #include "net/quic/core/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 client_hello.GetTaglist(kKEXS, &their_key_exchanges, 861 client_hello.GetTaglist(kKEXS, &their_key_exchanges,
862 &num_their_key_exchanges) != QUIC_NO_ERROR || 862 &num_their_key_exchanges) != QUIC_NO_ERROR ||
863 num_their_aeads != 1 || num_their_key_exchanges != 1) { 863 num_their_aeads != 1 || num_their_key_exchanges != 1) {
864 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, 864 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
865 "Missing or invalid AEAD or KEXS"); 865 "Missing or invalid AEAD or KEXS");
866 return; 866 return;
867 } 867 }
868 868
869 size_t key_exchange_index; 869 size_t key_exchange_index;
870 if (!QuicUtils::FindMutualTag(requested_config->aead, their_aeads, 870 if (!QuicUtils::FindMutualTag(requested_config->aead, their_aeads,
871 num_their_aeads, QuicUtils::LOCAL_PRIORITY, 871 num_their_aeads, &params->aead, nullptr) ||
872 &params->aead, nullptr) ||
873 !QuicUtils::FindMutualTag(requested_config->kexs, their_key_exchanges, 872 !QuicUtils::FindMutualTag(requested_config->kexs, their_key_exchanges,
874 num_their_key_exchanges, 873 num_their_key_exchanges, &params->key_exchange,
875 QuicUtils::LOCAL_PRIORITY, 874 &key_exchange_index)) {
876 &params->key_exchange, &key_exchange_index)) {
877 helper.Fail(QUIC_CRYPTO_NO_SUPPORT, "Unsupported AEAD or KEXS"); 875 helper.Fail(QUIC_CRYPTO_NO_SUPPORT, "Unsupported AEAD or KEXS");
878 return; 876 return;
879 } 877 }
880 878
881 if (!requested_config->tb_key_params.empty()) { 879 if (!requested_config->tb_key_params.empty()) {
882 const QuicTag* their_tbkps; 880 const QuicTag* their_tbkps;
883 size_t num_their_tbkps; 881 size_t num_their_tbkps;
884 switch (client_hello.GetTaglist(kTBKP, &their_tbkps, &num_their_tbkps)) { 882 switch (client_hello.GetTaglist(kTBKP, &their_tbkps, &num_their_tbkps)) {
885 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: 883 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
886 break; 884 break;
887 case QUIC_NO_ERROR: 885 case QUIC_NO_ERROR:
888 if (QuicUtils::FindMutualTag( 886 if (QuicUtils::FindMutualTag(
889 requested_config->tb_key_params, their_tbkps, num_their_tbkps, 887 requested_config->tb_key_params, their_tbkps, num_their_tbkps,
890 QuicUtils::LOCAL_PRIORITY, &params->token_binding_key_param, 888 &params->token_binding_key_param, nullptr)) {
891 nullptr)) {
892 break; 889 break;
893 } 890 }
894 default: 891 default:
895 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, 892 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
896 "Invalid Token Binding key parameter"); 893 "Invalid Token Binding key parameter");
897 return; 894 return;
898 } 895 }
899 } 896 }
900 897
901 StringPiece public_value; 898 StringPiece public_value;
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 source_address_token_boxer(nullptr) {} 2278 source_address_token_boxer(nullptr) {}
2282 2279
2283 QuicCryptoServerConfig::Config::~Config() { 2280 QuicCryptoServerConfig::Config::~Config() {
2284 } 2281 }
2285 2282
2286 QuicSignedServerConfig::QuicSignedServerConfig() 2283 QuicSignedServerConfig::QuicSignedServerConfig()
2287 : send_expect_ct_header(false) {} 2284 : send_expect_ct_header(false) {}
2288 QuicSignedServerConfig::~QuicSignedServerConfig() {} 2285 QuicSignedServerConfig::~QuicSignedServerConfig() {}
2289 2286
2290 } // namespace net 2287 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config.cc ('k') | net/quic/core/quic_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698