Update CryptoPkg for new ciphers (HMAC, Block Cipher, etc) supports.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10997 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qlong
2010-11-02 06:06:38 +00:00
parent 85c0b5ee7f
commit a8c4464502
32 changed files with 5292 additions and 610 deletions

View File

@@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseCryptLib.h>
#include "Cryptest.h"
//
// DER encoding of SpcIndirectDataContent (Authenticode-specific Structure)
@@ -656,3 +652,30 @@ AuthenticodeVerify (
return Status;
}
/**
Validate UEFI-OpenSSL PKCS#7 Verification Interfaces.
@retval EFI_SUCCESS Validation succeeded.
@retval EFI_ABORTED Validation failed.
**/
EFI_STATUS
ValidateAuthenticode (
VOID
)
{
Print (L"\nUEFI-OpenSSL PKCS#7-Signed-Data Testing: ");
Print (L"\n- Authenticode (PKCS#7 Signed Data) Verification ... ");
if (AuthenticodeVerify ()) {
Print (L"[Pass]");
} else {
Print (L"[Fail]");
}
Print (L"\n");
return EFI_SUCCESS;
}