Report When Decrypt Is Attempted With No Key Loaded
This merges change 43c7fda (Do Not Obscure wvcdm::NEED_KEY) from the Widevine repository. After this change, decrypt calls will return ERROR_DRM_NO_LICENSE if the CDM returns NEED_KEY. Bug: 10157154 Change-Id: I97b3a3990abeebb620ee4925fabf5c4261d968c4
This commit is contained in:
@@ -153,7 +153,8 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
|||||||
ALOGE("Decrypt error result in session %s during unencrypted block: %d",
|
ALOGE("Decrypt error result in session %s during unencrypted block: %d",
|
||||||
mSessionId.c_str(), res);
|
mSessionId.c_str(), res);
|
||||||
errorDetailMsg->setTo("Error decrypting data.");
|
errorDetailMsg->setTo("Error decrypting data.");
|
||||||
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES) {
|
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES ||
|
||||||
|
res == wvcdm::NEED_KEY) {
|
||||||
// This error is actionable by the app and should be passed up.
|
// This error is actionable by the app and should be passed up.
|
||||||
return mapCdmResponseType(res);
|
return mapCdmResponseType(res);
|
||||||
} else {
|
} else {
|
||||||
@@ -181,7 +182,8 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
|||||||
ALOGE("Decrypt error result in session %s during encrypted block: %d",
|
ALOGE("Decrypt error result in session %s during encrypted block: %d",
|
||||||
mSessionId.c_str(), res);
|
mSessionId.c_str(), res);
|
||||||
errorDetailMsg->setTo("Error decrypting data.");
|
errorDetailMsg->setTo("Error decrypting data.");
|
||||||
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES) {
|
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES ||
|
||||||
|
res == wvcdm::NEED_KEY) {
|
||||||
// This error is actionable by the app and should be passed up.
|
// This error is actionable by the app and should be passed up.
|
||||||
return mapCdmResponseType(res);
|
return mapCdmResponseType(res);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user