]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Application for Cryptographic Primitives Validation.\r | |
3 | \r | |
4 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r | |
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 | |
15 | #include "Cryptest.h"\r | |
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 | |
39 | RandomSeed (NULL, 0);\r | |
40 | \r | |
41 | Status = ValidateCryptDigest ();\r | |
42 | if (EFI_ERROR (Status)) {\r | |
43 | return Status;\r | |
44 | }\r | |
45 | \r | |
46 | Status = ValidateCryptHmac ();\r | |
47 | if (EFI_ERROR (Status)) {\r | |
48 | return Status;\r | |
49 | }\r | |
50 | \r | |
51 | Status = ValidateCryptBlockCipher ();\r | |
52 | if (EFI_ERROR (Status)) {\r | |
53 | return Status;\r | |
54 | }\r | |
55 | \r | |
56 | Status = ValidateCryptRsa ();\r | |
57 | if (EFI_ERROR (Status)) {\r | |
58 | return Status;\r | |
59 | }\r | |
60 | \r | |
61 | Status = ValidateCryptRsa2 ();\r | |
62 | if (EFI_ERROR (Status)) {\r | |
63 | return Status;\r | |
64 | }\r | |
65 | \r | |
66 | Status = ValidateCryptPkcs5Pbkdf2 ();\r | |
67 | if (EFI_ERROR (Status)) {\r | |
68 | return Status;\r | |
69 | }\r | |
70 | \r | |
71 | Status = ValidateCryptPkcs7 ();\r | |
72 | if (EFI_ERROR (Status)) {\r | |
73 | return Status;\r | |
74 | }\r | |
75 | \r | |
76 | Status = ValidateAuthenticode ();\r | |
77 | if (EFI_ERROR (Status)) {\r | |
78 | return Status;\r | |
79 | }\r | |
80 | \r | |
81 | Status = ValidateTSCounterSignature ();\r | |
82 | if (EFI_ERROR (Status)) {\r | |
83 | return Status;\r | |
84 | }\r | |
85 | \r | |
86 | Status = ValidateCryptDh ();\r | |
87 | if (EFI_ERROR (Status)) {\r | |
88 | return Status;\r | |
89 | }\r | |
90 | \r | |
91 | Status = ValidateCryptPrng ();\r | |
92 | if (EFI_ERROR (Status)) {\r | |
93 | return Status;\r | |
94 | }\r | |
95 | \r | |
96 | return EFI_SUCCESS;\r | |
97 | }\r |