]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Pk/CryptPkcs7VerifyNull.c
Add interfaces to several library instances of BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibRuntimeCryptProtocol / Pk / CryptPkcs7VerifyNull.c
CommitLineData
532616bb 1/** @file\r
2 PKCS#7 SignedData Verification Wrapper Implementation which does not provide\r
3 real capabilities.\r
4\r
5Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#include "InternalCryptLib.h"\r
17\r
18/**\r
19 Get the signer's certificates from PKCS#7 signed data as described in "PKCS #7:\r
20 Cryptographic Message Syntax Standard". The input signed data could be wrapped\r
21 in a ContentInfo structure.\r
22\r
23 Return FALSE to indicate this interface is not supported.\r
24\r
25 @param[in] P7Data Pointer to the PKCS#7 message to verify.\r
26 @param[in] P7Length Length of the PKCS#7 message in bytes.\r
27 @param[out] CertStack Pointer to Signer's certificates retrieved from P7Data.\r
28 It's caller's responsiblity to free the buffer.\r
29 @param[out] StackLength Length of signer's certificates in bytes.\r
30 @param[out] TrustedCert Pointer to a trusted certificate from Signer's certificates.\r
31 It's caller's responsiblity to free the buffer.\r
32 @param[out] CertLength Length of the trusted certificate in bytes.\r
33\r
34 @retval FALSE This interface is not supported.\r
35\r
36**/\r
37BOOLEAN\r
38EFIAPI\r
39Pkcs7GetSigners (\r
40 IN CONST UINT8 *P7Data,\r
41 IN UINTN P7Length,\r
42 OUT UINT8 **CertStack,\r
43 OUT UINTN *StackLength,\r
44 OUT UINT8 **TrustedCert,\r
45 OUT UINTN *CertLength\r
46 )\r
47{\r
48 ASSERT (FALSE);\r
49 return FALSE;\r
50}\r
51\r
52/**\r
53 Wrap function to use free() to free allocated memory for certificates.\r
54\r
55 If the interface is not supported, then ASSERT().\r
56 \r
57 @param[in] Certs Pointer to the certificates to be freed.\r
58\r
59**/\r
60VOID\r
61EFIAPI\r
62Pkcs7FreeSigners (\r
63 IN UINT8 *Certs\r
64 )\r
65{\r
66 ASSERT (FALSE);\r
67}\r
68\r
69/**\r
70 Verifies the validility of a PKCS#7 signed data as described in "PKCS #7:\r
71 Cryptographic Message Syntax Standard". The input signed data could be wrapped\r
72 in a ContentInfo structure.\r
73\r
74 Return FALSE to indicate this interface is not supported.\r
75\r
76 @param[in] P7Data Pointer to the PKCS#7 message to verify.\r
77 @param[in] P7Length Length of the PKCS#7 message in bytes.\r
78 @param[in] TrustedCert Pointer to a trusted/root certificate encoded in DER, which\r
79 is used for certificate chain verification.\r
80 @param[in] CertLength Length of the trusted certificate in bytes.\r
81 @param[in] InData Pointer to the content to be verified.\r
82 @param[in] DataLength Length of InData in bytes.\r
83\r
84 @retval FALSE This interface is not supported.\r
85\r
86**/\r
87BOOLEAN\r
88EFIAPI\r
89Pkcs7Verify (\r
90 IN CONST UINT8 *P7Data,\r
91 IN UINTN P7Length,\r
92 IN CONST UINT8 *TrustedCert,\r
93 IN UINTN CertLength,\r
94 IN CONST UINT8 *InData,\r
95 IN UINTN DataLength\r
96 )\r
97{\r
98 ASSERT (FALSE);\r
99 return FALSE;\r
100}\r