X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=CryptoPkg%2FTest%2FUnitTest%2FLibrary%2FBaseCryptLib%2FDhTests.c;h=5cfe8d70535b852b18973256e482e57ad1c68b17;hb=7c342378317039e632d9a1a5d4cf7c21aec8cb7a;hp=422b990f2c2d9b03d3ea108e7a98601c27a5ebfc;hpb=2b16a4fb91b9b31c0d152588f5ac51080c6c0763;p=mirror_edk2.git diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c index 422b990f2c..5cfe8d7053 100644 --- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c +++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c @@ -8,13 +8,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "TestBaseCryptLib.h" -VOID *mDh1; -VOID *mDh2; +VOID *mDh1; +VOID *mDh2; UNIT_TEST_STATUS EFIAPI TestVerifyDhPreReq ( - UNIT_TEST_CONTEXT Context + UNIT_TEST_CONTEXT Context ) { mDh1 = DhNew (); @@ -33,13 +33,14 @@ TestVerifyDhPreReq ( VOID EFIAPI TestVerifyDhCleanUp ( - UNIT_TEST_CONTEXT Context + UNIT_TEST_CONTEXT Context ) { if (mDh1 != NULL) { DhFree (mDh1); mDh1 = NULL; } + if (mDh2 != NULL) { DhFree (mDh2); mDh2 = NULL; @@ -49,19 +50,19 @@ TestVerifyDhCleanUp ( UNIT_TEST_STATUS EFIAPI TestVerifyDhGenerateKey ( - UNIT_TEST_CONTEXT Context + UNIT_TEST_CONTEXT Context ) { - UINT8 Prime[64]; - UINT8 PublicKey1[64]; - UINTN PublicKey1Length; - UINT8 PublicKey2[64]; - UINTN PublicKey2Length; - UINT8 Key1[64]; - UINTN Key1Length; - UINT8 Key2[64]; - UINTN Key2Length; - BOOLEAN Status; + UINT8 Prime[64]; + UINT8 PublicKey1[64]; + UINTN PublicKey1Length; + UINT8 PublicKey2[64]; + UINTN PublicKey2Length; + UINT8 Key1[64]; + UINTN Key1Length; + UINT8 Key2[64]; + UINTN Key2Length; + BOOLEAN Status; // // Initialize Key Length @@ -96,11 +97,11 @@ TestVerifyDhGenerateKey ( return UNIT_TEST_PASSED; } -TEST_DESC mDhTest[] = { - // - // -----Description--------------------------------Class---------------------Function----------------Pre-----------------Post------------Context - // - {"TestVerifyDhGenerateKey()", "CryptoPkg.BaseCryptLib.Dh", TestVerifyDhGenerateKey, TestVerifyDhPreReq, TestVerifyDhCleanUp, NULL}, +TEST_DESC mDhTest[] = { + // + // -----Description--------------------------------Class---------------------Function----------------Pre-----------------Post------------Context + // + { "TestVerifyDhGenerateKey()", "CryptoPkg.BaseCryptLib.Dh", TestVerifyDhGenerateKey, TestVerifyDhPreReq, TestVerifyDhCleanUp, NULL }, }; -UINTN mDhTestNum = ARRAY_SIZE(mDhTest); +UINTN mDhTestNum = ARRAY_SIZE (mDhTest);