Avoid calling DeleteUsageEntry for OEMCrypto v13
Merge from Widevine repo of http://go/wvgerrit/27182 This function is not defined for v13, and should not be called by the adapter. b/38203780 Test: Ran unit tests specified in bug, on sailfish. Change-Id: I38b1cc8493dd22da724f415f28d94f47d6d9c942
This commit is contained in:
@@ -1605,7 +1605,7 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(
|
||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
LevelSession pair = kAdapter->get(session);
|
||||
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
if (pair.fcn->version > 8) {
|
||||
if (pair.fcn->version > 8 && pair.fcn->version < 13) {
|
||||
return pair.fcn->DeleteUsageEntry(pair.session, pst, pst_length, message,
|
||||
message_length, signature,
|
||||
signature_length);
|
||||
@@ -1627,7 +1627,7 @@ extern "C" OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(const uint8_t* pst,
|
||||
if (fcn1 && fcn1 != fcn3 && (fcn1->version > 9) && (fcn1->version < 13) &&
|
||||
(fcn1->ForceDeleteUsageEntry != NULL)) {
|
||||
OEMCryptoResult sts1 = fcn1->ForceDeleteUsageEntry(pst, pst_length);
|
||||
if ((sts1 != OEMCrypto_SUCCESS) && (sts == OEMCrypto_SUCCESS)) {
|
||||
if ((sts != OEMCrypto_SUCCESS) && (sts1 == OEMCrypto_SUCCESS)) {
|
||||
sts = sts1;
|
||||
}
|
||||
}
|
||||
@@ -1655,7 +1655,7 @@ extern "C" bool OEMCrypto_IsSRMUpdateSupported() {
|
||||
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
|
||||
if (!fcn) return false;
|
||||
if (fcn->version < 13) return false;
|
||||
if (fcn->IsSRMUpdateSupported == NULL) return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||
if (fcn->IsSRMUpdateSupported == NULL) return false;
|
||||
return fcn->IsSRMUpdateSupported();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user