diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 06:58:58 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 06:58:58 +0000 |
commit | 7e392f35915f9278e1105ee25eca1c898eb12593 (patch) | |
tree | 5e1fa95cd0c021982a2d8538e3d98e223dc5aa38 /net/quic | |
parent | 618ca947018a99e849eb392615536e6cfda2e673 (diff) | |
download | chromium_src-7e392f35915f9278e1105ee25eca1c898eb12593.zip chromium_src-7e392f35915f9278e1105ee25eca1c898eb12593.tar.gz chromium_src-7e392f35915f9278e1105ee25eca1c898eb12593.tar.bz2 |
Log QUIC crypto handshake tag values in the "correct" format.
Merge internal change: 57615802
Review URL: https://codereview.chromium.org/100473003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic')
-rw-r--r-- | net/quic/crypto/crypto_handshake.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/quic/crypto/crypto_handshake.cc b/net/quic/crypto/crypto_handshake.cc index 6ded31c..056272e 100644 --- a/net/quic/crypto/crypto_handshake.cc +++ b/net/quic/crypto/crypto_handshake.cc @@ -249,8 +249,11 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { bool done = false; switch (it->first) { + case kICSL: + case kIRTT: case kKATO: - case kVERS: + case kMSPC: + case kSWND: // uint32 value if (it->second.size() == 4) { uint32 value; @@ -259,6 +262,15 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { done = true; } break; + case kVERS: + // uint16 value + if (it->second.size() == 2) { + uint16 value; + memcpy(&value, it->second.data(), sizeof(value)); + ret += base::UintToString(value); + done = true; + } + break; case kKEXS: case kAEAD: case kCGST: @@ -272,7 +284,7 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { if (j > 0) { ret += ","; } - ret += QuicUtils::TagToString(tag); + ret += "'" + QuicUtils::TagToString(tag) + "'"; } done = true; } @@ -300,7 +312,7 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const { if (!done) { // If there's no specific format for this tag, or the value is invalid, // then just use hex. - ret += base::HexEncode(it->second.data(), it->second.size()); + ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); } ret += "\n"; } |