Merge "Fix for off by one error and correct comments"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f76387d1fc
@@ -1144,7 +1144,7 @@ uint32_t OEMCrypto_ResourceRatingTier(SecurityLevel level) {
|
||||
if (!gAdapter.get()) return 0;
|
||||
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
||||
if (!fcn) return 0;
|
||||
if (fcn->version < 14) return 0;
|
||||
if (fcn->version <= 14) return 0;
|
||||
if (fcn->ResourceRatingTier == NULL) return 0;
|
||||
return fcn->ResourceRatingTier();
|
||||
}
|
||||
@@ -1153,7 +1153,7 @@ uint32_t OEMCrypto_SupportsDecryptHash(SecurityLevel level) {
|
||||
if (!gAdapter.get()) return OEMCrypto_Hash_Not_Supported;
|
||||
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
||||
if (!fcn) return OEMCrypto_Hash_Not_Supported;
|
||||
if (fcn->version < 14) return OEMCrypto_Hash_Not_Supported;
|
||||
if (fcn->version < 15) return OEMCrypto_Hash_Not_Supported;
|
||||
if (fcn->BuildInformation == NULL) return OEMCrypto_Hash_Not_Supported;
|
||||
return fcn->SupportsDecryptHash();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user