Detect when unable to meet policy requirements
[ Merge of http://go/wvgerrit/25781 ] The security level (software/hardware, decryption/decode) in the policy that specified how the key was to be used was not being respected for L3. Playback would either continue or a vendor specific error would be thrown. If the device cannot use the key as permitted by the policy CryptoException#ERROR_INSUFFICIENT_OUTPUT_PROTECTION will be thrown. Test: Verified by WV unit+integration tests. Verified by WidevineDashPolicyTests Verified by WidevineDashPolicyTests#testL3SoftwareSecureDecoderRequired, testL3HardwareSecureCryptoRequired, testL3HardwareSecureDecodeRequired, testL3SecureVideoPathRequired. b/31913737 b/31913439 Change-Id: Ibfc7f3dd6fc7264e8cf9b0d33f6f8d619eed6c00
This commit is contained in:
@@ -322,9 +322,14 @@ status_t WVCryptoPlugin::attemptDecrypt(const CdmDecryptionParameters& params,
|
||||
"Error decrypting data: unspecified error");
|
||||
break;
|
||||
case wvcdm::INSUFFICIENT_OUTPUT_PROTECTION:
|
||||
case wvcdm::ANALOG_OUTPUT_ERROR:
|
||||
errorDetailMsg->setTo(
|
||||
"Error decrypting data: insufficient output protection");
|
||||
break;
|
||||
case wvcdm::KEY_PROHIBITED_FOR_SECURITY_LEVEL:
|
||||
errorDetailMsg->setTo(
|
||||
"Error decrypting data: key prohibited for security level");
|
||||
break;
|
||||
default:
|
||||
actionableError = false;
|
||||
break;
|
||||
|
||||
@@ -354,9 +354,14 @@ status_t WVCryptoPlugin::attemptDecrypt(const CdmDecryptionParameters& params,
|
||||
"Error decrypting data: unspecified error");
|
||||
break;
|
||||
case wvcdm::INSUFFICIENT_OUTPUT_PROTECTION:
|
||||
case wvcdm::ANALOG_OUTPUT_ERROR:
|
||||
errorDetailMsg->assign(
|
||||
"Error decrypting data: insufficient output protection");
|
||||
break;
|
||||
case wvcdm::KEY_PROHIBITED_FOR_SECURITY_LEVEL:
|
||||
errorDetailMsg->assign(
|
||||
"Error decrypting data: key prohibited for security level");
|
||||
break;
|
||||
default:
|
||||
actionableError = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user