From e63c5bb5c32fbda553637a4d43994e17af2b110c Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Thu, 14 Sep 2023 15:16:27 +0100 Subject: [PATCH] KeyMint: check missing EC_CURVE on v3+ The original change to add this test didn't make it into the Android 13 version of the VTS test, so the version gate needs to be updated to be v3+ Bug: 292318194 Test: VtsAidlKeyMintTargetTest --gtest_filter="*EcdsaMissingCurve*" (cherry picked from https://android-review.googlesource.com/q/commit:9ed7d2c5bfa3958ef399567e12d84a3f67f0cb80) Merged-In: I94bf816688e57c7c04893a23cf0399129de94229 Change-Id: I94bf816688e57c7c04893a23cf0399129de94229 --- security/keymint/aidl/vts/functional/KeyMintTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp index 1297d1d978..2e6fa3b492 100644 --- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp @@ -2630,16 +2630,16 @@ TEST_P(NewKeyGenerationTest, EcdsaInvalidCurve) { /* * NewKeyGenerationTest.EcdsaMissingCurve * - * Verifies that EC key generation fails if EC_CURVE not specified after KeyMint V2. + * Verifies that EC key generation fails if EC_CURVE not specified after KeyMint V3. */ TEST_P(NewKeyGenerationTest, EcdsaMissingCurve) { - if (AidlVersion() < 2) { + if (AidlVersion() < 3) { /* * The KeyMint V1 spec required that EC_CURVE be specified for EC keys. * However, this was not checked at the time so we can only be strict about checking this - * for implementations of KeyMint version 2 and above. + * for implementations of KeyMint version 3 and above. */ - GTEST_SKIP() << "Requiring EC_CURVE only strict since KeyMint v2"; + GTEST_SKIP() << "Requiring EC_CURVE only strict since KeyMint v3"; } /* If EC_CURVE not provided, generateKey * must return ErrorCode::UNSUPPORTED_KEY_SIZE or ErrorCode::UNSUPPORTED_EC_CURVE.