]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLibNull/Pem/CryptPemNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Pem / CryptPemNull.c
1 /** @file
2 PEM (Privacy Enhanced Mail) Format Handler Wrapper Implementation which does
3 not provide real capabilities.
4
5 Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include "InternalCryptLib.h"
11
12 /**
13 Retrieve the RSA Private Key from the password-protected PEM key data.
14
15 Return FALSE to indicate this interface is not supported.
16
17 @param[in] PemData Pointer to the PEM-encoded key data to be retrieved.
18 @param[in] PemSize Size of the PEM key data in bytes.
19 @param[in] Password NULL-terminated passphrase used for encrypted PEM key data.
20 @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved
21 RSA private key component. Use RsaFree() function to free the
22 resource.
23
24 @retval FALSE This interface is not supported.
25
26 **/
27 BOOLEAN
28 EFIAPI
29 RsaGetPrivateKeyFromPem (
30 IN CONST UINT8 *PemData,
31 IN UINTN PemSize,
32 IN CONST CHAR8 *Password,
33 OUT VOID **RsaContext
34 )
35 {
36 ASSERT (FALSE);
37 return FALSE;
38 }
39
40 /**
41 Retrieve the EC Private Key from the password-protected PEM key data.
42
43 @param[in] PemData Pointer to the PEM-encoded key data to be retrieved.
44 @param[in] PemSize Size of the PEM key data in bytes.
45 @param[in] Password NULL-terminated passphrase used for encrypted PEM key data.
46 @param[out] EcContext Pointer to new-generated EC DSA context which contain the retrieved
47 EC private key component. Use EcFree() function to free the
48 resource.
49
50 If PemData is NULL, then return FALSE.
51 If EcContext is NULL, then return FALSE.
52
53 @retval TRUE EC Private Key was retrieved successfully.
54 @retval FALSE Invalid PEM key data or incorrect password.
55
56 **/
57 BOOLEAN
58 EFIAPI
59 EcGetPrivateKeyFromPem (
60 IN CONST UINT8 *PemData,
61 IN UINTN PemSize,
62 IN CONST CHAR8 *Password,
63 OUT VOID **EcContext
64 )
65 {
66 ASSERT (FALSE);
67 return FALSE;
68 }