| 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_crypto_stream.h" | 5 #include "net/quic/core/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/core/crypto/crypto_handshake.h" | 10 #include "net/quic/core/crypto/crypto_handshake.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 crypto_framer_.error_detail()); | 68 crypto_framer_.error_detail()); |
| 69 return; | 69 return; |
| 70 } | 70 } |
| 71 sequencer()->MarkConsumed(iov.iov_len); | 71 sequencer()->MarkConsumed(iov.iov_len); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 void QuicCryptoStream::SendHandshakeMessage( | 75 void QuicCryptoStream::SendHandshakeMessage( |
| 76 const CryptoHandshakeMessage& message) { | 76 const CryptoHandshakeMessage& message) { |
| 77 DVLOG(1) << ENDPOINT << "Sending " << message.DebugString(); | 77 DVLOG(1) << ENDPOINT << "Sending " << message.DebugString(); |
| 78 if (FLAGS_quic_neuter_unencrypted_when_sending) { | 78 session()->connection()->NeuterUnencryptedPackets(); |
| 79 session()->connection()->NeuterUnencryptedPackets(); | |
| 80 } | |
| 81 session()->OnCryptoHandshakeMessageSent(message); | 79 session()->OnCryptoHandshakeMessageSent(message); |
| 82 const QuicData& data = message.GetSerialized(); | 80 const QuicData& data = message.GetSerialized(); |
| 83 WriteOrBufferData(StringPiece(data.data(), data.length()), false, nullptr); | 81 WriteOrBufferData(StringPiece(data.data(), data.length()), false, nullptr); |
| 84 } | 82 } |
| 85 | 83 |
| 86 bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label, | 84 bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label, |
| 87 StringPiece context, | 85 StringPiece context, |
| 88 size_t result_len, | 86 size_t result_len, |
| 89 string* result) const { | 87 string* result) const { |
| 90 if (!handshake_confirmed()) { | 88 if (!handshake_confirmed()) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 107 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding", | 105 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding", |
| 108 /* context= */ "", 32, result); | 106 /* context= */ "", 32, result); |
| 109 } | 107 } |
| 110 | 108 |
| 111 const QuicCryptoNegotiatedParameters& | 109 const QuicCryptoNegotiatedParameters& |
| 112 QuicCryptoStream::crypto_negotiated_params() const { | 110 QuicCryptoStream::crypto_negotiated_params() const { |
| 113 return crypto_negotiated_params_; | 111 return crypto_negotiated_params_; |
| 114 } | 112 } |
| 115 | 113 |
| 116 } // namespace net | 114 } // namespace net |
| OLD | NEW |