Merge "Level 3 OEMCrypto library"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3c5acad498
Binary file not shown.
@@ -182,6 +182,10 @@ uint32_t Level3_APIVersion() {
|
||||
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
uint8_t Level3_SecurityPatchLevel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* Level3_SecurityLevel() {
|
||||
return "L3";
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -58,6 +58,7 @@ namespace wvoec3 {
|
||||
#define Level3_LoadTestKeybox _lcc42
|
||||
#define Level3_ForceDeleteUsageEntry _lcc43
|
||||
#define Level3_LoadTestRSAKey _lcc45
|
||||
#define Level3_SecurityPatchLevel _lcc46
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -171,6 +172,7 @@ OEMCryptoResult Level3_DeriveKeysFromSessionKey(OEMCrypto_SESSION session,
|
||||
const uint8_t *enc_key_context,
|
||||
size_t enc_key_context_length);
|
||||
uint32_t Level3_APIVersion();
|
||||
uint8_t Level3_SecurityPatchLevel();
|
||||
const char* Level3_SecurityLevel();
|
||||
OEMCryptoResult Level3_GetHDCPCapability(OEMCrypto_HDCP_Capability* current,
|
||||
OEMCrypto_HDCP_Capability* maximum);
|
||||
|
||||
@@ -1604,6 +1604,15 @@ TEST_F(OEMCryptoKeyboxTest, NormalGetKeyData) {
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS, sts);
|
||||
}
|
||||
|
||||
// TODO(fredgc): warn people that this will be turned on. It causes a
|
||||
// seg fault on some devices at the moment.
|
||||
TEST_F(OEMCryptoKeyboxTest, DISABLED_GetKeyDataNullPointer) {
|
||||
OEMCryptoResult sts;
|
||||
uint8_t key_data[256];
|
||||
sts = OEMCrypto_GetKeyData(key_data, NULL);
|
||||
ASSERT_NE(OEMCrypto_SUCCESS, sts);
|
||||
}
|
||||
|
||||
TEST_F(OEMCryptoKeyboxTest, ProductionKeyboxValid) {
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_IsKeyboxValid());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user