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