Address failures when provisioning methods differ
[ Merge of http://go/wvgerrit/46907 ] The WV client supports root of trusts as keyboxes or OEM certificates. Devices with keyboxes use provisioning 2.0 protocol to provision while those with OEM certificates use 3.0. L3 provisioning failures occur if the L1 and L3 root of trusts differ. The provisioning method is now retrieved and cached when the security level is known, when the session is opened. Earlier it was retrieved and cached at initialization time and always set to the value of L1 OEMCrypto (if present). This led to provisioning failures. A case of acquiring a lock while one was held in GetProvisioningId() has also fixed. Bug: 77606913 Test: WV unit/integration tests Change-Id: I2d66ee2cf64f846cec4a37fbccb554447c8a0e1d
This commit is contained in:
@@ -263,10 +263,11 @@ enum {
|
||||
kRemoveUsageInfoError1 = ERROR_DRM_VENDOR_MIN + 274,
|
||||
kRemoveUsageInfoError2 = ERROR_DRM_VENDOR_MIN + 275,
|
||||
kRemoveUsageInfoError3 = ERROR_DRM_VENDOR_MIN + 276,
|
||||
kGetProvisioningError = ERROR_DRM_VENDOR_MIN + 277,
|
||||
|
||||
// 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 + 276,
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 277,
|
||||
|
||||
// Used by crypto test mode
|
||||
kErrorTestMode = ERROR_DRM_VENDOR_MAX,
|
||||
|
||||
@@ -507,6 +507,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kRemoveUsageInfoError2;
|
||||
case wvcdm::REMOVE_USAGE_INFO_ERROR_3:
|
||||
return kRemoveUsageInfoError3;
|
||||
case wvcdm::GET_PROVISIONING_METHOD_ERROR:
|
||||
return kGetProvisioningError;
|
||||
}
|
||||
|
||||
// Return here instead of as a default case so that the compiler will warn
|
||||
|
||||
Reference in New Issue
Block a user