Do not verify decrypt hash when no key selected
Merge from Widevine repo of http://go/wvgerrit/101143 This CL removes the check for a decrypt hash error when CopyBuffer is used instead of DecryptCenc because a key was not selected. We also remove the attempt to check the decrypt hash when there are multiple buffers, because that is not well defined behavior. Bug: 155185867 Bug: 155192141 Test: ran unit tests on taimen and on v16 reference oemcrypto Change-Id: I640e904e256f0913ca606bb5db891430b23f44a3
This commit is contained in:
@@ -2203,10 +2203,11 @@ class OEMCryptoSessionTestsDecryptTests
|
|||||||
void TestDecryptCENC() {
|
void TestDecryptCENC() {
|
||||||
OEMCryptoResult sts;
|
OEMCryptoResult sts;
|
||||||
|
|
||||||
|
// OEMCrypto only supports providing a decrypt hash for one sample.
|
||||||
|
if (samples_.size() > 1) verify_crc_ = false;
|
||||||
|
|
||||||
// If supported, check the decrypt hashes.
|
// If supported, check the decrypt hashes.
|
||||||
if (verify_crc_) {
|
if (verify_crc_) {
|
||||||
// OEMCrypto only supports providing a decrypt hash for the first sample
|
|
||||||
// in the sample array.
|
|
||||||
const TestSample& sample = samples_[0];
|
const TestSample& sample = samples_[0];
|
||||||
|
|
||||||
uint32_t hash =
|
uint32_t hash =
|
||||||
@@ -2261,7 +2262,7 @@ class OEMCryptoSessionTestsDecryptTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (global_features.supports_crc) {
|
if (verify_crc_) {
|
||||||
uint32_t frame;
|
uint32_t frame;
|
||||||
ASSERT_EQ(OEMCrypto_GetHashErrorCode(session_.session_id(), &frame),
|
ASSERT_EQ(OEMCrypto_GetHashErrorCode(session_.session_id(), &frame),
|
||||||
OEMCrypto_SUCCESS);
|
OEMCrypto_SUCCESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user