Fixing a test in DeviceUniqueAttestationTest
The EC key check for generating a device unique attestation from a
non-strongbox keymaster instance left out the
TAG_DEVICE_UNIQUE_ATTESTATION_TAG, so the test should fail since the
attestation should succeed. This commit adds the tag into the parameters
passed into attestation.
Fixes: 161327512
Test: m VtsHalKeymasterV4_1TargetTest
Change-Id: I75a41a75b298c91ec41fa411f8a486ac347cf748
diff --git a/keymaster/4.1/vts/functional/DeviceUniqueAttestationTest.cpp b/keymaster/4.1/vts/functional/DeviceUniqueAttestationTest.cpp
index 495de0f..f74d36c 100644
--- a/keymaster/4.1/vts/functional/DeviceUniqueAttestationTest.cpp
+++ b/keymaster/4.1/vts/functional/DeviceUniqueAttestationTest.cpp
@@ -212,6 +212,7 @@
EXPECT_EQ(ErrorCode::UNIMPLEMENTED,
convert(AttestKey(
AuthorizationSetBuilder()
+ .Authorization(TAG_DEVICE_UNIQUE_ATTESTATION)
.Authorization(TAG_ATTESTATION_CHALLENGE, HidlBuf("challenge"))
.Authorization(TAG_ATTESTATION_APPLICATION_ID, HidlBuf("foo")),
&cert_chain)));