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

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

Issue 1785613005: Deprecate FLAG_require_strike_register_or_server_nonce (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115890504
Patch Set: Deleted flag definition Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('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/crypto/quic_crypto_server_config.h" 5 #include "net/quic/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 10
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 // is a RPC call and is expensive. 1114 // is a RPC call and is expensive.
1115 if (found_error) { 1115 if (found_error) {
1116 helper.ValidationComplete(QUIC_NO_ERROR, ""); 1116 helper.ValidationComplete(QUIC_NO_ERROR, "");
1117 return; 1117 return;
1118 } 1118 }
1119 1119
1120 // Use the client nonce to establish uniqueness. 1120 // Use the client nonce to establish uniqueness.
1121 StrikeRegisterClient* strike_register_client; 1121 StrikeRegisterClient* strike_register_client;
1122 { 1122 {
1123 base::AutoLock locked(strike_register_client_lock_); 1123 base::AutoLock locked(strike_register_client_lock_);
1124
1125 if (strike_register_client_.get() == nullptr) {
1126 if (!FLAGS_require_strike_register_or_server_nonce) {
1127 strike_register_client_.reset(new LocalStrikeRegisterClient(
1128 strike_register_max_entries_,
1129 static_cast<uint32_t>(info->now.ToUNIXSeconds()),
1130 strike_register_window_secs_, primary_orbit,
1131 strike_register_no_startup_period_
1132 ? StrikeRegister::NO_STARTUP_PERIOD_NEEDED
1133 : StrikeRegister::DENY_REQUESTS_AT_STARTUP));
1134 }
1135 }
1136 strike_register_client = strike_register_client_.get(); 1124 strike_register_client = strike_register_client_.get();
1137 } 1125 }
1138 1126
1139 if (!strike_register_client) { 1127 if (!strike_register_client) {
1140 // Either a valid server nonces or a strike register is required. 1128 // Either a valid server nonces or a strike register is required.
1141 // Since neither are present, reject the handshake which will send a 1129 // Since neither are present, reject the handshake which will send a
1142 // server nonce to the client. 1130 // server nonce to the client.
1143 info->reject_reasons.push_back(SERVER_NONCE_REQUIRED_FAILURE); 1131 info->reject_reasons.push_back(SERVER_NONCE_REQUIRED_FAILURE);
1144 helper.ValidationComplete(QUIC_NO_ERROR, ""); 1132 helper.ValidationComplete(QUIC_NO_ERROR, "");
1145 return; 1133 return;
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 priority(0), 1775 priority(0),
1788 source_address_token_boxer(nullptr) {} 1776 source_address_token_boxer(nullptr) {}
1789 1777
1790 QuicCryptoServerConfig::Config::~Config() { 1778 QuicCryptoServerConfig::Config::~Config() {
1791 STLDeleteElements(&key_exchanges); 1779 STLDeleteElements(&key_exchanges);
1792 } 1780 }
1793 1781
1794 QuicCryptoProof::QuicCryptoProof() {} 1782 QuicCryptoProof::QuicCryptoProof() {}
1795 QuicCryptoProof::~QuicCryptoProof() {} 1783 QuicCryptoProof::~QuicCryptoProof() {}
1796 } // namespace net 1784 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698