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 #include "net/quic/core/quic_framer.h" | 5 #include "net/quic/core/quic_framer.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 class TestDecrypter : public QuicDecrypter { | 152 class TestDecrypter : public QuicDecrypter { |
153 public: | 153 public: |
154 ~TestDecrypter() override {} | 154 ~TestDecrypter() override {} |
155 bool SetKey(StringPiece key) override { return true; } | 155 bool SetKey(StringPiece key) override { return true; } |
156 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; } | 156 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; } |
157 bool SetPreliminaryKey(StringPiece key) override { | 157 bool SetPreliminaryKey(StringPiece key) override { |
158 QUIC_BUG << "should not be called"; | 158 QUIC_BUG << "should not be called"; |
159 return false; | 159 return false; |
160 } | 160 } |
161 bool SetDiversificationNonce(DiversificationNonce key) override { | 161 bool SetDiversificationNonce(const DiversificationNonce& key) override { |
162 return true; | 162 return true; |
163 } | 163 } |
164 bool DecryptPacket(QuicPathId path_id, | 164 bool DecryptPacket(QuicPathId path_id, |
165 QuicPacketNumber packet_number, | 165 QuicPacketNumber packet_number, |
166 StringPiece associated_data, | 166 StringPiece associated_data, |
167 StringPiece ciphertext, | 167 StringPiece ciphertext, |
168 char* output, | 168 char* output, |
169 size_t* output_length, | 169 size_t* output_length, |
170 size_t max_output_length) override { | 170 size_t max_output_length) override { |
171 path_id_ = path_id; | 171 path_id_ = path_id; |
(...skipping 7095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7267 'o', ' ', 'w', 'o', | 7267 'o', ' ', 'w', 'o', |
7268 'r', 'l', 'd', '!', | 7268 'r', 'l', 'd', '!', |
7269 }; | 7269 }; |
7270 // clang-format on | 7270 // clang-format on |
7271 | 7271 |
7272 QuicFramerFuzzFunc(packet, arraysize(packet)); | 7272 QuicFramerFuzzFunc(packet, arraysize(packet)); |
7273 } | 7273 } |
7274 | 7274 |
7275 } // namespace test | 7275 } // namespace test |
7276 } // namespace net | 7276 } // namespace net |
OLD | NEW |