Correct error returned when license is for the future
[ Merge of http://go/wvgerrit/25721 ] Return CryptoException with errorCode ERROR_NO_KEY when an attempt is made to make use of a license whose start time is in the future. Test: Verified by WidevineDashPolicyTests#testL1LicenseStart2030 b/31914841 Change-Id: I2a157c227550a2391b6536365f34f1dfec3dea0c
This commit is contained in:
@@ -42,7 +42,6 @@ enum {
|
||||
kCryptoSessionOpenError3 = ERROR_DRM_VENDOR_MIN + 26,
|
||||
kCryptoSessionOpenError4 = ERROR_DRM_VENDOR_MIN + 27,
|
||||
kCryptoSessionOpenError5 = ERROR_DRM_VENDOR_MIN + 28,
|
||||
kDecyrptNotReady = ERROR_DRM_VENDOR_MIN + 29,
|
||||
kDeviceCertificateError1 = ERROR_DRM_VENDOR_MIN + 30,
|
||||
kDeviceCertificateError2 = ERROR_DRM_VENDOR_MIN + 31,
|
||||
kDeviceCertificateError3 = ERROR_DRM_VENDOR_MIN + 32,
|
||||
|
||||
@@ -22,6 +22,7 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
// success messages for certain CDM methods instead of NO_ERROR.
|
||||
return android::OK;
|
||||
case wvcdm::NEED_KEY:
|
||||
case wvcdm::DECRYPT_NOT_READY:
|
||||
return android::ERROR_DRM_NO_LICENSE;
|
||||
case wvcdm::NEED_PROVISIONING:
|
||||
return android::ERROR_DRM_NOT_PROVISIONED;
|
||||
@@ -71,8 +72,6 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kCryptoSessionOpenError4;
|
||||
case wvcdm::CRYPTO_SESSION_OPEN_ERROR_5:
|
||||
return kCryptoSessionOpenError5;
|
||||
case wvcdm::DECRYPT_NOT_READY:
|
||||
return kDecyrptNotReady;
|
||||
case wvcdm::DEVICE_CERTIFICATE_ERROR_1:
|
||||
return kDeviceCertificateError1;
|
||||
case wvcdm::DEVICE_CERTIFICATE_ERROR_2:
|
||||
|
||||
Reference in New Issue
Block a user