2 X.509 Certificate Handler Wrapper Implementation which does not provide
5 Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "InternalCryptLib.h"
19 Construct a X509 object from DER-encoded certificate data.
21 Return FALSE to indicate this interface is not supported.
23 @param[in] Cert Pointer to the DER-encoded certificate data.
24 @param[in] CertSize The size of certificate data in bytes.
25 @param[out] SingleX509Cert The generated X509 object.
27 @retval FALSE This interface is not supported.
32 X509ConstructCertificate (
35 OUT UINT8
**SingleX509Cert
43 Construct a X509 stack object from a list of DER-encoded certificate data.
45 Return FALSE to indicate this interface is not supported.
47 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object.
48 On output, pointer to the X509 stack object with new
49 inserted X509 certificate.
50 @param ... A list of DER-encoded single certificate data followed
51 by certificate size. A NULL terminates the list. The
52 pairs are the arguments to X509ConstructCertificate().
54 @retval FALSE This interface is not supported.
59 X509ConstructCertificateStack (
60 IN OUT UINT8
**X509Stack
,
69 Release the specified X509 object.
71 If the interface is not supported, then ASSERT().
73 @param[in] X509Cert Pointer to the X509 object to be released.
86 Release the specified X509 stack object.
88 If the interface is not supported, then ASSERT().
90 @param[in] X509Stack Pointer to the X509 stack object to be released.
103 Retrieve the subject bytes from one X.509 certificate.
105 Return FALSE to indicate this interface is not supported.
107 @param[in] Cert Pointer to the DER-encoded X509 certificate.
108 @param[in] CertSize Size of the X509 certificate in bytes.
109 @param[out] CertSubject Pointer to the retrieved certificate subject bytes.
110 @param[in, out] SubjectSize The size in bytes of the CertSubject buffer on input,
111 and the size of buffer returned CertSubject on output.
114 @retval FALSE This interface is not supported.
120 IN CONST UINT8
*Cert
,
122 OUT UINT8
*CertSubject
,
123 IN OUT UINTN
*SubjectSize
131 Retrieve the RSA Public Key from one DER-encoded X509 certificate.
133 Return FALSE to indicate this interface is not supported.
135 @param[in] Cert Pointer to the DER-encoded X509 certificate.
136 @param[in] CertSize Size of the X509 certificate in bytes.
137 @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved
138 RSA public key component. Use RsaFree() function to free the
141 @retval FALSE This interface is not supported.
146 RsaGetPublicKeyFromX509 (
147 IN CONST UINT8
*Cert
,
149 OUT VOID
**RsaContext
157 Verify one X509 certificate was issued by the trusted CA.
159 Return FALSE to indicate this interface is not supported.
161 @param[in] Cert Pointer to the DER-encoded X509 certificate to be verified.
162 @param[in] CertSize Size of the X509 certificate in bytes.
163 @param[in] CACert Pointer to the DER-encoded trusted CA certificate.
164 @param[in] CACertSize Size of the CA Certificate in bytes.
166 @retval FALSE This interface is not supported.
172 IN CONST UINT8
*Cert
,
174 IN CONST UINT8
*CACert
,
183 Retrieve the TBSCertificate from one given X.509 certificate.
185 Return FALSE to indicate this interface is not supported.
187 @param[in] Cert Pointer to the given DER-encoded X509 certificate.
188 @param[in] CertSize Size of the X509 certificate in bytes.
189 @param[out] TBSCert DER-Encoded To-Be-Signed certificate.
190 @param[out] TBSCertSize Size of the TBS certificate in bytes.
192 @retval FALSE This interface is not supported.
198 IN CONST UINT8
*Cert
,
201 OUT UINTN
*TBSCertSize