From Widevine CL: https://widevine-internal-review.googlesource.com/#/c/9184/ This is some shim code that will load either an OEMCrypto version 8 or version 9 library. This should allow us to test and run stable devices until all OEM's have updated to version 9. Android Level 3 library versions are: level3/mips/libwvlevel3.a Level3 Library Feb 27 2014 18:18:34 level3/x86/libwvlevel3.a Level3 Library Feb 27 2014 18:22:14 level3/arm/libwvlevel3.a Level3 Library Feb 27 2014 12:31:29 Change-Id: I82911e3b4d9056cf3c3ab2b47194fe81ac2776d9
41 lines
1.5 KiB
C++
41 lines
1.5 KiB
C++
/*********************************************************************
|
|
* oemcrypto_adapter.h
|
|
*
|
|
* (c) Copyright 2013 Google, Inc.
|
|
*
|
|
* This interface allows CDM to open a Level 3 session instead of
|
|
* letting the wrapper function choose between level 1 or level 3.
|
|
*
|
|
*********************************************************************/
|
|
|
|
#ifndef OEMCRYPTO_ADAPTER_H_
|
|
#define OEMCRYPTO_ADAPTER_H_
|
|
|
|
#include "OEMCryptoCENC.h"
|
|
|
|
namespace wvcdm {
|
|
|
|
enum SecurityLevel {
|
|
kLevelDefault,
|
|
kLevel3
|
|
};
|
|
|
|
/* This attempts to open a session at the desired security level.
|
|
If one level is not available, the other will be used instead. */
|
|
OEMCryptoResult OEMCrypto_OpenSession(OEMCrypto_SESSION* session,
|
|
SecurityLevel level);
|
|
OEMCryptoResult OEMCrypto_IsKeyboxValid(SecurityLevel level);
|
|
OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* deviceID, size_t* idLength,
|
|
SecurityLevel level);
|
|
OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* keyData, size_t* keyDataLength,
|
|
SecurityLevel level);
|
|
OEMCryptoResult OEMCrypto_InstallKeybox(const uint8_t* keybox,
|
|
size_t keyBoxLength,
|
|
SecurityLevel level);
|
|
uint32_t OEMCrypto_APIVersion(SecurityLevel level);
|
|
const char* OEMCrypto_SecurityLevel(SecurityLevel level);
|
|
bool OEMCrypto_SupportsUsageTable(SecurityLevel level);
|
|
} // namespace wvcdm
|
|
|
|
#endif // OEMCRYPTO_ADAPTER_H_
|