diff options
author | David Drysdale <drysdale@google.com> | 2021-12-13 16:14:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-12-13 16:14:16 +0000 |
commit | 391a7723003d1bfd3f52aa9e663abf1a23adf4a6 (patch) | |
tree | 0de96edd465ffedcdc145a50456fe5ab4b38d6f5 /security/keymint/aidl/vts/functional/KeyMintTest.cpp | |
parent | 924613950cd78daedaa6359a849b272ecd47ddad (diff) | |
parent | e76045d7b098b6f1a216472c23c41031b96b8a13 (diff) |
Merge "Revert "KeyMint HAL: add curve 25519, bump version""
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r-- | security/keymint/aidl/vts/functional/KeyMintTest.cpp | 6 |
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 161531d8f8..dc14771a14 100644 --- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp @@ -6618,7 +6618,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; @@ -6628,8 +6628,6 @@ static int EcdhCurveToOpenSslCurveName(EcCurve curve) { return NID_secp384r1; case EcCurve::P_521: return NID_secp521r1; - case EcCurve::CURVE_25519: - return NID_X25519; } } @@ -6651,7 +6649,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); |