Remove the empty property of attestation.
In GSI images attestation specific properties (ro.product.*_for_attestation) are empty, which causes attestation failure on devices with different values in ro.product.* and ro.product.vendor.* from actual values provisioned in Keymint. Hence these values added only if they are set in build files. Bug:294190893 Test: atest CtsKeystoreTestCases:android.keystore.cts.DeviceOwnerKeyManagementTest#testAllVariationsOfDeviceIdAttestation Change-Id: Icaf1bcd089767b2c47d0b57064aa72a4c9483bb5 Signed-off-by: wufei3 <wufei3@xiaomi.corp-partner.google.com>
This commit is contained in:
parent
66f7958fbf
commit
99fafaec22
1 changed files with 15 additions and 3 deletions
|
@ -47,9 +47,21 @@ define generate-common-build-props
|
|||
echo "ro.product.$(1).model=$(PRODUCT_MODEL)" >> $(2);\
|
||||
echo "ro.product.$(1).name=$(TARGET_PRODUCT)" >> $(2);\
|
||||
# Attestation specific properties for AOSP/GSI build running on device.
|
||||
if [ -n "$(strip $(PRODUCT_MODEL_FOR_ATTESTATION))" ]; then \
|
||||
echo "ro.product.model_for_attestation=$(PRODUCT_MODEL_FOR_ATTESTATION)" >> $(2);\
|
||||
fi; \
|
||||
if [ -n "$(strip $(PRODUCT_BRAND_FOR_ATTESTATION))" ]; then \
|
||||
echo "ro.product.brand_for_attestation=$(PRODUCT_BRAND_FOR_ATTESTATION)" >> $(2);\
|
||||
fi; \
|
||||
if [ -n "$(strip $(PRODUCT_NAME_FOR_ATTESTATION))" ]; then \
|
||||
echo "ro.product.name_for_attestation=$(PRODUCT_NAME_FOR_ATTESTATION)" >> $(2);\
|
||||
fi; \
|
||||
if [ -n "$(strip $(PRODUCT_DEVICE_FOR_ATTESTATION))" ]; then \
|
||||
echo "ro.product.device_for_attestation=$(PRODUCT_DEVICE_FOR_ATTESTATION)" >> $(2);\
|
||||
fi; \
|
||||
if [ -n "$(strip $(PRODUCT_MANUFACTURER_FOR_ATTESTATION))" ]; then \
|
||||
echo "ro.product.manufacturer_for_attestation=$(PRODUCT_MANUFACTURER_FOR_ATTESTATION)" >> $(2);\
|
||||
fi; \
|
||||
)\
|
||||
$(if $(filter true,$(ZYGOTE_FORCE_64)),\
|
||||
$(if $(filter vendor,$(1)),\
|
||||
|
|
Loading…
Reference in a new issue