Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c410f6fb authored by Shawn Willden's avatar Shawn Willden
Browse files

Make AttestKeyTest not crash if no cert is returned.

Test: VtsAidlKeyMintTargetTest
Change-Id: Ia3a6363d854742681f684ff989b98b7cfda30746
parent a3645d38
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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));