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.h" | 5 #include "net/quic/crypto/crypto_handshake_message.h" |
6 | 6 |
7 #include <ctype.h> | |
8 | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
11 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_split.h" | |
13 #include "crypto/secure_hash.h" | |
14 #include "net/base/net_util.h" | |
15 #include "net/quic/crypto/common_cert_set.h" | |
16 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
17 #include "net/quic/crypto/key_exchange.h" | 10 #include "net/quic/crypto/crypto_protocol.h" |
18 #include "net/quic/crypto/quic_decrypter.h" | |
19 #include "net/quic/crypto/quic_encrypter.h" | |
20 #include "net/quic/crypto/quic_random.h" | |
21 #include "net/quic/quic_protocol.h" | |
22 #include "net/quic/quic_utils.h" | 11 #include "net/quic/quic_utils.h" |
23 | 12 |
24 using base::StringPiece; | 13 using base::StringPiece; |
25 using base::StringPrintf; | 14 using base::StringPrintf; |
26 using std::string; | 15 using std::string; |
27 using std::vector; | 16 using std::vector; |
28 | 17 |
29 namespace net { | 18 namespace net { |
30 | 19 |
31 CryptoHandshakeMessage::CryptoHandshakeMessage() | 20 CryptoHandshakeMessage::CryptoHandshakeMessage() |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // then just use hex. | 303 // then just use hex. |
315 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); | 304 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); |
316 } | 305 } |
317 ret += "\n"; | 306 ret += "\n"; |
318 } | 307 } |
319 --indent; | 308 --indent; |
320 ret += string(2 * indent, ' ') + ">"; | 309 ret += string(2 * indent, ' ') + ">"; |
321 return ret; | 310 return ret; |
322 } | 311 } |
323 | 312 |
324 QuicCryptoNegotiatedParameters::QuicCryptoNegotiatedParameters() | |
325 : key_exchange(0), | |
326 aead(0) { | |
327 } | |
328 | |
329 QuicCryptoNegotiatedParameters::~QuicCryptoNegotiatedParameters() {} | |
330 | |
331 CrypterPair::CrypterPair() {} | |
332 | |
333 CrypterPair::~CrypterPair() {} | |
334 | |
335 // static | |
336 const char QuicCryptoConfig::kInitialLabel[] = "QUIC key expansion"; | |
337 | |
338 // static | |
339 const char QuicCryptoConfig::kCETVLabel[] = "QUIC CETV block"; | |
340 | |
341 // static | |
342 const char QuicCryptoConfig::kForwardSecureLabel[] = | |
343 "QUIC forward secure key expansion"; | |
344 | |
345 QuicCryptoConfig::QuicCryptoConfig() | |
346 : common_cert_sets(CommonCertSets::GetInstanceQUIC()) { | |
347 } | |
348 | |
349 QuicCryptoConfig::~QuicCryptoConfig() {} | |
350 | |
351 } // namespace net | 313 } // namespace net |
OLD | NEW |