| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Proof types (i.e. certificate types) | 49 // Proof types (i.e. certificate types) |
| 50 // NOTE: although it would be silly to do so, specifying both kX509 and kX59R | 50 // NOTE: although it would be silly to do so, specifying both kX509 and kX59R |
| 51 // is allowed and is equivalent to specifying only kX509. | 51 // is allowed and is equivalent to specifying only kX509. |
| 52 const QuicTag kX509 = TAG('X', '5', '0', '9'); // X.509 certificate, all key | 52 const QuicTag kX509 = TAG('X', '5', '0', '9'); // X.509 certificate, all key |
| 53 // types | 53 // types |
| 54 const QuicTag kX59R = TAG('X', '5', '9', 'R'); // X.509 certificate, RSA keys | 54 const QuicTag kX59R = TAG('X', '5', '9', 'R'); // X.509 certificate, RSA keys |
| 55 // only | 55 // only |
| 56 const QuicTag kCHID = TAG('C', 'H', 'I', 'D'); // Channel ID. | 56 const QuicTag kCHID = TAG('C', 'H', 'I', 'D'); // Channel ID. |
| 57 | 57 |
| 58 // Client hello tags | 58 // Client hello tags |
| 59 // TODO(rch): Remove once we remove QUIC_VERSION_12. | |
| 60 const QuicTag kVERS = TAG('V', 'E', 'R', 'S'); // Version (obsolete) | |
| 61 const QuicTag kVER = TAG('V', 'E', 'R', '\0'); // Version (new) | 59 const QuicTag kVER = TAG('V', 'E', 'R', '\0'); // Version (new) |
| 62 const QuicTag kNONC = TAG('N', 'O', 'N', 'C'); // The client's nonce | 60 const QuicTag kNONC = TAG('N', 'O', 'N', 'C'); // The client's nonce |
| 63 const QuicTag kKEXS = TAG('K', 'E', 'X', 'S'); // Key exchange methods | 61 const QuicTag kKEXS = TAG('K', 'E', 'X', 'S'); // Key exchange methods |
| 64 const QuicTag kAEAD = TAG('A', 'E', 'A', 'D'); // Authenticated | 62 const QuicTag kAEAD = TAG('A', 'E', 'A', 'D'); // Authenticated |
| 65 // encryption algorithms | 63 // encryption algorithms |
| 66 const QuicTag kCGST = TAG('C', 'G', 'S', 'T'); // Congestion control | 64 const QuicTag kCGST = TAG('C', 'G', 'S', 'T'); // Congestion control |
| 67 // feedback types | 65 // feedback types |
| 68 const QuicTag kICSL = TAG('I', 'C', 'S', 'L'); // Idle connection state | 66 const QuicTag kICSL = TAG('I', 'C', 'S', 'L'); // Idle connection state |
| 69 // lifetime | 67 // lifetime |
| 70 const QuicTag kKATO = TAG('K', 'A', 'T', 'O'); // Keepalive timeout | 68 const QuicTag kKATO = TAG('K', 'A', 'T', 'O'); // Keepalive timeout |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos | 131 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos |
| 134 // will have PAD tags added in order to ensure this minimum is met and client | 132 // will have PAD tags added in order to ensure this minimum is met and client |
| 135 // hellos smaller than this will be an error. This minimum size reduces the | 133 // hellos smaller than this will be an error. This minimum size reduces the |
| 136 // amplification factor of any mirror DoS attack. | 134 // amplification factor of any mirror DoS attack. |
| 137 // | 135 // |
| 138 // A client may pad an inchoate client hello to a size larger than | 136 // A client may pad an inchoate client hello to a size larger than |
| 139 // kClientHelloMinimumSize to make it more likely to receive a complete | 137 // kClientHelloMinimumSize to make it more likely to receive a complete |
| 140 // rejection message. | 138 // rejection message. |
| 141 const size_t kClientHelloMinimumSize = 1024; | 139 const size_t kClientHelloMinimumSize = 1024; |
| 142 | 140 |
| 143 // kClientHelloMinimumSizeOld is the previous value of kClientHelloMinimumSize. | |
| 144 // To support old clients, the server only enforces this size. | |
| 145 // TODO(wtc): Replace it with kClientHelloMinimumSize when we drop support for | |
| 146 // QUIC_VERSION_12 clients. | |
| 147 const size_t kClientHelloMinimumSizeOld = 512; | |
| 148 | |
| 149 } // namespace net | 141 } // namespace net |
| 150 | 142 |
| 151 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 143 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
| OLD | NEW |