Remove namespace from Level3 aliases
Since the L3 functions are meant to alias the OEMCrypto functions, they shouldn't appear in a namespace. Change-Id: I8d11279ff86c5b5c9eab0598d134f6904f0021ad
This commit is contained in:
committed by
Robert Shih
parent
955c89315e
commit
c5d06cb7c7
@@ -598,33 +598,32 @@ class WatchDog {
|
||||
} else if (metrics != nullptr) {
|
||||
// Even if we succeeded in calling initialize, there might be failures
|
||||
// in the initialize process that we want to record.
|
||||
wvoec3::Level3InitializationState state =
|
||||
Level3_GetInitializationState();
|
||||
Level3InitializationState state = Level3_GetInitializationState();
|
||||
switch (state) {
|
||||
case wvoec3::LEVEL3_INITIALIZATION_UNKNOWN_FAILURE:
|
||||
case LEVEL3_INITIALIZATION_UNKNOWN_FAILURE:
|
||||
metrics
|
||||
->OemCryptoDynamicAdapterMetrics::SetLevel3InitializationError(
|
||||
wvcdm::metrics::
|
||||
OEMCrypto_INITIALIZED_L3_INITIALIZATION_FAILED);
|
||||
break;
|
||||
case wvoec3::LEVEL3_SEED_FAILURE:
|
||||
case LEVEL3_SEED_FAILURE:
|
||||
metrics
|
||||
->OemCryptoDynamicAdapterMetrics::SetLevel3InitializationError(
|
||||
wvcdm::metrics::OEMCrypto_INITIALIZED_L3_RNG_FAILED);
|
||||
break;
|
||||
case wvoec3::LEVEL3_SAVE_DEVICE_KEYS_FAILURE:
|
||||
case LEVEL3_SAVE_DEVICE_KEYS_FAILURE:
|
||||
metrics
|
||||
->OemCryptoDynamicAdapterMetrics::SetLevel3InitializationError(
|
||||
wvcdm::metrics::
|
||||
OEMCrypto_INITIALIZED_L3_SAVE_DEVICE_KEYS_FAILED);
|
||||
break;
|
||||
case wvoec3::LEVEL3_READ_DEVICE_KEYS_FAILURE:
|
||||
case LEVEL3_READ_DEVICE_KEYS_FAILURE:
|
||||
metrics
|
||||
->OemCryptoDynamicAdapterMetrics::SetLevel3InitializationError(
|
||||
wvcdm::metrics::
|
||||
OEMCrypto_INITIALIZED_L3_READ_DEVICE_KEYS_FAILED);
|
||||
break;
|
||||
case wvoec3::LEVEL3_VERIFY_DEVICE_KEYS_FAILURE:
|
||||
case LEVEL3_VERIFY_DEVICE_KEYS_FAILURE:
|
||||
metrics
|
||||
->OemCryptoDynamicAdapterMetrics::SetLevel3InitializationError(
|
||||
wvcdm::metrics::
|
||||
|
||||
@@ -126,7 +126,7 @@ OEMCryptoResult Haystack_LoadRenewal(OEMCrypto_SESSION session,
|
||||
OEMCryptoResult Haystack_LoadEntitledContentKeys(
|
||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||
size_t num_keys, const OEMCrypto_EntitledContentKeyObject* key_array);
|
||||
wvoec3::Level3InitializationState Haystack_GetInitializationState();
|
||||
Level3InitializationState Haystack_GetInitializationState();
|
||||
void Haystack_OutputErrorLogs();
|
||||
OEMCryptoResult Haystack_CreateEntitledKeySession(
|
||||
OEMCrypto_SESSION oec_session, OEMCrypto_SESSION* key_session);
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "haystack.h"
|
||||
#include "level3.h"
|
||||
|
||||
namespace wvoec3 {
|
||||
|
||||
bool Level3_IsInApp() {
|
||||
return haystack::Haystack_IsInApp();
|
||||
}
|
||||
@@ -576,5 +574,3 @@ OEMCryptoResult Level3_GetSignatureHashAlgorithm(
|
||||
OEMCryptoResult Level3_EnterTestMode(void) {
|
||||
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
} // namespace wvoec3
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "level3_file_system.h"
|
||||
|
||||
namespace wvoec3 {
|
||||
|
||||
// clang-format off
|
||||
#ifdef DYNAMIC_ADAPTER
|
||||
#define Level3_IsInApp _lcc00
|
||||
@@ -572,6 +570,8 @@ void Level3_OutputErrorLogs();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
namespace wvoec3 {
|
||||
|
||||
// The following are interfaces needed for Google's Level 3 OEMCrypto
|
||||
// specifically, which partners are expected to implement.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user