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

Side by Side Diff: net/quic/quic_utils.cc

Issue 2007223002: Explicitly disallow multi-packet CHLOs. Protected by FLAGS_quic_disallow_multi_packet_chlo, default… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122481524
Patch Set: remove static_cast Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic_utils.h" 5 #include "net/quic/quic_utils.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 RETURN_STRING_LITERAL(QUIC_UNENCRYPTED_FEC_DATA); 291 RETURN_STRING_LITERAL(QUIC_UNENCRYPTED_FEC_DATA);
292 RETURN_STRING_LITERAL(QUIC_BAD_MULTIPATH_FLAG); 292 RETURN_STRING_LITERAL(QUIC_BAD_MULTIPATH_FLAG);
293 RETURN_STRING_LITERAL(QUIC_IP_ADDRESS_CHANGED); 293 RETURN_STRING_LITERAL(QUIC_IP_ADDRESS_CHANGED);
294 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS); 294 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
295 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES); 295 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
296 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK); 296 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK);
297 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM); 297 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM);
298 RETURN_STRING_LITERAL(QUIC_TOO_MANY_RTOS); 298 RETURN_STRING_LITERAL(QUIC_TOO_MANY_RTOS);
299 RETURN_STRING_LITERAL(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA); 299 RETURN_STRING_LITERAL(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA);
300 RETURN_STRING_LITERAL(QUIC_MAYBE_CORRUPTED_MEMORY); 300 RETURN_STRING_LITERAL(QUIC_MAYBE_CORRUPTED_MEMORY);
301 RETURN_STRING_LITERAL(QUIC_CRYPTO_CHLO_TOO_LARGE);
301 RETURN_STRING_LITERAL(QUIC_LAST_ERROR); 302 RETURN_STRING_LITERAL(QUIC_LAST_ERROR);
302 // Intentionally have no default case, so we'll break the build 303 // Intentionally have no default case, so we'll break the build
303 // if we add errors and don't put them here. 304 // if we add errors and don't put them here.
304 } 305 }
305 // Return a default value so that we return this when |error| doesn't match 306 // Return a default value so that we return this when |error| doesn't match
306 // any of the QuicErrorCodes. This can happen when the ConnectionClose 307 // any of the QuicErrorCodes. This can happen when the ConnectionClose
307 // frame sent by the peer (attacker) has invalid error code. 308 // frame sent by the peer (attacker) has invalid error code.
308 return "INVALID_ERROR_CODE"; 309 return "INVALID_ERROR_CODE";
309 } 310 }
310 311
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (isprint(c)) { 564 if (isprint(c)) {
564 out += c; 565 out += c;
565 } else { 566 } else {
566 out += '.'; 567 out += '.';
567 } 568 }
568 } 569 }
569 return out; 570 return out;
570 } 571 }
571 572
572 } // namespace net 573 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698