Return specific error code when decrypting on invalid session
bug: 22235465 Change-Id: I7b4d47d86d35270291ced02112a96800ba03ed1a
This commit is contained in:
@@ -185,6 +185,10 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
||||
errorDetailMsg->setTo("Error decrypting data: requested key has not been loaded");
|
||||
// This error is actionable by the app and should be passed up.
|
||||
return mapCdmResponseType(res);
|
||||
} else if (res == wvcdm::SESSION_NOT_FOUND_FOR_DECRYPT) {
|
||||
errorDetailMsg->setTo("Error decrypting data: session not found, possibly reclaimed");
|
||||
// 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