2014-11-12 09:51:45 +01:00
|
|
|
/** @file
|
2010-11-01 07:30:58 +01:00
|
|
|
Application for Cryptographic Primitives Validation.
|
|
|
|
|
2016-11-01 03:38:36 +01:00
|
|
|
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
2010-11-01 07:30:58 +01:00
|
|
|
This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2010-11-02 07:06:38 +01:00
|
|
|
#include "Cryptest.h"
|
2010-11-01 07:30:58 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
Entry Point of Cryptographic Validation Utility.
|
|
|
|
|
|
|
|
@param ImageHandle The image handle of the UEFI Application.
|
|
|
|
@param SystemTable A pointer to the EFI System Table.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
|
|
|
@retval other Some error occurs when executing this entry point.
|
|
|
|
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
CryptestMain (
|
|
|
|
IN EFI_HANDLE ImageHandle,
|
|
|
|
IN EFI_SYSTEM_TABLE *SystemTable
|
|
|
|
)
|
|
|
|
{
|
|
|
|
EFI_STATUS Status;
|
|
|
|
|
|
|
|
Print (L"\nUEFI-OpenSSL Wrapper Cryptosystem Testing: \n");
|
|
|
|
Print (L"-------------------------------------------- \n");
|
|
|
|
|
2010-11-02 07:06:38 +01:00
|
|
|
RandomSeed (NULL, 0);
|
|
|
|
|
2010-11-01 07:30:58 +01:00
|
|
|
Status = ValidateCryptDigest ();
|
2010-11-02 07:06:38 +01:00
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-11-01 07:30:58 +01:00
|
|
|
Status = ValidateCryptHmac ();
|
2010-11-02 07:06:38 +01:00
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-11-01 07:30:58 +01:00
|
|
|
Status = ValidateCryptBlockCipher ();
|
2010-11-02 07:06:38 +01:00
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-11-01 07:30:58 +01:00
|
|
|
Status = ValidateCryptRsa ();
|
2010-11-02 07:06:38 +01:00
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-12-31 08:22:48 +01:00
|
|
|
Status = ValidateCryptRsa2 ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2016-11-01 03:38:36 +01:00
|
|
|
Status = ValidateCryptPkcs5Pbkdf2 ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2011-08-16 08:46:52 +02:00
|
|
|
Status = ValidateCryptPkcs7 ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-11-01 07:30:58 +01:00
|
|
|
Status = ValidateAuthenticode ();
|
2010-11-02 07:06:38 +01:00
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2014-11-12 09:51:45 +01:00
|
|
|
Status = ValidateTSCounterSignature ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2010-11-02 07:06:38 +01:00
|
|
|
Status = ValidateCryptDh ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
2010-11-01 07:30:58 +01:00
|
|
|
|
2010-11-02 07:06:38 +01:00
|
|
|
Status = ValidateCryptPrng ();
|
|
|
|
if (EFI_ERROR (Status)) {
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
|
|
|
return EFI_SUCCESS;
|
2016-11-01 03:38:36 +01:00
|
|
|
}
|