summaryrefslogtreecommitdiff
path: root/security/keymint/aidl/vts/functional/KeyMintTest.cpp
diff options
context:
space:
mode:
authorDavid Drysdale <drysdale@google.com>2021-12-13 17:09:42 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-13 17:09:42 +0000
commit9758dcae187e3b8c97cba900a928bc3b7d0aacc3 (patch)
treea949d9263ab45fc259952df5a5a2186663149493 /security/keymint/aidl/vts/functional/KeyMintTest.cpp
parent3ef44eb5b0e821169f7ea2d04b238ff03269c162 (diff)
parent633046efb2d51a5f4e01c323179e8376d817b843 (diff)
Merge "Revert "KeyMint HAL: add curve 25519, bump version"" am: 391a772300 am: f121b2c2bb am: 4df4387267 am: 633046efb2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1918632 Change-Id: I465283c26ef3a281a07a83dbe3c33a138c2eac75
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r--security/keymint/aidl/vts/functional/KeyMintTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 76f27943b2..d8b19dcf4f 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -6661,7 +6661,7 @@ INSTANTIATE_KEYMINT_AIDL_TEST(TransportLimitTest);
typedef KeyMintAidlTestBase KeyAgreementTest;
-static int EcdhCurveToOpenSslCurveName(EcCurve curve) {
+int CurveToOpenSslCurveName(EcCurve curve) {
switch (curve) {
case EcCurve::P_224:
return NID_secp224r1;
@@ -6671,8 +6671,6 @@ static int EcdhCurveToOpenSslCurveName(EcCurve curve) {
return NID_secp384r1;
case EcCurve::P_521:
return NID_secp521r1;
- case EcCurve::CURVE_25519:
- return NID_X25519;
}
}
@@ -6694,7 +6692,7 @@ TEST_P(KeyAgreementTest, Ecdh) {
for (auto localCurve : ValidCurves()) {
// Generate EC key locally (with access to private key material)
auto ecKey = EC_KEY_Ptr(EC_KEY_new());
- int curveName = EcdhCurveToOpenSslCurveName(localCurve);
+ int curveName = CurveToOpenSslCurveName(localCurve);
auto group = EC_GROUP_Ptr(EC_GROUP_new_by_curve_name(curveName));
ASSERT_NE(group, nullptr);
ASSERT_EQ(EC_KEY_set_group(ecKey.get(), group.get()), 1);