]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Application/Cryptest/Cryptest.c
Update CryptoPkg for new ciphers (HMAC, Block Cipher, etc) supports.
[mirror_edk2.git] / CryptoPkg / Application / Cryptest / Cryptest.c
CommitLineData
97f98500
HT
1/** @file \r
2 Application for Cryptographic Primitives Validation.\r
3\r
4Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
27EFI_STATUS\r
28EFIAPI\r
29CryptestMain (\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
97f98500 61 Status = ValidateAuthenticode ();\r
a8c44645 62 if (EFI_ERROR (Status)) {\r
63 return Status;\r
64 }\r
65\r
66 Status = ValidateCryptDh ();\r
67 if (EFI_ERROR (Status)) {\r
68 return Status;\r
69 }\r
97f98500 70\r
a8c44645 71 Status = ValidateCryptPrng ();\r
72 if (EFI_ERROR (Status)) {\r
73 return Status;\r
74 }\r
75\r
76 return EFI_SUCCESS;\r
97f98500 77}\r