Index: net/quic/test_tools/crypto_test_utils.cc |
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc |
index ca0681ac5b317f8c055628e79aacc01cdda04a5e..0e3a81517a7745ec49fd36ac130d6bf1bbff02c6 100644 |
--- a/net/quic/test_tools/crypto_test_utils.cc |
+++ b/net/quic/test_tools/crypto_test_utils.cc |
@@ -452,6 +452,26 @@ void CryptoTestUtils::CompareClientAndServerKeys( |
StringPiece server_forward_secure_decrypter_iv = |
server_forward_secure_decrypter->GetNoncePrefix(); |
+ StringPiece client_subkey_secret = |
+ client->crypto_negotiated_params().subkey_secret; |
+ StringPiece server_subkey_secret = |
+ server->crypto_negotiated_params().subkey_secret; |
+ |
+ |
+ const char kSampleLabel[] = "label"; |
+ const char kSampleContext[] = "context"; |
+ const size_t kSampleOutputLength = 32; |
+ string client_key_extraction; |
+ string server_key_extraction; |
+ EXPECT_TRUE(client->ExportKeyingMaterial(kSampleLabel, |
+ kSampleContext, |
+ kSampleOutputLength, |
+ &client_key_extraction)); |
+ EXPECT_TRUE(server->ExportKeyingMaterial(kSampleLabel, |
+ kSampleContext, |
+ kSampleOutputLength, |
+ &server_key_extraction)); |
+ |
CompareCharArraysWithHexError("client write key", |
client_encrypter_key.data(), |
client_encrypter_key.length(), |
@@ -492,6 +512,16 @@ void CryptoTestUtils::CompareClientAndServerKeys( |
server_forward_secure_encrypter_iv.length(), |
client_forward_secure_decrypter_iv.data(), |
client_forward_secure_decrypter_iv.length()); |
+ CompareCharArraysWithHexError("subkey secret", |
+ client_subkey_secret.data(), |
+ client_subkey_secret.length(), |
+ server_subkey_secret.data(), |
+ server_subkey_secret.length()); |
+ CompareCharArraysWithHexError("sample key extraction", |
+ client_key_extraction.data(), |
+ client_key_extraction.length(), |
+ server_key_extraction.data(), |
+ server_key_extraction.length()); |
} |
// static |