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..712a4d2cbb1454dd5b5d1ebf574dc0a912397ceb 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 int kSampleOutputLength = 32; |
dmz
2014/07/30 17:58:26
Do you want to use size_t here like you suggested
wtc
2014/07/30 18:09:35
Done. Originally I wanted to see if it caused a co
|
+ 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 |