Merge "Fix OEMCrypto UsageTableTest.GenerateReportWrongPST" into qt-dev am: 127f87770c am: e4eef77a01

am: 8a104ddc65

Change-Id: Ifbb57ea1111add3c018a6c115f9337c5594d6b79
This commit is contained in:
Fred Gylys-Colwell
2019-05-14 16:56:10 -07:00
committed by android-build-merger

View File

@@ -1268,7 +1268,6 @@ void Session::GenerateReport(const std::string& pst,
ASSERT_EQ(OEMCrypto_ERROR_SHORT_BUFFER, sts);
}
if (sts == OEMCrypto_ERROR_SHORT_BUFFER) {
ASSERT_EQ(wvcdm::Unpacked_PST_Report::report_size(pst.length()), length);
pst_report_buffer_.assign(length, 0xFF); // Fill with garbage values.
}
sts = OEMCrypto_ReportUsage(session_id(),
@@ -1278,7 +1277,7 @@ void Session::GenerateReport(const std::string& pst,
if (expected_result != OEMCrypto_SUCCESS) {
return;
}
ASSERT_EQ(pst_report_buffer_.size(), length);
EXPECT_EQ(wvcdm::Unpacked_PST_Report::report_size(pst.length()), length);
vector<uint8_t> computed_signature(SHA_DIGEST_LENGTH);
unsigned int sig_len = SHA_DIGEST_LENGTH;
HMAC(EVP_sha1(), mac_key_client_.data(), mac_key_client_.size(),