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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 const QuicTag kEXPY = TAG('E', 'X', 'P', 'Y'); // Expiry | 93 const QuicTag kEXPY = TAG('E', 'X', 'P', 'Y'); // Expiry |
94 // TODO(rjshade): Remove kIFCW when removing QUIC_VERSION_19. | 94 // TODO(rjshade): Remove kIFCW when removing QUIC_VERSION_19. |
95 const QuicTag kIFCW = TAG('I', 'F', 'C', 'W'); // Initial flow control receive | 95 const QuicTag kIFCW = TAG('I', 'F', 'C', 'W'); // Initial flow control receive |
96 // window. | 96 // window. |
97 const QuicTag kSFCW = TAG('S', 'F', 'C', 'W'); // Initial stream flow control | 97 const QuicTag kSFCW = TAG('S', 'F', 'C', 'W'); // Initial stream flow control |
98 // receive window. | 98 // receive window. |
99 const QuicTag kCFCW = TAG('C', 'F', 'C', 'W'); // Initial session/connection | 99 const QuicTag kCFCW = TAG('C', 'F', 'C', 'W'); // Initial session/connection |
100 // flow control receive window. | 100 // flow control receive window. |
101 const QuicTag kUAID = TAG('U', 'A', 'I', 'D'); // Client's User Agent ID. | 101 const QuicTag kUAID = TAG('U', 'A', 'I', 'D'); // Client's User Agent ID. |
102 | 102 |
| 103 // Rejection tags |
| 104 const QuicTag kRREJ = TAG('R', 'R', 'E', 'J'); // Reasons for server sending |
| 105 // rejection message tag. |
| 106 |
103 // Server hello tags | 107 // Server hello tags |
104 const QuicTag kCADR = TAG('C', 'A', 'D', 'R'); // Client IP address and port | 108 const QuicTag kCADR = TAG('C', 'A', 'D', 'R'); // Client IP address and port |
105 | 109 |
106 // CETV tags | 110 // CETV tags |
107 const QuicTag kCIDK = TAG('C', 'I', 'D', 'K'); // ChannelID key | 111 const QuicTag kCIDK = TAG('C', 'I', 'D', 'K'); // ChannelID key |
108 const QuicTag kCIDS = TAG('C', 'I', 'D', 'S'); // ChannelID signature | 112 const QuicTag kCIDS = TAG('C', 'I', 'D', 'S'); // ChannelID signature |
109 | 113 |
110 // Public reset tags | 114 // Public reset tags |
111 const QuicTag kRNON = TAG('R', 'N', 'O', 'N'); // Public reset nonce proof | 115 const QuicTag kRNON = TAG('R', 'N', 'O', 'N'); // Public reset nonce proof |
112 const QuicTag kRSEQ = TAG('R', 'S', 'E', 'Q'); // Rejected sequence number | 116 const QuicTag kRSEQ = TAG('R', 'S', 'E', 'Q'); // Rejected sequence number |
113 | 117 |
114 // Universal tags | 118 // Universal tags |
115 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding | 119 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding |
116 | 120 |
117 // Reasons for server sending rejection message tag. | |
118 const QuicTag kRREJ = TAG('R', 'R', 'E', 'J'); | |
119 | |
120 // These tags have a special form so that they appear either at the beginning | 121 // These tags have a special form so that they appear either at the beginning |
121 // or the end of a handshake message. Since handshake messages are sorted by | 122 // or the end of a handshake message. Since handshake messages are sorted by |
122 // tag value, the tags with 0 at the end will sort first and those with 255 at | 123 // tag value, the tags with 0 at the end will sort first and those with 255 at |
123 // the end will sort last. | 124 // the end will sort last. |
124 // | 125 // |
125 // The certificate chain should have a tag that will cause it to be sorted at | 126 // The certificate chain should have a tag that will cause it to be sorted at |
126 // the end of any handshake messages because it's likely to be large and the | 127 // the end of any handshake messages because it's likely to be large and the |
127 // client might be able to get everything that it needs from the small values at | 128 // client might be able to get everything that it needs from the small values at |
128 // the beginning. | 129 // the beginning. |
129 // | 130 // |
(...skipping 26 matching lines...) Expand all Loading... |
156 // amplification factor of any mirror DoS attack. | 157 // amplification factor of any mirror DoS attack. |
157 // | 158 // |
158 // A client may pad an inchoate client hello to a size larger than | 159 // A client may pad an inchoate client hello to a size larger than |
159 // kClientHelloMinimumSize to make it more likely to receive a complete | 160 // kClientHelloMinimumSize to make it more likely to receive a complete |
160 // rejection message. | 161 // rejection message. |
161 const size_t kClientHelloMinimumSize = 1024; | 162 const size_t kClientHelloMinimumSize = 1024; |
162 | 163 |
163 } // namespace net | 164 } // namespace net |
164 | 165 |
165 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 166 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
OLD | NEW |