diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp index afb2193887..5cca560ef9 100644 --- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp +++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp @@ -56,6 +56,7 @@ TEST_P(AttestKeyTest, AllRsaSizes) { {} /* attestation signing key */, &attest_key.keyBlob, &attest_key_characteristics, &attest_key_cert_chain)); + ASSERT_GT(attest_key_cert_chain.size(), 0); EXPECT_EQ(attest_key_cert_chain.size(), 1); EXPECT_TRUE(IsSelfSigned(attest_key_cert_chain)) << "Failed on size " << size; @@ -494,6 +495,7 @@ TEST_P(AttestKeyTest, AllEcCurves) { {} /* attestation siging key */, &attest_key.keyBlob, &attest_key_characteristics, &attest_key_cert_chain)); + ASSERT_GT(attest_key_cert_chain.size(), 0); EXPECT_EQ(attest_key_cert_chain.size(), 1); EXPECT_TRUE(IsSelfSigned(attest_key_cert_chain)) << "Failed on curve " << curve; @@ -577,6 +579,7 @@ TEST_P(AttestKeyTest, AttestWithNonAttestKey) { {} /* attestation siging key */, &non_attest_key.keyBlob, &non_attest_key_characteristics, &non_attest_key_cert_chain)); + ASSERT_GT(non_attest_key_cert_chain.size(), 0); EXPECT_EQ(non_attest_key_cert_chain.size(), 1); EXPECT_TRUE(IsSelfSigned(non_attest_key_cert_chain));