Source release v3.5.0
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "OEMCryptoCENC.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
namespace wvoec {
|
||||
|
||||
// These tests are required for LollyPop Android devices.
|
||||
@@ -101,9 +103,18 @@ TEST_F(OEMCryptoAndroidMNCTest, MinVersionNumber10) {
|
||||
ASSERT_GE(version, 10u);
|
||||
}
|
||||
|
||||
TEST_F(OEMCryptoAndroidMNCTest, LoadsTestKeyboxImplemented) {
|
||||
TEST_F(OEMCryptoAndroidMNCTest, LoadTestKeybox) {
|
||||
if (OEMCrypto_Keybox == OEMCrypto_GetProvisioningMethod()) {
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_LoadTestKeybox());
|
||||
OEMCryptoResult status = OEMCrypto_LoadTestKeybox();
|
||||
// OEMCrypto may return success or not implemented.
|
||||
if (status == OEMCrypto_SUCCESS) {
|
||||
LOGV("OEMCrypto_LoadTestKeybox is implemented.");
|
||||
} else if (status == OEMCrypto_ERROR_NOT_IMPLEMENTED) {
|
||||
LOGV("OEMCrypto_LoadTestKeybox is NOT implemented.");
|
||||
} else {
|
||||
// Bad status - fail.
|
||||
ASSERT_EQ(status, OEMCrypto_SUCCESS);
|
||||
}
|
||||
} else {
|
||||
// Android should use keybox or provisioning 3.0.
|
||||
ASSERT_EQ(OEMCrypto_OEMCertificate, OEMCrypto_GetProvisioningMethod());
|
||||
@@ -130,4 +141,12 @@ TEST_F(OEMCryptoAndroidNYCTest, MinVersionNumber11) {
|
||||
ASSERT_GE(version, 11u);
|
||||
}
|
||||
|
||||
// These tests are required for O MR1 Android devices.
|
||||
class OEMCryptoAndroidOCTest : public OEMCryptoAndroidNYCTest {};
|
||||
|
||||
TEST_F(OEMCryptoAndroidOCTest, MinVersionNumber13) {
|
||||
uint32_t version = OEMCrypto_APIVersion();
|
||||
ASSERT_GE(version, 13u);
|
||||
}
|
||||
|
||||
} // namespace wvoec
|
||||
|
||||
Reference in New Issue
Block a user