Throw DeniedByServerException when provisioning detects a revoked device

[ Merge of http://go/wvgerrit/117267 ]

The client will now advertise the ability to handle provisioning errors
by a minor version updated to the provisioning protocol version.
The provisioning service may indicate that the individual device
is revoked or all devices with the same make/model have been revoked.

If the provisoning service has not been upgraded, the protocol version
field in the request will be ignored. The provisioning service/SDK
will respond with an HTTP 400 error to a provisioning request from
a revoked device.

Bug: 174174765
Test: WvCdmRequestLicenseTest.ProvisioningRevocationTest,
      WV unit/integration tests
Change-Id: I5ff61496685f310de6704a90452b8b76b3505cbb
This commit is contained in:
Rahul Frias
2021-02-18 03:27:27 -08:00
parent 41ecde78cc
commit 64d5b38ff5
7 changed files with 149 additions and 1 deletions

View File

@@ -359,6 +359,7 @@ static Status mapCdmResponseType_1_0(wvcdm::CdmResponseType res) {
case wvcdm::PROVISIONING_NOT_ALLOWED_FOR_ATSC:
case wvcdm::NO_SRM_VERSION:
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_9:
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_10:
ALOGW("Returns UNKNOWN error for legacy status: %d", res);
return Status::ERROR_DRM_UNKNOWN;
@@ -650,6 +651,11 @@ static S mapCdmResponseType(wvcdm::CdmResponseType res) {
case wvcdm::LOAD_PROVISIONING_ERROR:
err = ::drm::V1_4::Status::PROVISIONING_PARSE_ERROR;
break;
/* TODO (b/180579631): Uncomment when DRM Status type
* PROVISIONING_REQUEST_REJECTED has been created
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_10:
err = ::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED;
*/
case wvcdm::EMPTY_PROVISIONING_CERTIFICATE_1:
case wvcdm::EMPTY_PROVISIONING_CERTIFICATE_2:
err = ::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR;