Device info ref impl to return all required properties

Let the sample device info built by ref implementation include all
required fields to pass device info validation tests.

Test: opk_ta_p40, run_fake_l1_tests
Bug: 307968622
Change-Id: Ib6b7645a1d26347f6992dd3c3bc2f39d4a92b283
This commit is contained in:
Cong Lin
2023-11-30 15:02:21 -08:00
committed by Robert Shih
parent 94c547eef9
commit 6c5b9aa271

View File

@@ -6,6 +6,7 @@
#include "oemcrypto_provisioning_test.h"
#include "bcc_validator.h"
#include "device_info_validator.h"
#include "log.h"
#include "platform.h"
#include "test_sleep.h"
@@ -362,6 +363,13 @@ TEST_F(OEMCryptoProv40Test, GetDeviceInformationAPI18) {
OEMCrypto_GetDeviceInformation(device_info.data(), &device_info_length),
OEMCrypto_SUCCESS);
EXPECT_NE(device_info_length, 0uL);
device_info.resize(device_info_length);
constexpr int kDeviceVersion = 3;
util::DeviceInfoValidator validator(kDeviceVersion);
EXPECT_EQ(util::CborMessageStatus::kCborParseOk,
validator.Parse(device_info));
validator.Validate();
EXPECT_EQ(util::CborMessageStatus::kCborValidateOk, validator.Validate());
}
TEST_F(OEMCryptoProv40Test, GetDeviceSignedCsrPayloadAPI18) {