TianoCore EDK2 master
Loading...
Searching...
No Matches
TestBaseCryptLib.h
Go to the documentation of this file.
1
9#ifndef __CRYPTEST_H__
10#define __CRYPTEST_H__
11
12#include <PiPei.h>
13#include <Uefi.h>
14#include <Library/UefiLib.h>
15#include <Library/DebugLib.h>
16#include <Library/UnitTestLib.h>
17#include <Library/PrintLib.h>
19#include <Library/BaseLib.h>
22// #include <UnitTestTypes.h>
23#include <Library/UnitTestLib.h>
24// #include <Library/UnitTestAssertLib.h>
25
26#define UNIT_TEST_NAME "BaseCryptLib Unit Test"
27#define UNIT_TEST_VERSION "1.0"
28
29typedef struct {
30 CHAR8 *Description;
31 CHAR8 *ClassName;
34 UNIT_TEST_CLEANUP CleanUp;
35 UNIT_TEST_CONTEXT Context;
36} TEST_DESC;
37
38typedef struct {
39 CHAR8 *Title;
40 CHAR8 *Package;
43 UINTN *TestNum;
44 TEST_DESC *TestDesc;
46
47extern UINTN mPkcs7EkuTestNum;
48extern TEST_DESC mPkcs7EkuTest[];
49
50extern UINTN mHashTestNum;
51extern TEST_DESC mHashTest[];
52
53extern UINTN mHmacTestNum;
54extern TEST_DESC mHmacTest[];
55
56extern UINTN mBlockCipherTestNum;
57extern TEST_DESC mBlockCipherTest[];
58
59extern UINTN mRsaTestNum;
60extern TEST_DESC mRsaTest[];
61
62extern UINTN mRsaCertTestNum;
63extern TEST_DESC mRsaCertTest[];
64
65extern UINTN mPkcs7TestNum;
66extern TEST_DESC mPkcs7Test[];
67
68extern UINTN mPkcs5TestNum;
69extern TEST_DESC mPkcs5Test[];
70
71extern UINTN mAuthenticodeTestNum;
72extern TEST_DESC mAuthenticodeTest[];
73
74extern UINTN mImageTimestampTestNum;
75extern TEST_DESC mImageTimestampTest[];
76
77extern UINTN mDhTestNum;
78extern TEST_DESC mDhTest[];
79
80extern UINTN mPrngTestNum;
81extern TEST_DESC mPrngTest[];
82
83extern UINTN mOaepTestNum;
84extern TEST_DESC mOaepTest[];
85
86extern UINTN mRsaPssTestNum;
87extern TEST_DESC mRsaPssTest[];
88
89extern UINTN mHkdfTestNum;
90extern TEST_DESC mHkdfTest[];
91
92extern UINTN mAeadAesGcmTestNum;
93extern TEST_DESC mAeadAesGcmTest[];
94
95extern UINTN mBnTestNum;
96extern TEST_DESC mBnTest[];
97
98extern UINTN mEcTestNum;
99extern TEST_DESC mEcTest[];
100
101extern UINTN mX509TestNum;
102extern TEST_DESC mX509Test[];
103
106EFIAPI
108 IN CHAR8 *UnitTestName,
109 IN CHAR8 *UnitTestVersion,
110 IN OUT UNIT_TEST_FRAMEWORK_HANDLE *Framework
111 );
112
122 VOID
123 );
124
134 VOID
135 );
136
137#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS ValidateCryptDh(VOID)
EFI_STATUS ValidateCryptPrng(VOID)
EFI_STATUS EFIAPI CreateUnitTest(IN CHAR8 *UnitTestName, IN CHAR8 *UnitTestVersion, IN OUT UNIT_TEST_FRAMEWORK_HANDLE *Framework)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UNIT_TEST_STATUS(EFIAPI * UNIT_TEST_PREREQUISITE)(IN UNIT_TEST_CONTEXT Context)
Definition: UnitTestLib.h:103
VOID * UNIT_TEST_CONTEXT
Definition: UnitTestLib.h:54
VOID(EFIAPI * UNIT_TEST_SUITE_TEARDOWN)(VOID)
Definition: UnitTestLib.h:158
VOID(EFIAPI * UNIT_TEST_SUITE_SETUP)(VOID)
Definition: UnitTestLib.h:144
UNIT_TEST_STATUS(EFIAPI * UNIT_TEST_FUNCTION)(IN UNIT_TEST_CONTEXT Context)
Definition: UnitTestLib.h:77
VOID(EFIAPI * UNIT_TEST_CLEANUP)(IN UNIT_TEST_CONTEXT Context)
Definition: UnitTestLib.h:130