TianoCore EDK2 master
|
#include "InternalCryptLib.h"
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/pkcs7.h>
Go to the source code of this file.
Functions | |
BOOLEAN EFIAPI | Pkcs7Sign (IN CONST UINT8 *PrivateKey, IN UINTN PrivateKeySize, IN CONST UINT8 *KeyPassword, IN UINT8 *InData, IN UINTN InDataSize, IN UINT8 *SignCert, IN UINT8 *OtherCerts OPTIONAL, OUT UINT8 **SignedData, OUT UINTN *SignedDataSize) |
PKCS#7 SignedData Sign Wrapper Implementation over OpenSSL.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CryptPkcs7Sign.c.
BOOLEAN EFIAPI Pkcs7Sign | ( | IN CONST UINT8 * | PrivateKey, |
IN UINTN | PrivateKeySize, | ||
IN CONST UINT8 * | KeyPassword, | ||
IN UINT8 * | InData, | ||
IN UINTN | InDataSize, | ||
IN UINT8 * | SignCert, | ||
IN UINT8 *OtherCerts | OPTIONAL, | ||
OUT UINT8 ** | SignedData, | ||
OUT UINTN * | SignedDataSize | ||
) |
Creates a PKCS#7 signedData as described in "PKCS #7: Cryptographic Message Syntax Standard, version 1.5". This interface is only intended to be used for application to perform PKCS#7 functionality validation.
[in] | PrivateKey | Pointer to the PEM-formatted private key data for data signing. |
[in] | PrivateKeySize | Size of the PEM private key data in bytes. |
[in] | KeyPassword | NULL-terminated passphrase used for encrypted PEM key data. |
[in] | InData | Pointer to the content to be signed. |
[in] | InDataSize | Size of InData in bytes. |
[in] | SignCert | Pointer to signer's DER-encoded certificate to sign with. |
[in] | OtherCerts | Pointer to an optional additional set of certificates to include in the PKCS#7 signedData (e.g. any intermediate CAs in the chain). |
[out] | SignedData | Pointer to output PKCS#7 signedData. It's caller's responsibility to free the buffer with FreePool(). |
[out] | SignedDataSize | Size of SignedData in bytes. |
TRUE | PKCS#7 data signing succeeded. |
FALSE | PKCS#7 data signing failed. |
Definition at line 41 of file CryptPkcs7Sign.c.