CryptPkcs7SignNull.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /** @file
  2. PKCS#7 SignedData Sign Wrapper Implementation which does not provide real
  3. capabilities.
  4. Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #include "InternalCryptLib.h"
  8. /**
  9. Creates a PKCS#7 signedData as described in "PKCS #7: Cryptographic Message
  10. Syntax Standard, version 1.5". This interface is only intended to be used for
  11. application to perform PKCS#7 functionality validation.
  12. Return FALSE to indicate this interface is not supported.
  13. @param[in] PrivateKey Pointer to the PEM-formatted private key data for
  14. data signing.
  15. @param[in] PrivateKeySize Size of the PEM private key data in bytes.
  16. @param[in] KeyPassword NULL-terminated passphrase used for encrypted PEM
  17. key data.
  18. @param[in] InData Pointer to the content to be signed.
  19. @param[in] InDataSize Size of InData in bytes.
  20. @param[in] SignCert Pointer to signer's DER-encoded certificate to sign with.
  21. @param[in] OtherCerts Pointer to an optional additional set of certificates to
  22. include in the PKCS#7 signedData (e.g. any intermediate
  23. CAs in the chain).
  24. @param[out] SignedData Pointer to output PKCS#7 signedData. It's caller's
  25. responsibility to free the buffer with FreePool().
  26. @param[out] SignedDataSize Size of SignedData in bytes.
  27. @retval FALSE This interface is not supported.
  28. **/
  29. BOOLEAN
  30. EFIAPI
  31. Pkcs7Sign (
  32. IN CONST UINT8 *PrivateKey,
  33. IN UINTN PrivateKeySize,
  34. IN CONST UINT8 *KeyPassword,
  35. IN UINT8 *InData,
  36. IN UINTN InDataSize,
  37. IN UINT8 *SignCert,
  38. IN UINT8 *OtherCerts OPTIONAL,
  39. OUT UINT8 **SignedData,
  40. OUT UINTN *SignedDataSize
  41. )
  42. {
  43. ASSERT (FALSE);
  44. return FALSE;
  45. }