Index: net/quic/quic_crypto_stream.cc |
diff --git a/net/quic/quic_crypto_stream.cc b/net/quic/quic_crypto_stream.cc |
index 36b7c4550a28107895145d5e59837ccf0dfffbdd..d53b736527f964fc6af2499c4caf27a288963a60 100644 |
--- a/net/quic/quic_crypto_stream.cc |
+++ b/net/quic/quic_crypto_stream.cc |
@@ -8,6 +8,7 @@ |
#include "base/strings/string_piece.h" |
#include "net/quic/crypto/crypto_handshake.h" |
+#include "net/quic/crypto/crypto_utils.h" |
#include "net/quic/quic_connection.h" |
#include "net/quic/quic_session.h" |
#include "net/quic/quic_utils.h" |
@@ -62,6 +63,24 @@ void QuicCryptoStream::SendHandshakeMessage( |
WriteOrBufferData(string(data.data(), data.length()), false, NULL); |
} |
+bool QuicCryptoStream::ExportKeyingMaterial( |
+ StringPiece label, |
+ StringPiece context, |
+ size_t result_len, |
+ string* result) const { |
+ if (!handshake_confirmed()) { |
+ DLOG(ERROR) << "ExportKeyingMaterial was called before forward-secure" |
+ << "encryption was established."; |
+ return false; |
+ } |
+ return CryptoUtils::ExportKeyingMaterial( |
+ crypto_negotiated_params_.subkey_secret, |
+ label, |
+ context, |
+ result_len, |
+ result); |
+} |
+ |
const QuicCryptoNegotiatedParameters& |
QuicCryptoStream::crypto_negotiated_params() const { |
return crypto_negotiated_params_; |