Enable the CDM to track the DRM private key type.

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

The CDM is responsible for telling OEMCrypto the underlying DRM
private key type when loading it into a session.  To do this, the
CDM must determine and store the key type of a successfully loaded
provisioning response.  The type of key is available from the
DRM certificate proto that is provided in the reponse.

This change introduces a class to contain the wrapped key and
type together.  To store the type, the CDM device files have been
updated to include a key type with the DRM certificate and to
store from and load to the new class.

Unittests have been updated for using the new class where the
wrapped key was used before.

Test: Linux unit tests
Bug: 140813486
Change-Id: I09249afe9c291632fb651ecd00eac697d6939ec7
(cherry picked from commit 6c457402e944079271cef488aa4699f986da6a2e)
Merged-In: I09249afe9c291632fb651ecd00eac697d6939ec7
This commit is contained in:
Alex Dale
2021-01-27 13:19:13 -08:00
parent e70c7a116e
commit e15c0607c7
16 changed files with 451 additions and 140 deletions

View File

@@ -103,6 +103,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
return kCertProvisioningResponseError7;
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_8:
return kCertProvisioningResponseError8;
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_9:
return kCertProvisioningResponseError9;
case wvcdm::CLIENT_IDENTIFICATION_TOKEN_ERROR_1:
return kClientIdentificationTokenError1;
case wvcdm::CLIENT_ID_AES_ENCRYPT_ERROR: