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
This commit is contained in:
@@ -298,10 +298,11 @@ enum {
|
||||
kLoadUsageEntryInvalidSession = ERROR_DRM_VENDOR_MIN + 313,
|
||||
kRestoreOfflineLicenseError3 = ERROR_DRM_VENDOR_MIN + 314,
|
||||
kNoSrmVersion = ERROR_DRM_VENDOR_MIN + 315,
|
||||
kCertProvisioningResponseError9 = ERROR_DRM_VENDOR_MIN + 316,
|
||||
|
||||
// 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 + 315,
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 316,
|
||||
|
||||
// Used by crypto test mode
|
||||
kErrorTestMode = ERROR_DRM_VENDOR_MAX,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user