Commit | Line | Data |
---|---|---|
2ac68e8b | 1 | /** @file\r |
97f98500 HT |
2 | Application for Cryptographic Primitives Validation.\r |
3 | \r | |
a8f37449 | 4 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r |
97f98500 HT |
5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
a8c44645 | 15 | #include "Cryptest.h"\r |
97f98500 HT |
16 | \r |
17 | /**\r | |
18 | Entry Point of Cryptographic Validation Utility.\r | |
19 | \r | |
20 | @param ImageHandle The image handle of the UEFI Application.\r | |
21 | @param SystemTable A pointer to the EFI System Table.\r | |
22 | \r | |
23 | @retval EFI_SUCCESS The entry point is executed successfully.\r | |
24 | @retval other Some error occurs when executing this entry point.\r | |
25 | \r | |
26 | **/\r | |
27 | EFI_STATUS\r | |
28 | EFIAPI\r | |
29 | CryptestMain (\r | |
30 | IN EFI_HANDLE ImageHandle,\r | |
31 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
32 | )\r | |
33 | {\r | |
34 | EFI_STATUS Status;\r | |
35 | \r | |
36 | Print (L"\nUEFI-OpenSSL Wrapper Cryptosystem Testing: \n");\r | |
37 | Print (L"-------------------------------------------- \n");\r | |
38 | \r | |
a8c44645 | 39 | RandomSeed (NULL, 0);\r |
40 | \r | |
97f98500 | 41 | Status = ValidateCryptDigest ();\r |
a8c44645 | 42 | if (EFI_ERROR (Status)) {\r |
43 | return Status;\r | |
44 | }\r | |
45 | \r | |
97f98500 | 46 | Status = ValidateCryptHmac ();\r |
a8c44645 | 47 | if (EFI_ERROR (Status)) {\r |
48 | return Status;\r | |
49 | }\r | |
50 | \r | |
97f98500 | 51 | Status = ValidateCryptBlockCipher ();\r |
a8c44645 | 52 | if (EFI_ERROR (Status)) {\r |
53 | return Status;\r | |
54 | }\r | |
55 | \r | |
97f98500 | 56 | Status = ValidateCryptRsa ();\r |
a8c44645 | 57 | if (EFI_ERROR (Status)) {\r |
58 | return Status;\r | |
59 | }\r | |
60 | \r | |
4a567c96 | 61 | Status = ValidateCryptRsa2 ();\r |
62 | if (EFI_ERROR (Status)) {\r | |
63 | return Status;\r | |
64 | }\r | |
65 | \r | |
a8f37449 QL |
66 | Status = ValidateCryptPkcs5Pbkdf2 ();\r |
67 | if (EFI_ERROR (Status)) {\r | |
68 | return Status;\r | |
69 | }\r | |
70 | \r | |
b7d320f8 | 71 | Status = ValidateCryptPkcs7 ();\r |
72 | if (EFI_ERROR (Status)) {\r | |
73 | return Status;\r | |
74 | }\r | |
75 | \r | |
97f98500 | 76 | Status = ValidateAuthenticode ();\r |
a8c44645 | 77 | if (EFI_ERROR (Status)) {\r |
78 | return Status;\r | |
79 | }\r | |
80 | \r | |
2ac68e8b QL |
81 | Status = ValidateTSCounterSignature ();\r |
82 | if (EFI_ERROR (Status)) {\r | |
83 | return Status;\r | |
84 | }\r | |
85 | \r | |
a8c44645 | 86 | Status = ValidateCryptDh ();\r |
87 | if (EFI_ERROR (Status)) {\r | |
88 | return Status;\r | |
89 | }\r | |
97f98500 | 90 | \r |
a8c44645 | 91 | Status = ValidateCryptPrng ();\r |
92 | if (EFI_ERROR (Status)) {\r | |
93 | return Status;\r | |
94 | }\r | |
95 | \r | |
96 | return EFI_SUCCESS;\r | |
a8f37449 | 97 | }\r |