TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptPkcs7SignNull.c File Reference
#include "InternalCryptLib.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)
 

Detailed Description

PKCS#7 SignedData Sign Wrapper Implementation which does not provide real capabilities.

Copyright (c) 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CryptPkcs7SignNull.c.

Function Documentation

◆ Pkcs7Sign()

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.

Return FALSE to indicate this interface is not supported.

Parameters
[in]PrivateKeyPointer to the PEM-formatted private key data for data signing.
[in]PrivateKeySizeSize of the PEM private key data in bytes.
[in]KeyPasswordNULL-terminated passphrase used for encrypted PEM key data.
[in]InDataPointer to the content to be signed.
[in]InDataSizeSize of InData in bytes.
[in]SignCertPointer to signer's DER-encoded certificate to sign with.
[in]OtherCertsPointer to an optional additional set of certificates to include in the PKCS#7 signedData (e.g. any intermediate CAs in the chain).
[out]SignedDataPointer to output PKCS#7 signedData. It's caller's responsibility to free the buffer with FreePool().
[out]SignedDataSizeSize of SignedData in bytes.
Return values
FALSEThis interface is not supported.

Calculate InData Digest

Pk Sign

Enlarge buffer if buffer is too small

Definition at line 39 of file CryptPkcs7SignNull.c.