Loading security/keymint/aidl/vts/functional/AttestKeyTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -846,13 +846,39 @@ TEST_P(AttestKeyTest, EcdsaAttestationID) { // Collection of valid attestation ID tags. auto attestation_id_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } string imei = get_imei(0); if (!imei.empty()) { Loading security/keymint/aidl/vts/functional/DeviceUniqueAttestationTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -249,13 +249,39 @@ TEST_P(DeviceUniqueAttestationTest, EcdsaDeviceUniqueAttestationID) { // Collection of valid attestation ID tags. auto attestation_id_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } vector<uint8_t> key_blob; vector<KeyCharacteristics> key_characteristics; Loading security/keymint/aidl/vts/functional/KeyMintTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -2080,12 +2080,38 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdTags) { // Various ATTESTATION_ID_* tags that map to fields in the attestation extension ASN.1 schema. auto extra_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } for (const KeyParameter& tag : extra_tags) { SCOPED_TRACE(testing::Message() << "tag-" << tag); Loading Loading
security/keymint/aidl/vts/functional/AttestKeyTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -846,13 +846,39 @@ TEST_P(AttestKeyTest, EcdsaAttestationID) { // Collection of valid attestation ID tags. auto attestation_id_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } string imei = get_imei(0); if (!imei.empty()) { Loading
security/keymint/aidl/vts/functional/DeviceUniqueAttestationTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -249,13 +249,39 @@ TEST_P(DeviceUniqueAttestationTest, EcdsaDeviceUniqueAttestationID) { // Collection of valid attestation ID tags. auto attestation_id_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&attestation_id_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } vector<uint8_t> key_blob; vector<KeyCharacteristics> key_characteristics; Loading
security/keymint/aidl/vts/functional/KeyMintTest.cpp +29 −3 Original line number Diff line number Diff line Loading @@ -2080,12 +2080,38 @@ TEST_P(NewKeyGenerationTest, EcdsaAttestationIdTags) { // Various ATTESTATION_ID_* tags that map to fields in the attestation extension ASN.1 schema. auto extra_tags = AuthorizationSetBuilder(); // Use ro.product.brand_for_attestation property for attestation if it is present else fallback // to ro.product.brand std::string prop_value = ::android::base::GetProperty("ro.product.brand_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_BRAND, "ro.product.brand"); } add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_DEVICE, "ro.product.device"); // Use ro.product.name_for_attestation property for attestation if it is present else fallback // to ro.product.name prop_value = ::android::base::GetProperty("ro.product.name_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_PRODUCT, "ro.product.name"); } add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_SERIAL, "ro.serialno"); add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MANUFACTURER, "ro.product.manufacturer"); // Use ro.product.model_for_attestation property for attestation if it is present else fallback // to ro.product.model prop_value = ::android::base::GetProperty("ro.product.model_for_attestation", /* default= */ ""); if (!prop_value.empty()) { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model_for_attestation"); } else { add_tag_from_prop(&extra_tags, TAG_ATTESTATION_ID_MODEL, "ro.product.model"); } for (const KeyParameter& tag : extra_tags) { SCOPED_TRACE(testing::Message() << "tag-" << tag); Loading