]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Application/Cryptest/AuthenticodeVerify.c
Update CryptoPkg for new ciphers (HMAC, Block Cipher, etc) supports.
[mirror_edk2.git] / CryptoPkg / Application / Cryptest / AuthenticodeVerify.c
index 72c4092f822c35554916d64a3d424b22e34a3b85..7a4e29447ec716e501d124c9359984e11c893bb0 100644 (file)
@@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-\r
-#include <Library/BaseCryptLib.h>\r
+#include "Cryptest.h"\r
 \r
 //\r
 // DER encoding of SpcIndirectDataContent (Authenticode-specific Structure)\r
@@ -656,3 +652,30 @@ AuthenticodeVerify (
 \r
   return Status;\r
 }\r
+\r
+/**\r
+  Validate UEFI-OpenSSL PKCS#7 Verification Interfaces.\r
+\r
+  @retval  EFI_SUCCESS  Validation succeeded.\r
+  @retval  EFI_ABORTED  Validation failed.\r
+\r
+**/\r
+EFI_STATUS\r
+ValidateAuthenticode (\r
+  VOID\r
+  )\r
+{\r
+  Print (L"\nUEFI-OpenSSL PKCS#7-Signed-Data Testing: ");\r
+\r
+  Print (L"\n- Authenticode (PKCS#7 Signed Data) Verification ... ");\r
+\r
+  if (AuthenticodeVerify ()) {\r
+    Print (L"[Pass]");\r
+  } else {\r
+    Print (L"[Fail]");\r
+  }   \r
+\r
+  Print (L"\n");\r
+\r
+  return EFI_SUCCESS;\r
+}\r