| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/crypto/crypto_handshake_message.h" | 5 #include "net/quic/crypto/crypto_handshake_message.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
| 10 #include "net/quic/crypto/crypto_protocol.h" | 10 #include "net/quic/crypto/crypto_protocol.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 uint32 value; | 252 uint32 value; |
| 253 memcpy(&value, it->second.data(), sizeof(value)); | 253 memcpy(&value, it->second.data(), sizeof(value)); |
| 254 ret += base::UintToString(value); | 254 ret += base::UintToString(value); |
| 255 done = true; | 255 done = true; |
| 256 } | 256 } |
| 257 break; | 257 break; |
| 258 case kKEXS: | 258 case kKEXS: |
| 259 case kAEAD: | 259 case kAEAD: |
| 260 case kCGST: | 260 case kCGST: |
| 261 case kCOPT: | 261 case kCOPT: |
| 262 case kLOSS: | |
| 263 case kPDMD: | 262 case kPDMD: |
| 264 case kVER: | 263 case kVER: |
| 265 // tag lists | 264 // tag lists |
| 266 if (it->second.size() % sizeof(QuicTag) == 0) { | 265 if (it->second.size() % sizeof(QuicTag) == 0) { |
| 267 for (size_t j = 0; j < it->second.size(); j += sizeof(QuicTag)) { | 266 for (size_t j = 0; j < it->second.size(); j += sizeof(QuicTag)) { |
| 268 QuicTag tag; | 267 QuicTag tag; |
| 269 memcpy(&tag, it->second.data() + j, sizeof(tag)); | 268 memcpy(&tag, it->second.data() + j, sizeof(tag)); |
| 270 if (j > 0) { | 269 if (j > 0) { |
| 271 ret += ","; | 270 ret += ","; |
| 272 } | 271 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); | 314 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); |
| 316 } | 315 } |
| 317 ret += "\n"; | 316 ret += "\n"; |
| 318 } | 317 } |
| 319 --indent; | 318 --indent; |
| 320 ret += string(2 * indent, ' ') + ">"; | 319 ret += string(2 * indent, ' ') + ">"; |
| 321 return ret; | 320 return ret; |
| 322 } | 321 } |
| 323 | 322 |
| 324 } // namespace net | 323 } // namespace net |
| OLD | NEW |