Add detail about L3 initialization
Bug: b/70299597 Merge of http://go/wvgerrit/67304 Test: Android, CE CDM, and Linux tests There's a few different things that can go wrong in the L3 initialization, with seeding and device key failures among others. They should be recorded in metrics to track. Along the same lines, since multiple errors can happen in conjunction, metrics needs to change to add more fields for errors. This CL also adds the hidl_metrics_adapter_unittest to the Android test scripts. Change-Id: Ie5bcf81bbe294a1136c58410f90087a13b3d911d
This commit is contained in:
@@ -107,10 +107,13 @@ typedef enum OEMCryptoInitializationMode {
|
||||
OEMCrypto_INITIALIZED_USING_L1_INSTALLED_KEYBOX = 13,
|
||||
OEMCrypto_INITIALIZED_USING_L3_INVALID_L1 = 14,
|
||||
OEMCrypto_INITIALIZED_USING_L1_WITH_PROVISIONING_3_0 = 15,
|
||||
OEMCrypto_INITIALIZED_L3_INITIALIZATION_FAILED = 16
|
||||
OEMCrypto_INITIALIZED_L3_INITIALIZATION_FAILED = 16,
|
||||
OEMCrypto_INITIALIZED_L3_RNG_FAILED = 17,
|
||||
OEMCrypto_INITIALIZED_L3_SAVE_DEVICE_KEYS_FAILED = 18,
|
||||
OEMCrypto_INITIALIZED_L3_READ_DEVICE_KEYS_FAILED = 19,
|
||||
OEMCrypto_INITIALIZED_L3_VERIFY_DEVICE_KEYS_FAILED = 20,
|
||||
} OEMCryptoInitializationMode;
|
||||
|
||||
|
||||
// This class contains metrics for Crypto Session and OEM Crypto.
|
||||
class CryptoMetrics {
|
||||
public:
|
||||
@@ -302,6 +305,8 @@ class OemCryptoDynamicAdapterMetrics {
|
||||
|
||||
// Set methods for OEMCrypto metrics.
|
||||
void SetInitializationMode(OEMCryptoInitializationMode mode);
|
||||
void SetLevel3InitializationError(OEMCryptoInitializationMode mode);
|
||||
void SetPreviousInitializationFailure(OEMCryptoInitializationMode mode);
|
||||
void SetL1ApiVersion(uint32_t version);
|
||||
void SetL1MinApiVersion(uint32_t version);
|
||||
|
||||
@@ -315,7 +320,11 @@ class OemCryptoDynamicAdapterMetrics {
|
||||
|
||||
private:
|
||||
mutable std::mutex adapter_lock_;
|
||||
ValueMetric<OEMCryptoInitializationMode>
|
||||
level3_oemcrypto_initialization_error_;
|
||||
ValueMetric<OEMCryptoInitializationMode> oemcrypto_initialization_mode_;
|
||||
ValueMetric<OEMCryptoInitializationMode>
|
||||
previous_oemcrypto_initialization_failure_;
|
||||
ValueMetric<uint32_t> oemcrypto_l1_api_version_;
|
||||
ValueMetric<uint32_t> oemcrypto_l1_min_api_version_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user