summaryrefslogtreecommitdiff
path: root/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c
diff options
context:
space:
mode:
Diffstat (limited to 'CryptoPkg/Application/Cryptest/AuthenticodeVerify.c')
-rw-r--r--CryptoPkg/Application/Cryptest/AuthenticodeVerify.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c b/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c
index 72c4092f82..7a4e29447e 100644
--- a/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c
+++ b/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c
@@ -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;
+}