TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseCryptLib.h>
#include "CrtLibSupport.h"
#include <openssl/opensslv.h>
Go to the source code of this file.
Macros | |
#define | OPENSSL_NO_DEPRECATED 0 |
#define | OBJ_get0_data(o) ((o)->data) |
#define | OBJ_length(o) ((o)->length) |
Functions | |
BOOLEAN | WrapPkcs7Data (IN CONST UINT8 *P7Data, IN UINTN P7Length, OUT BOOLEAN *WrapFlag, OUT UINT8 **WrapData, OUT UINTN *WrapDataSize) |
Internal include file for BaseCryptLib.
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file InternalCryptLib.h.
#define OBJ_get0_data | ( | o | ) | ((o)->data) |
Definition at line 28 of file InternalCryptLib.h.
#define OBJ_length | ( | o | ) | ((o)->length) |
Definition at line 29 of file InternalCryptLib.h.
#define OPENSSL_NO_DEPRECATED 0 |
Definition at line 23 of file InternalCryptLib.h.
BOOLEAN WrapPkcs7Data | ( | IN CONST UINT8 * | P7Data, |
IN UINTN | P7Length, | ||
OUT BOOLEAN * | WrapFlag, | ||
OUT UINT8 ** | WrapData, | ||
OUT UINTN * | WrapDataSize | ||
) |
Check input P7Data is a wrapped ContentInfo structure or not. If not construct a new structure to wrap P7Data.
Caution: This function may receive untrusted input. UEFI Authenticated Variable is external input, so this function will do basic check for PKCS#7 data structure.
[in] | P7Data | Pointer to the PKCS#7 message to verify. |
[in] | P7Length | Length of the PKCS#7 message in bytes. |
[out] | WrapFlag | If TRUE P7Data is a ContentInfo structure, otherwise return FALSE. |
[out] | WrapData | If return status of this function is TRUE: 1) when WrapFlag is TRUE, pointer to P7Data. 2) when WrapFlag is FALSE, pointer to a new ContentInfo structure. It's caller's responsibility to free this buffer. |
[out] | WrapDataSize | Length of ContentInfo structure in bytes. |
TRUE | The operation is finished successfully. |
FALSE | The operation is failed due to lack of resources. |
Definition at line 51 of file CryptPkcs7VerifyCommon.c.