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

Unified Diff: net/quic/core/quic_crypto_stream.cc

Issue 2453113002: Fix object-lifetime issues in async GetProof callpaths (Closed)
Patch Set: Updated patchset dependency Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_crypto_stream.h ('k') | net/quic/core/quic_server_session_base_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_stream.cc
diff --git a/net/quic/core/quic_crypto_stream.cc b/net/quic/core/quic_crypto_stream.cc
index fcb5397ce4dff73b42f78e8a29bf4366d6c320a1..828417c62f9405d7532d2b25cea015f5985b0483 100644
--- a/net/quic/core/quic_crypto_stream.cc
+++ b/net/quic/core/quic_crypto_stream.cc
@@ -27,12 +27,15 @@ namespace net {
QuicCryptoStream::QuicCryptoStream(QuicSession* session)
: ReliableQuicStream(kCryptoStreamId, session),
encryption_established_(false),
- handshake_confirmed_(false) {
+ handshake_confirmed_(false),
+ crypto_negotiated_params_(new QuicCryptoNegotiatedParameters) {
crypto_framer_.set_visitor(this);
// The crypto stream is exempt from connection level flow control.
DisableConnectionFlowControlForThisStream();
}
+QuicCryptoStream::~QuicCryptoStream() {}
+
// static
QuicByteCount QuicCryptoStream::CryptoMessageFramingOverhead(
QuicVersion version) {
@@ -98,7 +101,7 @@ bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label,
return false;
}
return CryptoUtils::ExportKeyingMaterial(
- crypto_negotiated_params_.subkey_secret, label, context, result_len,
+ crypto_negotiated_params_->subkey_secret, label, context, result_len,
result);
}
@@ -109,13 +112,14 @@ bool QuicCryptoStream::ExportTokenBindingKeyingMaterial(string* result) const {
return false;
}
return CryptoUtils::ExportKeyingMaterial(
- crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding",
+ crypto_negotiated_params_->initial_subkey_secret,
+ "EXPORTER-Token-Binding",
/* context= */ "", 32, result);
}
const QuicCryptoNegotiatedParameters&
QuicCryptoStream::crypto_negotiated_params() const {
- return crypto_negotiated_params_;
+ return *crypto_negotiated_params_;
}
} // namespace net
« no previous file with comments | « net/quic/core/quic_crypto_stream.h ('k') | net/quic/core/quic_server_session_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698