Skip to content

Commit

Permalink
[tests,common] Fix local variable names in CryptoTest.PEMToX509Certs
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Grytsov <[email protected]>
  • Loading branch information
al1img committed Feb 13, 2024
1 parent 06d5a05 commit 57e0f27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/common/src/crypto_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,16 +483,16 @@ TEST(CryptoTest, PEMToX509Certs)

ASSERT_EQ(crypto.ASN1EncodeDN(subjectName, templ.mIssuer), aos::ErrorEnum::eNone);

aos::StaticArray<uint8_t, aos::crypto::cECDSAParamsOIDSize> mParamsOID;
aos::StaticArray<uint8_t, aos::crypto::cECDSAPointDERSize> mECPoint;
aos::StaticArray<uint8_t, aos::crypto::cECDSAParamsOIDSize> paramsOID;
aos::StaticArray<uint8_t, aos::crypto::cECDSAPointDERSize> ecPoint;

auto ecPrivateKey = GenerateECPrivateKey();
ASSERT_EQ(ecPrivateKey.first, aos::ErrorEnum::eNone);

auto ret = ExtractECPublicKeyFromPrivate(mParamsOID, mECPoint, ecPrivateKey.second);
auto ret = ExtractECPublicKeyFromPrivate(paramsOID, ecPoint, ecPrivateKey.second);
ASSERT_EQ(ret, 0);

aos::crypto::ECDSAPublicKey ecdsaPublicKey(mParamsOID, mECPoint);
aos::crypto::ECDSAPublicKey ecdsaPublicKey(paramsOID, ecPoint);

ECDSAPrivateKey ecdsaPK(ecdsaPublicKey, std::move(ecPrivateKey.second));

Expand Down

0 comments on commit 57e0f27

Please sign in to comment.