]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Pk/CryptAuthenticodeNull.c
Add interfaces to several library instances of BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptAuthenticodeNull.c
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptAuthenticodeNull.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptAuthenticodeNull.c
new file mode 100644 (file)
index 0000000..5554486
--- /dev/null
@@ -0,0 +1,51 @@
+/** @file\r
+  Authenticode Portable Executable Signature Verification which does not provide\r
+  real capabilities.\r
+\r
+Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "InternalCryptLib.h"\r
+\r
+/**\r
+  Verifies the validility of a PE/COFF Authenticode Signature as described in "Windows\r
+  Authenticode Portable Executable Signature Format".\r
+\r
+  Return FALSE to indicate this interface is not supported.\r
+\r
+  @param[in]  AuthData     Pointer to the Authenticode Signature retrieved from signed\r
+                           PE/COFF image to be verified.\r
+  @param[in]  DataSize     Size of the Authenticode Signature in bytes.\r
+  @param[in]  TrustedCert  Pointer to a trusted/root certificate encoded in DER, which\r
+                           is used for certificate chain verification.\r
+  @param[in]  CertSize     Size of the trusted certificate in bytes.\r
+  @param[in]  ImageHash    Pointer to the original image file hash value. The procudure\r
+                           for calculating the image hash value is described in Authenticode\r
+                           specification.\r
+  @param[in]  HashSize     Size of Image hash value in bytes.\r
+\r
+  @retval FALSE  This interface is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+AuthenticodeVerify (\r
+  IN  CONST UINT8  *AuthData,\r
+  IN  UINTN        DataSize,\r
+  IN  CONST UINT8  *TrustedCert,\r
+  IN  UINTN        CertSize,\r
+  IN  CONST UINT8  *ImageHash,\r
+  IN  UINTN        HashSize\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return FALSE;\r
+}\r