]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7SignNull.c
CryptoPkg: Add some comments for API usage clarification.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptPkcs7SignNull.c
CommitLineData
532616bb 1/** @file\r
2 PKCS#7 SignedData Sign Wrapper Implementation which does not provide real\r
3 capabilities.\r
4\r
5Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#include "InternalCryptLib.h"\r
17\r
18/**\r
19 Creates a PKCS#7 signedData as described in "PKCS #7: Cryptographic Message\r
20 Syntax Standard, version 1.5". This interface is only intended to be used for\r
21 application to perform PKCS#7 functionality validation.\r
22\r
23 Return FALSE to indicate this interface is not supported.\r
24\r
25 @param[in] PrivateKey Pointer to the PEM-formatted private key data for\r
26 data signing.\r
27 @param[in] PrivateKeySize Size of the PEM private key data in bytes.\r
28 @param[in] KeyPassword NULL-terminated passphrase used for encrypted PEM\r
29 key data.\r
30 @param[in] InData Pointer to the content to be signed.\r
31 @param[in] InDataSize Size of InData in bytes.\r
32 @param[in] SignCert Pointer to signer's DER-encoded certificate to sign with.\r
33 @param[in] OtherCerts Pointer to an optional additional set of certificates to\r
34 include in the PKCS#7 signedData (e.g. any intermediate\r
35 CAs in the chain).\r
36 @param[out] SignedData Pointer to output PKCS#7 signedData.\r
37 @param[out] SignedDataSize Size of SignedData in bytes.\r
38\r
39 @retval FALSE This interface is not supported.\r
40\r
41**/\r
42BOOLEAN\r
43EFIAPI\r
44Pkcs7Sign (\r
45 IN CONST UINT8 *PrivateKey,\r
46 IN UINTN PrivateKeySize,\r
47 IN CONST UINT8 *KeyPassword,\r
48 IN UINT8 *InData,\r
49 IN UINTN InDataSize,\r
50 IN UINT8 *SignCert,\r
51 IN UINT8 *OtherCerts OPTIONAL,\r
52 OUT UINT8 **SignedData,\r
53 OUT UINTN *SignedDataSize\r
54 )\r
55{\r
56 ASSERT (FALSE);\r
57 return FALSE;\r
58}\r
59\r