Return ERROR_INSUFFICIENT_OUTPUT_PROTECTION when appropriate
[ Merge from http://go/wvgerrit/17429 ] This is to correct for when HDCP validation failure at the OEMCrypto level ends up returning a CryptoException through MediaCrypto with error code Unknown Error (-2998). b/27849488 Change-Id: Ib3a9b1c3a17b9323f3d079a678cf88dedeec3b4b
This commit is contained in:
@@ -217,6 +217,11 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
||||
"Error decrypting data: unspecified error");
|
||||
// This error is actionable by the app and should be passed up.
|
||||
return mapCdmResponseType(res);
|
||||
} else if (res == wvcdm::INSUFFICIENT_OUTPUT_PROTECTION) {
|
||||
errorDetailMsg->setTo(
|
||||
"Error decrypting data: insufficient output protection");
|
||||
// This error is actionable by the app and should be passed up.
|
||||
return mapCdmResponseType(res);
|
||||
} else {
|
||||
// Swallow the specifics of other errors to obscure decrypt internals.
|
||||
return kErrorCDMGeneric;
|
||||
@@ -268,6 +273,11 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
||||
"Error decrypting data: unspecified error");
|
||||
// This error is actionable by the app and should be passed up.
|
||||
return mapCdmResponseType(res);
|
||||
} else if (res == wvcdm::INSUFFICIENT_OUTPUT_PROTECTION) {
|
||||
errorDetailMsg->setTo(
|
||||
"Error decrypting data: insufficient output protection");
|
||||
// This error is actionable by the app and should be passed up.
|
||||
return mapCdmResponseType(res);
|
||||
} else {
|
||||
// Swallow the specifics of other errors to obscure decrypt internals.
|
||||
return kErrorCDMGeneric;
|
||||
|
||||
Reference in New Issue
Block a user