Loading automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +97 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,71 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.floatValues = {0.0f}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_CURRENT_DRAW_LIMIT), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.floatValues = {(float)VehicleUnit::AMPERE}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_PERCENT_LIMIT), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {20, 40, 60, 80, 100}, }, .initialValue = {.floatValues = {40}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {0 /* false */}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_TIME_REMAINING), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::CONTINUOUS, }, .initialValue = {.int32Values = {20}}}, {.config = { .prop = toInt(VehicleProperty::EV_REGENERATIVE_BRAKING_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::TRAILER_PRESENT), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::VEHICLE_CURB_WEIGHT), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::STATIC, }, .initialValue = {.int32Values = {30}}}, {.config = { .prop = toInt(VehicleProperty::RANGE_REMAINING), Loading Loading @@ -818,6 +883,22 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE), Loading Loading @@ -850,6 +931,22 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH), Loading security/keymint/aidl/vts/functional/AttestKeyTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -783,7 +783,7 @@ TEST_P(AttestKeyTest, EcdsaAttestationID) { vector<Certificate> attested_key_cert_chain; auto result = GenerateKey(builder, attest_key, &attested_key_blob, &attested_key_characteristics, &attested_key_cert_chain); if (result == ErrorCode::CANNOT_ATTEST_IDS) { if (result == ErrorCode::CANNOT_ATTEST_IDS && !isDeviceIdAttestationRequired()) { continue; } Loading security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,14 @@ uint32_t KeyMintAidlTestBase::boot_patch_level() { return boot_patch_level(key_characteristics_); } /** * An API to determine device IDs attestation is required or not, * which is mandatory for KeyMint version 2 or first_api_level 33 or greater. */ bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() { return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= 33; } bool KeyMintAidlTestBase::Curve25519Supported() { // Strongbox never supports curve 25519. if (SecLevel() == SecurityLevel::STRONGBOX) { Loading security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ class KeyMintAidlTestBase : public ::testing::TestWithParam<string> { uint32_t vendor_patch_level() { return vendor_patch_level_; } uint32_t boot_patch_level(const vector<KeyCharacteristics>& key_characteristics); uint32_t boot_patch_level(); bool isDeviceIdAttestationRequired(); bool Curve25519Supported(); Loading security/keymint/aidl/vts/functional/KeyMintTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1986,8 +1986,8 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdTags) { if (SecLevel() == SecurityLevel::STRONGBOX) { if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return; } if (result == ErrorCode::CANNOT_ATTEST_IDS) { // Device ID attestation is optional; KeyMint may not support it at all. if (result == ErrorCode::CANNOT_ATTEST_IDS && !isDeviceIdAttestationRequired()) { // ID attestation was optional till api level 32, from api level 33 it is mandatory. continue; } ASSERT_EQ(result, ErrorCode::OK); Loading Loading
automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h +97 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,71 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.floatValues = {0.0f}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_CURRENT_DRAW_LIMIT), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.floatValues = {(float)VehicleUnit::AMPERE}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_PERCENT_LIMIT), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .configArray = {20, 40, 60, 80, 100}, }, .initialValue = {.floatValues = {40}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {0 /* false */}}}, {.config = { .prop = toInt(VehicleProperty::EV_CHARGE_TIME_REMAINING), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::CONTINUOUS, }, .initialValue = {.int32Values = {20}}}, {.config = { .prop = toInt(VehicleProperty::EV_REGENERATIVE_BRAKING_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::TRAILER_PRESENT), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {2}}}, {.config = { .prop = toInt(VehicleProperty::VEHICLE_CURB_WEIGHT), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::STATIC, }, .initialValue = {.int32Values = {30}}}, {.config = { .prop = toInt(VehicleProperty::RANGE_REMAINING), Loading Loading @@ -818,6 +883,22 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_STATE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_STATE_ON}}}, {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_STATE), Loading Loading @@ -850,6 +931,22 @@ const std::vector<ConfigDeclaration> kVehicleProperties = { }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::FRONT_FOG_LIGHTS_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::REAR_FOG_LIGHTS_SWITCH), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, }, .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}}, {.config = { .prop = toInt(VehicleProperty::HAZARD_LIGHTS_SWITCH), Loading
security/keymint/aidl/vts/functional/AttestKeyTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -783,7 +783,7 @@ TEST_P(AttestKeyTest, EcdsaAttestationID) { vector<Certificate> attested_key_cert_chain; auto result = GenerateKey(builder, attest_key, &attested_key_blob, &attested_key_characteristics, &attested_key_cert_chain); if (result == ErrorCode::CANNOT_ATTEST_IDS) { if (result == ErrorCode::CANNOT_ATTEST_IDS && !isDeviceIdAttestationRequired()) { continue; } Loading
security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,14 @@ uint32_t KeyMintAidlTestBase::boot_patch_level() { return boot_patch_level(key_characteristics_); } /** * An API to determine device IDs attestation is required or not, * which is mandatory for KeyMint version 2 or first_api_level 33 or greater. */ bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() { return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= 33; } bool KeyMintAidlTestBase::Curve25519Supported() { // Strongbox never supports curve 25519. if (SecLevel() == SecurityLevel::STRONGBOX) { Loading
security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ class KeyMintAidlTestBase : public ::testing::TestWithParam<string> { uint32_t vendor_patch_level() { return vendor_patch_level_; } uint32_t boot_patch_level(const vector<KeyCharacteristics>& key_characteristics); uint32_t boot_patch_level(); bool isDeviceIdAttestationRequired(); bool Curve25519Supported(); Loading
security/keymint/aidl/vts/functional/KeyMintTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1986,8 +1986,8 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdTags) { if (SecLevel() == SecurityLevel::STRONGBOX) { if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return; } if (result == ErrorCode::CANNOT_ATTEST_IDS) { // Device ID attestation is optional; KeyMint may not support it at all. if (result == ErrorCode::CANNOT_ATTEST_IDS && !isDeviceIdAttestationRequired()) { // ID attestation was optional till api level 32, from api level 33 it is mandatory. continue; } ASSERT_EQ(result, ErrorCode::OK); Loading