blob: 55876527144f6228ffcec97ca56e410fd262ca09 [file] [log] [blame]
qlonga8c44642010-11-02 06:06:38 +00001/** @file
2 Internal include file for BaseCryptLib.
3
tye1e8b4eb02012-03-31 04:49:02 +00004Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
qlonga8c44642010-11-02 06:06:38 +00005This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef __INTERNAL_CRYPT_LIB_H__
16#define __INTERNAL_CRYPT_LIB_H__
17
18#include <Library/BaseLib.h>
19#include <Library/BaseMemoryLib.h>
20#include <Library/MemoryAllocationLib.h>
21#include <Library/DebugLib.h>
22#include <Library/BaseCryptLib.h>
23
tye1dda39f32012-08-02 02:49:24 +000024#include "OpenSslSupport.h"
25
qlonga8c44642010-11-02 06:06:38 +000026//
27// Environment Setting for OpenSSL-based UEFI Crypto Library.
28//
29#ifndef OPENSSL_SYSNAME_UWIN
30#define OPENSSL_SYSNAME_UWIN
31#endif
32
tye1e8b4eb02012-03-31 04:49:02 +000033/**
34 Pop single certificate from STACK_OF(X509).
35
36 If X509Stack, Cert, or CertSize is NULL, then return FALSE.
37
38 @param[in] X509Stack Pointer to a X509 stack object.
39 @param[out] Cert Pointer to a X509 certificate.
40 @param[out] CertSize Length of output X509 certificate in bytes.
41
42 @retval TRUE The X509 stack pop succeeded.
43 @retval FALSE The pop operation failed.
44
45**/
46BOOLEAN
47X509PopCertificate (
48 IN VOID *X509Stack,
49 OUT UINT8 **Cert,
50 OUT UINTN *CertSize
51 );
52
qlonga8c44642010-11-02 06:06:38 +000053#endif
54