Merges to android Pi release (part 2)
These are a set of CLs merged from the wv cdm repo to the android repo. * Update service certificate. Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/28065 ] The updated service certificate fixes a number of failing tests. There are still some that fail, apparently due to mismatches with key set IDs and usage tables. Also updated QA server URL to point to QA proxy (although neither can be used by this client). Also fixed segfault in CdmTest.ListUsageRecords. * Add CDM APIs for Handling Service Certificates. Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/28064 ] The responsibility for managing Service Certificates has been moved out of the CDM. Instead, provide CDM and CdmEngine methods to generate a service certificate request message, and handle a service certificate response. The API client can use these calls if it needs to get the service certificate from the License Server. These functions assume the request and response are base64 (web-safe) encoded (see b/37481392). Not all servers are operating this way yet. Any adaptations for non-compliant servers is handled outside the CDM. See test WvCdmEnginePreProvTest::ServiceCertificateRequestResponse in cdm_engine_test.cpp for an example of this. These changes also eliminate the stored init_data and deferred license type which were used to perform a service certificate request during a license request. * Fix and rename ClosesSessionWithoutReturningError test. Author: Edwin Wong <edwinwong@google.com> [ Merge of http://go/wvgerrit/27880 ] ClosesSessionWithoutReturningError should not check for Status::OK since it is expecting an error code back. The test is renamed to ClosesSessionWithError. Test: libwvdrmdrmplugin_hidl_test BUG: 62205215 * Get rid of default service certificate. Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/27981 ] Instead, we need at least two service certs - one for the QA/Test servers, and one for UAT (and prod?) There are still some issues around the signature verififcation of the service cert, and in license_unittest.cpp, the use of the default service cert has been commented out. I don't know why this test needs a service cert. If it really does, then the same mechanism that is used elsewhere for selecting a specific server type will be needed here. BUG: 71650075 Test: Not currently passing. Will be addressed in a subsequent commit in the chain. Change-Id: Ieab815fb202c809ad5714cd0364c4bdfa068f77d
This commit is contained in:
@@ -264,10 +264,19 @@ enum {
|
||||
kDeleteUsageError1 = ERROR_DRM_VENDOR_MIN + 252,
|
||||
kDeleteUsageError2 = ERROR_DRM_VENDOR_MIN + 253,
|
||||
kDeleteUsageError3 = ERROR_DRM_VENDOR_MIN + 254,
|
||||
kPrivacyModeError1 = ERROR_DRM_VENDOR_MIN + 255,
|
||||
kPrivacyModeError2 = ERROR_DRM_VENDOR_MIN + 256,
|
||||
kPrivacyModeError3 = ERROR_DRM_VENDOR_MIN + 257,
|
||||
kEmptyResponseError1 = ERROR_DRM_VENDOR_MIN + 258,
|
||||
kInvalidParametersEng24 = ERROR_DRM_VENDOR_MIN + 259,
|
||||
kParseResponseError1 = ERROR_DRM_VENDOR_MIN + 260,
|
||||
kParseResponseError2 = ERROR_DRM_VENDOR_MIN + 261,
|
||||
kParseResponseError3 = ERROR_DRM_VENDOR_MIN + 262,
|
||||
kParseResponseError4 = ERROR_DRM_VENDOR_MIN + 263,
|
||||
|
||||
// This should always follow the last error code.
|
||||
// The offset value should be updated each time a new error code is added.
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 254,
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 263,
|
||||
|
||||
// Used by crypto test mode
|
||||
kErrorTestMode = ERROR_DRM_VENDOR_MAX,
|
||||
|
||||
@@ -288,12 +288,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kUnsupportedInitData;
|
||||
case wvcdm::USAGE_INFO_NOT_FOUND:
|
||||
return kUsageInfoNotFound;
|
||||
case wvcdm::LICENSE_RENEWAL_SERVICE_CERTIFICATE_GENERATION_ERROR:
|
||||
return kLicenseRenewalServiceCertificateGenerationError;
|
||||
case wvcdm::PARSE_SERVICE_CERTIFICATE_ERROR:
|
||||
return kParseServiceCertificateError;
|
||||
case wvcdm::SERVICE_CERTIFICATE_TYPE_ERROR:
|
||||
return kServiceCertificateTypeError;
|
||||
case wvcdm::CLIENT_ID_GENERATE_RANDOM_ERROR:
|
||||
return kClientIdGenerateRandomError;
|
||||
case wvcdm::CLIENT_ID_AES_INIT_ERROR:
|
||||
@@ -322,8 +318,6 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kInvalidParametersLic6;
|
||||
case wvcdm::INVALID_PARAMETERS_LIC_7:
|
||||
return kInvalidParametersLic7;
|
||||
case wvcdm::LICENSE_REQUEST_SERVICE_CERTIFICATE_GENERATION_ERROR:
|
||||
return kLicenseRequestServiceCertificateGenerationError;
|
||||
case wvcdm::CENC_INIT_DATA_UNAVAILABLE:
|
||||
return kCencInitDataUnavailable;
|
||||
case wvcdm::PREPARE_CENC_CONTENT_ID_FAILED:
|
||||
@@ -413,6 +407,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kInvalidParametersEng17;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_18:
|
||||
return kInvalidParametersEng18;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_19:
|
||||
return kInvalidParametersEng19;
|
||||
case wvcdm::CERT_PROVISIONING_CLIENT_TOKEN_ERROR_1:
|
||||
return kCertProvisioningClientTokenError1;
|
||||
case wvcdm::CERT_PROVISIONING_CLIENT_TOKEN_ERROR_2:
|
||||
@@ -443,8 +439,6 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kLoadUsageEntrySignatureFailure;
|
||||
case wvcdm::LOAD_USAGE_ENTRY_UNKNOWN_ERROR:
|
||||
return kLoadUsageEntryUnknownError;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_19:
|
||||
return kInvalidParametersEng19;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_20:
|
||||
return kInvalidParametersEng20;
|
||||
case wvcdm::UPDATE_USAGE_ENTRY_UNKNOWN_ERROR:
|
||||
@@ -461,6 +455,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kCopyOldUsageEntryUnknownError;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_23:
|
||||
return kInvalidParametersEng23;
|
||||
case wvcdm::INVALID_PARAMETERS_ENG_24:
|
||||
return kInvalidParametersEng24;
|
||||
case wvcdm::USAGE_INFORMATION_SUPPORT_FAILED:
|
||||
return kUsageInformationSupportFailed;
|
||||
case wvcdm::USAGE_SUPPORT_GET_API_FAILED:
|
||||
@@ -513,6 +509,22 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kDeleteUsageError2;
|
||||
case wvcdm::DELETE_USAGE_ERROR_3:
|
||||
return kDeleteUsageError3;
|
||||
case wvcdm::PRIVACY_MODE_ERROR_1:
|
||||
return kPrivacyModeError1;
|
||||
case wvcdm::PRIVACY_MODE_ERROR_2:
|
||||
return kPrivacyModeError2;
|
||||
case wvcdm::PRIVACY_MODE_ERROR_3:
|
||||
return kPrivacyModeError3;
|
||||
case wvcdm::EMPTY_RESPONSE_ERROR_1:
|
||||
return kEmptyResponseError1;
|
||||
case wvcdm::PARSE_RESPONSE_ERROR_1:
|
||||
return kParseResponseError1;
|
||||
case wvcdm::PARSE_RESPONSE_ERROR_2:
|
||||
return kParseResponseError2;
|
||||
case wvcdm::PARSE_RESPONSE_ERROR_3:
|
||||
return kParseResponseError3;
|
||||
case wvcdm::PARSE_RESPONSE_ERROR_4:
|
||||
return kParseResponseError4;
|
||||
|
||||
case wvcdm::UNUSED_1:
|
||||
case wvcdm::UNUSED_2:
|
||||
@@ -521,6 +533,9 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
case wvcdm::UNUSED_5:
|
||||
case wvcdm::UNUSED_6:
|
||||
case wvcdm::UNUSED_7:
|
||||
case wvcdm::UNUSED_8:
|
||||
case wvcdm::UNUSED_9:
|
||||
case wvcdm::UNUSED_10:
|
||||
return android::UNKNOWN_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user