summaryrefslogtreecommitdiff
path: root/security/keymint/aidl/vts/functional/KeyMintTest.cpp
diff options
context:
space:
mode:
authorDavid Drysdale <drysdale@google.com>2021-08-18 16:45:50 +0100
committerDavid Drysdale <drysdale@google.com>2021-08-19 17:14:18 +0100
commitca76a750968efb61f61718acdf5e0e9a84bc6962 (patch)
tree305db05f85acd1f1cbfb4f3c9242b6c2469903f0 /security/keymint/aidl/vts/functional/KeyMintTest.cpp
parentf332d02bc6bce486b67542462a999e98c9d0f0b9 (diff)
KeyMint VTS: add missing purpose/algo
Test was producing an invalid set of parameters in a different way than intended. Bug: 197222749 Test: VtsAidlKeyMintTargetTest Merged-In: I07f706fec81d91e8eee9c0561428142559c54f12 Change-Id: I07f706fec81d91e8eee9c0561428142559c54f12 Ignore-AOSP-First: this is a manual cross-merge
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r--security/keymint/aidl/vts/functional/KeyMintTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 5a87b83854..22988c4999 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -1837,12 +1837,13 @@ TEST_P(NewKeyGenerationTest, EcdsaMismatchKeySize) {
if (SecLevel() == SecurityLevel::STRONGBOX) return;
auto result = GenerateKey(AuthorizationSetBuilder()
+ .Authorization(TAG_ALGORITHM, Algorithm::EC)
.Authorization(TAG_KEY_SIZE, 224)
.Authorization(TAG_EC_CURVE, EcCurve::P_256)
+ .SigningKey()
.Digest(Digest::NONE)
.SetDefaultValidity());
- ASSERT_TRUE(result == ErrorCode::INVALID_ARGUMENT ||
- result == ErrorCode::UNSUPPORTED_ALGORITHM);
+ ASSERT_TRUE(result == ErrorCode::INVALID_ARGUMENT);
}
/*