Merge latest oemcrypto-v17 change

No-Typo-Check: Not related to this change.

Bug: 161477208
Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
This commit is contained in:
Kyle Zhang
2022-01-21 05:58:12 +00:00
committed by Fred Gylys-Colwell
parent c924960962
commit 642965c678
176 changed files with 301013 additions and 296749 deletions

View File

@@ -119,6 +119,7 @@ typedef enum OEMCryptoInitializationMode {
OEMCrypto_INITIALIZED_L3_SAVE_DEVICE_KEYS_FAILED = 18,
OEMCrypto_INITIALIZED_L3_READ_DEVICE_KEYS_FAILED = 19,
OEMCrypto_INITIALIZED_L3_VERIFY_DEVICE_KEYS_FAILED = 20,
OEMCrypto_INITIALIZED_USING_L1_WITH_PROVISIONING_4_0 = 21,
} OEMCryptoInitializationMode;
// This class contains metrics for Crypto Session and OEM Crypto.
@@ -292,6 +293,10 @@ class CryptoMetrics {
oemcrypto_load_provisioning_;
ValueMetric<uint32_t> oemcrypto_minor_api_version_;
ValueMetric<uint32_t> oemcrypto_maximum_usage_table_header_size_;
EventMetric<kOemCryptoResultFieldNumber, OEMCryptoResult>
oemcrypto_generate_certificate_key_pair_;
EventMetric<kOemCryptoResultFieldNumber, OEMCryptoResult>
oemcrypto_install_oem_private_key_;
}; // class CryptoMetrics
// This class contains session-scoped metrics. All properties and

View File

@@ -287,11 +287,11 @@ void OemCryptoDynamicAdapterMetrics::Serialize(
std::unique_lock<std::mutex> lock(adapter_lock_);
engine_metrics->set_allocated_level3_oemcrypto_initialization_error(
oemcrypto_initialization_mode_.ToProto());
level3_oemcrypto_initialization_error_.ToProto());
engine_metrics->set_allocated_oemcrypto_initialization_mode(
oemcrypto_initialization_mode_.ToProto());
engine_metrics->set_allocated_previous_oemcrypto_initialization_failure(
oemcrypto_initialization_mode_.ToProto());
previous_oemcrypto_initialization_failure_.ToProto());
engine_metrics->set_allocated_oemcrypto_l1_api_version(
oemcrypto_l1_api_version_.ToProto());
engine_metrics->set_allocated_oemcrypto_l1_min_api_version(

View File

@@ -38,7 +38,7 @@ TEST(CounterMetricTest, NoFieldsSuccess) {
EXPECT_EQ(11, metric_proto.test_counters(0).count());
EXPECT_FALSE(metric_proto.test_counters(0).has_attributes())
<< std::string("Unexpected attributes value. Serialized metrics: ")
<< wvcdm::b2a_hex(serialized_metrics);
<< wvutil::b2a_hex(serialized_metrics);
}
TEST(CounterMetricTest, OneFieldSuccess) {

View File

@@ -45,7 +45,7 @@ TEST_F(EventMetricTest, NoFieldsSuccess) {
EXPECT_EQ(2u, metric_proto.test_distributions(0).operation_count());
EXPECT_FALSE(metric_proto.test_distributions(0).has_attributes())
<< std::string("Unexpected attributes value. Serialized metrics: ")
<< wvcdm::b2a_hex(serialized_metrics);
<< wvutil::b2a_hex(serialized_metrics);
}
TEST_F(EventMetricTest, OneFieldSuccess) {