OLD | NEW |
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 #ifndef NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "net/base/net_export.h" | |
14 #include "net/quic/core/quic_protocol.h" | 13 #include "net/quic/core/quic_protocol.h" |
15 | 14 |
16 // Version and Crypto tags are written to the wire with a big-endian | 15 // Version and Crypto tags are written to the wire with a big-endian |
17 // representation of the name of the tag. For example | 16 // representation of the name of the tag. For example |
18 // the client hello tag (CHLO) will be written as the | 17 // the client hello tag (CHLO) will be written as the |
19 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is | 18 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is |
20 // stored in memory as a little endian uint32_t, we need | 19 // stored in memory as a little endian uint32_t, we need |
21 // to reverse the order of the bytes. | 20 // to reverse the order of the bytes. |
22 // | 21 // |
23 // We use a macro to ensure that no static initialisers are created. Use the | 22 // We use a macro to ensure that no static initialisers are created. Use the |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // amplification factor of any mirror DoS attack. | 247 // amplification factor of any mirror DoS attack. |
249 // | 248 // |
250 // A client may pad an inchoate client hello to a size larger than | 249 // A client may pad an inchoate client hello to a size larger than |
251 // kClientHelloMinimumSize to make it more likely to receive a complete | 250 // kClientHelloMinimumSize to make it more likely to receive a complete |
252 // rejection message. | 251 // rejection message. |
253 const size_t kClientHelloMinimumSize = 1024; | 252 const size_t kClientHelloMinimumSize = 1024; |
254 | 253 |
255 } // namespace net | 254 } // namespace net |
256 | 255 |
257 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 256 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
OLD | NEW |