Loading keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +23 −19 Original line number Diff line number Diff line Loading @@ -4338,6 +4338,8 @@ TEST_F(AttestationTest, EcAttestationRequiresAttestationAppId) { * to specify how many following bytes will be used to encode the length. */ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { std::vector<uint32_t> app_id_lengths{143, 258}; for (uint32_t length : app_id_lengths) { auto creation_time = std::chrono::system_clock::now(); ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder() .Authorization(TAG_NO_AUTH_REQUIRED) Loading @@ -4345,7 +4347,7 @@ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { .Digest(Digest::SHA_2_256))); hidl_vec<hidl_vec<uint8_t>> cert_chain; const string app_id(143, 'a'); const string app_id(length, 'a'); ASSERT_EQ(ErrorCode::OK, AttestKey(AuthorizationSetBuilder() .Authorization(TAG_ATTESTATION_CHALLENGE, HidlBuf("challenge")) Loading @@ -4357,6 +4359,8 @@ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { key_characteristics_.softwareEnforced, // key_characteristics_.hardwareEnforced, // SecLevel(), cert_chain[0], creation_time)); CheckedDeleteKey(); } } /* * AttestationTest.AesAttestation Loading Loading
keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +23 −19 Original line number Diff line number Diff line Loading @@ -4338,6 +4338,8 @@ TEST_F(AttestationTest, EcAttestationRequiresAttestationAppId) { * to specify how many following bytes will be used to encode the length. */ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { std::vector<uint32_t> app_id_lengths{143, 258}; for (uint32_t length : app_id_lengths) { auto creation_time = std::chrono::system_clock::now(); ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder() .Authorization(TAG_NO_AUTH_REQUIRED) Loading @@ -4345,7 +4347,7 @@ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { .Digest(Digest::SHA_2_256))); hidl_vec<hidl_vec<uint8_t>> cert_chain; const string app_id(143, 'a'); const string app_id(length, 'a'); ASSERT_EQ(ErrorCode::OK, AttestKey(AuthorizationSetBuilder() .Authorization(TAG_ATTESTATION_CHALLENGE, HidlBuf("challenge")) Loading @@ -4357,6 +4359,8 @@ TEST_F(AttestationTest, AttestationApplicationIDLengthProperlyEncoded) { key_characteristics_.softwareEnforced, // key_characteristics_.hardwareEnforced, // SecLevel(), cert_chain[0], creation_time)); CheckedDeleteKey(); } } /* * AttestationTest.AesAttestation Loading