Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: net/quic/quic_crypto_stream.cc

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_crypto_stream_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic_crypto_stream.h" 5 #include "net/quic/quic_crypto_stream.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 SendHandshakeMessage(message, nullptr); 65 SendHandshakeMessage(message, nullptr);
66 } 66 }
67 67
68 void QuicCryptoStream::SendHandshakeMessage( 68 void QuicCryptoStream::SendHandshakeMessage(
69 const CryptoHandshakeMessage& message, 69 const CryptoHandshakeMessage& message,
70 QuicAckListenerInterface* listener) { 70 QuicAckListenerInterface* listener) {
71 DVLOG(1) << ENDPOINT << "Sending " << message.DebugString(); 71 DVLOG(1) << ENDPOINT << "Sending " << message.DebugString();
72 session()->OnCryptoHandshakeMessageSent(message); 72 session()->OnCryptoHandshakeMessageSent(message);
73 const QuicData& data = message.GetSerialized(); 73 const QuicData& data = message.GetSerialized();
74 // TODO(wtc): check the return value. 74 // TODO(wtc): check the return value.
75 WriteOrBufferData(string(data.data(), data.length()), false, listener); 75 WriteOrBufferData(StringPiece(data.data(), data.length()), false, listener);
76 } 76 }
77 77
78 bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label, 78 bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label,
79 StringPiece context, 79 StringPiece context,
80 size_t result_len, 80 size_t result_len,
81 string* result) const { 81 string* result) const {
82 if (!handshake_confirmed()) { 82 if (!handshake_confirmed()) {
83 DLOG(ERROR) << "ExportKeyingMaterial was called before forward-secure" 83 DLOG(ERROR) << "ExportKeyingMaterial was called before forward-secure"
84 << "encryption was established."; 84 << "encryption was established.";
85 return false; 85 return false;
(...skipping 13 matching lines...) Expand all
99 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding", 99 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding",
100 /* context= */ "", 32, result); 100 /* context= */ "", 32, result);
101 } 101 }
102 102
103 const QuicCryptoNegotiatedParameters& 103 const QuicCryptoNegotiatedParameters&
104 QuicCryptoStream::crypto_negotiated_params() const { 104 QuicCryptoStream::crypto_negotiated_params() const {
105 return crypto_negotiated_params_; 105 return crypto_negotiated_params_;
106 } 106 }
107 107
108 } // namespace net 108 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_crypto_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698