blob: 44aaabadea6a177e6112c8b39f935ba43980566e [file] [log] [blame]
hhtian97f98502010-11-01 06:30:58 +00001/** @file
2 Application for Cryptographic Primitives Validation.
3
tye1b7d320f2011-08-16 06:46:52 +00004Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
hhtian97f98502010-11-01 06:30:58 +00005This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
qlonga8c44642010-11-02 06:06:38 +000015#include "Cryptest.h"
hhtian97f98502010-11-01 06:30:58 +000016
17/**
18 Entry Point of Cryptographic Validation Utility.
19
20 @param ImageHandle The image handle of the UEFI Application.
21 @param SystemTable A pointer to the EFI System Table.
22
23 @retval EFI_SUCCESS The entry point is executed successfully.
24 @retval other Some error occurs when executing this entry point.
25
26**/
27EFI_STATUS
28EFIAPI
29CryptestMain (
30 IN EFI_HANDLE ImageHandle,
31 IN EFI_SYSTEM_TABLE *SystemTable
32 )
33{
34 EFI_STATUS Status;
35
36 Print (L"\nUEFI-OpenSSL Wrapper Cryptosystem Testing: \n");
37 Print (L"-------------------------------------------- \n");
38
qlonga8c44642010-11-02 06:06:38 +000039 RandomSeed (NULL, 0);
hhtian97f98502010-11-01 06:30:58 +000040
qlonga8c44642010-11-02 06:06:38 +000041 Status = ValidateCryptDigest ();
42 if (EFI_ERROR (Status)) {
43 return Status;
44 }
45
46 Status = ValidateCryptHmac ();
47 if (EFI_ERROR (Status)) {
48 return Status;
49 }
50
51 Status = ValidateCryptBlockCipher ();
52 if (EFI_ERROR (Status)) {
53 return Status;
54 }
55
56 Status = ValidateCryptRsa ();
57 if (EFI_ERROR (Status)) {
58 return Status;
59 }
60
qlong4a567c92010-12-31 07:22:48 +000061 Status = ValidateCryptRsa2 ();
62 if (EFI_ERROR (Status)) {
63 return Status;
64 }
65
tye1b7d320f2011-08-16 06:46:52 +000066 Status = ValidateCryptPkcs7 ();
67 if (EFI_ERROR (Status)) {
68 return Status;
69 }
70
qlonga8c44642010-11-02 06:06:38 +000071 Status = ValidateAuthenticode ();
72 if (EFI_ERROR (Status)) {
73 return Status;
74 }
75
76 Status = ValidateCryptDh ();
77 if (EFI_ERROR (Status)) {
78 return Status;
79 }
80
81 Status = ValidateCryptPrng ();
82 if (EFI_ERROR (Status)) {
83 return Status;
84 }
85
86 return EFI_SUCCESS;
hhtian97f98502010-11-01 06:30:58 +000087}