]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs7SignNull.c
CryptoPkg: Add Null instance of the BaseCryptLib class
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Pk / CryptPkcs7SignNull.c
diff --git a/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs7SignNull.c b/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs7SignNull.c
new file mode 100644 (file)
index 0000000..d7ff8ba
--- /dev/null
@@ -0,0 +1,54 @@
+/** @file\r
+  PKCS#7 SignedData Sign Wrapper Implementation which does not provide real\r
+  capabilities.\r
+\r
+Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include "InternalCryptLib.h"\r
+\r
+/**\r
+  Creates a PKCS#7 signedData as described in "PKCS #7: Cryptographic Message\r
+  Syntax Standard, version 1.5". This interface is only intended to be used for\r
+  application to perform PKCS#7 functionality validation.\r
+\r
+  Return FALSE to indicate this interface is not supported.\r
+\r
+  @param[in]  PrivateKey       Pointer to the PEM-formatted private key data for\r
+                               data signing.\r
+  @param[in]  PrivateKeySize   Size of the PEM private key data in bytes.\r
+  @param[in]  KeyPassword      NULL-terminated passphrase used for encrypted PEM\r
+                               key data.\r
+  @param[in]  InData           Pointer to the content to be signed.\r
+  @param[in]  InDataSize       Size of InData in bytes.\r
+  @param[in]  SignCert         Pointer to signer's DER-encoded certificate to sign with.\r
+  @param[in]  OtherCerts       Pointer to an optional additional set of certificates to\r
+                               include in the PKCS#7 signedData (e.g. any intermediate\r
+                               CAs in the chain).\r
+  @param[out] SignedData       Pointer to output PKCS#7 signedData. It's caller's\r
+                               responsibility to free the buffer with FreePool().\r
+  @param[out] SignedDataSize   Size of SignedData in bytes.\r
+\r
+  @retval FALSE  This interface is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+Pkcs7Sign (\r
+  IN   CONST UINT8  *PrivateKey,\r
+  IN   UINTN        PrivateKeySize,\r
+  IN   CONST UINT8  *KeyPassword,\r
+  IN   UINT8        *InData,\r
+  IN   UINTN        InDataSize,\r
+  IN   UINT8        *SignCert,\r
+  IN   UINT8        *OtherCerts      OPTIONAL,\r
+  OUT  UINT8        **SignedData,\r
+  OUT  UINTN        *SignedDataSize\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return FALSE;\r
+}\r
+\r