Merge "Removing Widevine OEMCrypto Profiler"

This commit is contained in:
Aaron Vaage
2017-01-20 00:36:00 +00:00
committed by Android (Google) Code Review
21 changed files with 2 additions and 1336 deletions

View File

@@ -29,7 +29,6 @@
#include "level3.h"
#include "lock.h"
#include "log.h"
#include "profiled_scope.h"
#include "properties.h"
#include "wv_cdm_constants.h"
@@ -598,9 +597,6 @@ class Adapter {
OEMCryptoResult OpenSession(OEMCrypto_SESSION* session,
wvcdm::SecurityLevel level) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_OPEN_SESSION);
LevelSession new_session;
OEMCryptoResult result;
if (level == kLevelDefault && level1_valid_) {
@@ -625,9 +621,6 @@ class Adapter {
}
OEMCryptoResult CloseSession(OEMCrypto_SESSION session) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_CLOSE_SESSION);
wvcdm::AutoLock auto_lock(session_map_lock_);
map_iterator pair = session_map_.find(session);
if (pair == session_map_.end()) {
@@ -676,11 +669,6 @@ OEMCryptoResult OEMCrypto_OpenSession(OEMCrypto_SESSION* session,
OEMCryptoResult OEMCrypto_CopyBuffer(
SecurityLevel level, const uint8_t* data_addr, size_t data_length,
OEMCrypto_DestBufferDesc* out_buffer, uint8_t subsample_flags) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_COPY_BUFFER);
ps.meta_data_.WriteVLV(static_cast<uint64_t>(data_length));
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -691,9 +679,6 @@ OEMCryptoResult OEMCrypto_CopyBuffer(
OEMCryptoResult OEMCrypto_InstallKeybox(const uint8_t* keybox,
size_t keyBoxLength,
SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_INSTALL_KEYBOX);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -702,8 +687,6 @@ OEMCryptoResult OEMCrypto_InstallKeybox(const uint8_t* keybox,
OEMCrypto_ProvisioningMethod OEMCrypto_GetProvisioningMethod(
SecurityLevel level) {
oemprofiler::ProfiledScope ps(
oemprofiler::OEM_FUNCTION_GET_PROVISIONING_METHOD);
if (!kAdapter) return OEMCrypto_ProvisioningError;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ProvisioningError;
@@ -712,9 +695,6 @@ OEMCrypto_ProvisioningMethod OEMCrypto_GetProvisioningMethod(
}
OEMCryptoResult OEMCrypto_IsKeyboxValid(SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_IS_KEYBOX_VALID);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -723,9 +703,6 @@ OEMCryptoResult OEMCrypto_IsKeyboxValid(SecurityLevel level) {
OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* deviceID, size_t* idLength,
SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_GET_DEVICE_ID);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -734,9 +711,6 @@ OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* deviceID, size_t* idLength,
OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* keyData, size_t* keyDataLength,
SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_GET_KEY_DATA);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -744,9 +718,6 @@ OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* keyData, size_t* keyDataLength,
}
uint32_t OEMCrypto_APIVersion(SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_API_VERSION);
if (!kAdapter) return 0;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return 0;
@@ -754,9 +725,6 @@ uint32_t OEMCrypto_APIVersion(SecurityLevel level) {
}
uint8_t OEMCrypto_Security_Patch_Level(SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_SECURITY_PATCH_LEVEL);
if (!kAdapter) return 0;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return 0;
@@ -765,9 +733,6 @@ uint8_t OEMCrypto_Security_Patch_Level(SecurityLevel level) {
}
const char* OEMCrypto_SecurityLevel(SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_SECURITY_LEVEL);
if (!kAdapter) return "";
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return "";
@@ -777,9 +742,6 @@ const char* OEMCrypto_SecurityLevel(SecurityLevel level) {
OEMCryptoResult OEMCrypto_GetHDCPCapability(
SecurityLevel level, OEMCrypto_HDCP_Capability* current,
OEMCrypto_HDCP_Capability* maximum) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_GET_HDCP_CAPABILITIY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_NOT_IMPLEMENTED;
@@ -798,9 +760,6 @@ OEMCryptoResult OEMCrypto_GetHDCPCapability(
}
bool OEMCrypto_SupportsUsageTable(SecurityLevel level) {
oemprofiler::ProfiledScope ps(oemprofiler::OEM_FUNCTION_SUPPORTS_USAGE_TABLE);
if (!kAdapter) return false;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return false;
@@ -809,10 +768,6 @@ bool OEMCrypto_SupportsUsageTable(SecurityLevel level) {
}
bool OEMCrypto_IsAntiRollbackHwPresent(SecurityLevel level) {
oemprofiler::ProfiledScope ps(
oemprofiler::OEM_FUNCTION_IS_ANTI_ROLLBACK_HW_PRESENT);
if (!kAdapter) return false;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return false;
@@ -822,10 +777,6 @@ bool OEMCrypto_IsAntiRollbackHwPresent(SecurityLevel level) {
OEMCryptoResult OEMCrypto_GetNumberOfOpenSessions(SecurityLevel level,
size_t* count) {
oemprofiler::ProfiledScope ps(
oemprofiler::OEM_FUNCTION_GET_NUMBER_OF_OPEN_SESSIONS);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -835,10 +786,6 @@ OEMCryptoResult OEMCrypto_GetNumberOfOpenSessions(SecurityLevel level,
OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(SecurityLevel level,
size_t* maximum) {
oemprofiler::ProfiledScope ps(
oemprofiler::OEM_FUNCTION_GET_MAX_NUMBER_OF_SESSIONS);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(level);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -879,10 +826,6 @@ extern "C" OEMCryptoResult OEMCrypto_GenerateDerivedKeys(
OEMCrypto_SESSION session, const uint8_t* mac_key_context,
uint32_t mac_key_context_length, const uint8_t* enc_key_context,
uint32_t enc_key_context_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERATE_DERIVED_KEYS);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -893,10 +836,6 @@ extern "C" OEMCryptoResult OEMCrypto_GenerateDerivedKeys(
extern "C" OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session,
uint32_t* nonce) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERATE_NONCE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -906,10 +845,6 @@ extern "C" OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session,
extern "C" OEMCryptoResult OEMCrypto_GenerateSignature(
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
uint8_t* signature, size_t* signature_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERATE_SIGNATURE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -923,10 +858,6 @@ extern "C" OEMCryptoResult OEMCrypto_LoadKeys(
const uint8_t* enc_mac_key_iv, const uint8_t* enc_mac_key, size_t num_keys,
const OEMCrypto_KeyObject* key_array, const uint8_t* pst,
size_t pst_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_LOAD_KEYS);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -967,10 +898,6 @@ extern "C" OEMCryptoResult OEMCrypto_RefreshKeys(
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
const uint8_t* signature, size_t signature_length, size_t num_keys,
const OEMCrypto_KeyRefreshObject* key_array) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_REFRESH_KEYS);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -981,10 +908,6 @@ extern "C" OEMCryptoResult OEMCrypto_RefreshKeys(
extern "C" OEMCryptoResult OEMCrypto_QueryKeyControl(
OEMCrypto_SESSION session, const uint8_t* key_id, size_t key_id_length,
uint8_t* key_control_block, size_t* key_control_block_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_QUERY_KEY_CONTROL);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -996,10 +919,6 @@ extern "C" OEMCryptoResult OEMCrypto_QueryKeyControl(
extern "C" OEMCryptoResult OEMCrypto_SelectKey(const OEMCrypto_SESSION session,
const uint8_t* key_id,
size_t key_id_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_SELECT_KEY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1012,12 +931,6 @@ extern "C" OEMCryptoResult OEMCrypto_DecryptCENC(
OEMCrypto_DestBufferDesc* out_buffer,
const OEMCrypto_CENCEncryptPatternDesc* pattern,
uint8_t subsample_flags) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_DECRYPT_CENC);
ps.meta_data_.WriteVLV(static_cast<uint64_t>(data_length));
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1045,10 +958,6 @@ extern "C" OEMCryptoResult OEMCrypto_WrapKeybox(const uint8_t* keybox,
size_t* wrappedKeyBoxLength,
const uint8_t* transportKey,
size_t transportKeyLength) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_WRAP_KEYBOX);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1062,10 +971,6 @@ extern "C" OEMCryptoResult OEMCrypto_InstallKeybox(const uint8_t* keybox,
}
extern "C" OEMCryptoResult OEMCrypto_LoadTestKeybox() {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_LOAD_TEST_KEYBOX);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1085,8 +990,6 @@ extern "C" OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(
OEMCrypto_SESSION session,
uint8_t *public_cert,
size_t *public_cert_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GET_OEM_PUBLIC_CERTIFICATE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1107,10 +1010,6 @@ extern "C" OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* keyData,
extern "C" OEMCryptoResult OEMCrypto_GetRandom(uint8_t* randomData,
size_t dataLength) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GET_RANDOM);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1127,8 +1026,6 @@ extern "C" OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey30(
const uint8_t* enc_rsa_key_iv,
uint8_t* wrapped_rsa_key,
size_t* wrapped_rsa_key_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_REWRAP_DEVICE_RSA_KEY_30);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1147,10 +1044,6 @@ extern "C" OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey(
const uint8_t* enc_rsa_key, size_t enc_rsa_key_length,
const uint8_t* enc_rsa_key_iv, uint8_t* wrapped_rsa_key,
size_t* wrapped_rsa_key_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_REWRAP_DEVICE_RSA_KEY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1163,10 +1056,6 @@ extern "C" OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey(
extern "C" OEMCryptoResult OEMCrypto_LoadDeviceRSAKey(
OEMCrypto_SESSION session, const uint8_t* wrapped_rsa_key,
size_t wrapped_rsa_key_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_LOAD_DEVICE_RSA_KEY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1175,10 +1064,6 @@ extern "C" OEMCryptoResult OEMCrypto_LoadDeviceRSAKey(
}
extern "C" OEMCryptoResult OEMCrypto_LoadTestRSAKey() {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_LOAD_TEST_RSA_KEY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
if (!fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1190,10 +1075,6 @@ extern "C" OEMCryptoResult OEMCrypto_GenerateRSASignature(
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
uint8_t* signature, size_t* signature_length,
RSA_Padding_Scheme padding_scheme) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERATE_RSA_SIGNATURE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1212,10 +1093,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeriveKeysFromSessionKey(
size_t enc_session_key_length, const uint8_t* mac_key_context,
size_t mac_key_context_length, const uint8_t* enc_key_context,
size_t enc_key_context_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_DERIVE_KEYS_FROM_SESSION_KEY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1260,10 +1137,6 @@ extern "C" OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t* maximum) {
extern "C" OEMCryptoResult OEMCrypto_Generic_Encrypt(
OEMCrypto_SESSION session, const uint8_t* in_buffer, size_t buffer_length,
const uint8_t* iv, OEMCrypto_Algorithm algorithm, uint8_t* out_buffer) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERIC_ENCRYPT);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1289,10 +1162,6 @@ extern "C" OEMCryptoResult OEMCrypto_Generic_Encrypt(
extern "C" OEMCryptoResult OEMCrypto_Generic_Decrypt(
OEMCrypto_SESSION session, const uint8_t* in_buffer, size_t buffer_length,
const uint8_t* iv, OEMCrypto_Algorithm algorithm, uint8_t* out_buffer) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERIC_DECRYPT);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1321,10 +1190,6 @@ extern "C" OEMCryptoResult OEMCrypto_Generic_Sign(OEMCrypto_SESSION session,
OEMCrypto_Algorithm algorithm,
uint8_t* signature,
size_t* signature_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERIC_SIGN);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1336,10 +1201,6 @@ extern "C" OEMCryptoResult OEMCrypto_Generic_Verify(
OEMCrypto_SESSION session, const uint8_t* in_buffer, size_t buffer_length,
OEMCrypto_Algorithm algorithm, const uint8_t* signature,
size_t signature_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_GENERIC_VERIFY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1348,10 +1209,6 @@ extern "C" OEMCryptoResult OEMCrypto_Generic_Verify(
}
extern "C" OEMCryptoResult OEMCrypto_UpdateUsageTable() {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_UPDATE_USAGE_TABLE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
@@ -1363,10 +1220,6 @@ extern "C" OEMCryptoResult OEMCrypto_UpdateUsageTable() {
extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(const uint8_t* pst,
size_t pst_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_DEACTIVATE_USAGE_ENTRY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
@@ -1387,10 +1240,6 @@ extern "C" OEMCryptoResult OEMCrypto_ReportUsage(OEMCrypto_SESSION session,
size_t pst_length,
OEMCrypto_PST_Report* buffer,
size_t* buffer_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_REPORT_USAGE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1406,10 +1255,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(
OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length,
const uint8_t* message, size_t message_length, const uint8_t* signature,
size_t signature_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_DELETE_USAGE_ENTRY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
LevelSession pair = kAdapter->get(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
@@ -1424,10 +1269,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(
extern "C" OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(
const uint8_t* pst, size_t pst_length) {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_FORCE_DELETE_USAGE_ENTRY);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
@@ -1445,10 +1286,6 @@ extern "C" OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(
}
extern "C" OEMCryptoResult OEMCrypto_DeleteUsageTable() {
wvcdm::oemprofiler::ProfiledScope ps(
wvcdm::oemprofiler::OEM_FUNCTION_DELETE_USAGE_TABLE);
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);