]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Include/Pcd/PcdCryptoServiceFamilyEnable.h
CryptoPkg: Apply uncrustify changes
[mirror_edk2.git] / CryptoPkg / Include / Pcd / PcdCryptoServiceFamilyEnable.h
1 /** @file
2 Defines the PCD_CRYPTO_SERVICE_FAMILY_ENABLE structure associated with
3 gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.
4
5 Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
11 #define __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__
12
13 ///
14 /// Define used to enable all the crypto services in a family
15 ///
16 #define PCD_CRYPTO_SERVICE_ENABLE_FAMILY 0xFFFFFFFF
17
18 ///
19 /// PCD_CRYPTO_SERVICE_FAMILY_ENABLE structure. Each field in this structure
20 /// is associated with a service in the EDK II Crypto Protocol/PPI. This allows
21 /// each individual service to be enabled/disabled in a DSC file. Services are
22 /// also grouped into families. Unions are used to support enabling or
23 /// disabling an entire family in a single DSC statement.
24 ///
25 typedef struct {
26 union {
27 struct {
28 UINT8 New : 1;
29 UINT8 Free : 1;
30 UINT8 SetKey : 1;
31 UINT8 Duplicate : 1;
32 UINT8 Update : 1;
33 UINT8 Final : 1;
34 } Services;
35 UINT32 Family;
36 } HmacMd5;
37 union {
38 struct {
39 UINT8 New : 1;
40 UINT8 Free : 1;
41 UINT8 SetKey : 1;
42 UINT8 Duplicate : 1;
43 UINT8 Update : 1;
44 UINT8 Final : 1;
45 } Services;
46 UINT32 Family;
47 } HmacSha1;
48 union {
49 struct {
50 UINT8 New : 1;
51 UINT8 Free : 1;
52 UINT8 SetKey : 1;
53 UINT8 Duplicate : 1;
54 UINT8 Update : 1;
55 UINT8 Final : 1;
56 } Services;
57 UINT32 Family;
58 } HmacSha256;
59 union {
60 struct {
61 UINT8 GetContextSize : 1;
62 UINT8 Init : 1;
63 UINT8 Duplicate : 1;
64 UINT8 Update : 1;
65 UINT8 Final : 1;
66 UINT8 HashAll : 1;
67 } Services;
68 UINT32 Family;
69 } Md4;
70 union {
71 struct {
72 UINT8 GetContextSize : 1;
73 UINT8 Init : 1;
74 UINT8 Duplicate : 1;
75 UINT8 Update : 1;
76 UINT8 Final : 1;
77 UINT8 HashAll : 1;
78 } Services;
79 UINT32 Family;
80 } Md5;
81 union {
82 struct {
83 UINT8 Pkcs1v2Encrypt : 1;
84 UINT8 Pkcs5HashPassword : 1;
85 UINT8 Pkcs7Verify : 1;
86 UINT8 VerifyEKUsInPkcs7Signature : 1;
87 UINT8 Pkcs7GetSigners : 1;
88 UINT8 Pkcs7FreeSigners : 1;
89 UINT8 Pkcs7Sign : 1;
90 UINT8 Pkcs7GetAttachedContent : 1;
91 UINT8 Pkcs7GetCertificatesList : 1;
92 UINT8 AuthenticodeVerify : 1;
93 UINT8 ImageTimestampVerify : 1;
94 } Services;
95 UINT32 Family;
96 } Pkcs;
97 union {
98 struct {
99 UINT8 New : 1;
100 UINT8 Free : 1;
101 UINT8 GenerateParameter : 1;
102 UINT8 SetParameter : 1;
103 UINT8 GenerateKey : 1;
104 UINT8 ComputeKey : 1;
105 } Services;
106 UINT32 Family;
107 } Dh;
108 union {
109 struct {
110 UINT8 Seed : 1;
111 UINT8 Bytes : 1;
112 } Services;
113 UINT32 Family;
114 } Random;
115 union {
116 struct {
117 UINT8 VerifyPkcs1 : 1;
118 UINT8 New : 1;
119 UINT8 Free : 1;
120 UINT8 SetKey : 1;
121 UINT8 GetKey : 1;
122 UINT8 GenerateKey : 1;
123 UINT8 CheckKey : 1;
124 UINT8 Pkcs1Sign : 1;
125 UINT8 Pkcs1Verify : 1;
126 UINT8 GetPrivateKeyFromPem : 1;
127 UINT8 GetPublicKeyFromX509 : 1;
128 } Services;
129 UINT32 Family;
130 } Rsa;
131 union {
132 struct {
133 UINT8 GetContextSize : 1;
134 UINT8 Init : 1;
135 UINT8 Duplicate : 1;
136 UINT8 Update : 1;
137 UINT8 Final : 1;
138 UINT8 HashAll : 1;
139 } Services;
140 UINT32 Family;
141 } Sha1;
142 union {
143 struct {
144 UINT8 GetContextSize : 1;
145 UINT8 Init : 1;
146 UINT8 Duplicate : 1;
147 UINT8 Update : 1;
148 UINT8 Final : 1;
149 UINT8 HashAll : 1;
150 } Services;
151 UINT32 Family;
152 } Sha256;
153 union {
154 struct {
155 UINT8 GetContextSize : 1;
156 UINT8 Init : 1;
157 UINT8 Duplicate : 1;
158 UINT8 Update : 1;
159 UINT8 Final : 1;
160 UINT8 HashAll : 1;
161 } Services;
162 UINT32 Family;
163 } Sha384;
164 union {
165 struct {
166 UINT8 GetContextSize : 1;
167 UINT8 Init : 1;
168 UINT8 Duplicate : 1;
169 UINT8 Update : 1;
170 UINT8 Final : 1;
171 UINT8 HashAll : 1;
172 } Services;
173 UINT32 Family;
174 } Sha512;
175 union {
176 struct {
177 UINT8 GetSubjectName : 1;
178 UINT8 GetCommonName : 1;
179 UINT8 GetOrganizationName : 1;
180 UINT8 VerifyCert : 1;
181 UINT8 ConstructCertificate : 1;
182 UINT8 ConstructCertificateStack : 1;
183 UINT8 ConstructCertificateStackV : 1;
184 UINT8 Free : 1;
185 UINT8 StackFree : 1;
186 UINT8 GetTBSCert : 1;
187 } Services;
188 UINT32 Family;
189 } X509;
190 union {
191 struct {
192 UINT8 GetContextSize : 1;
193 UINT8 Init : 1;
194 UINT8 EcbEncrypt : 1;
195 UINT8 EcbDecrypt : 1;
196 UINT8 CbcEncrypt : 1;
197 UINT8 CbcDecrypt : 1;
198 } Services;
199 UINT32 Family;
200 } Tdes;
201 union {
202 struct {
203 UINT8 GetContextSize : 1;
204 UINT8 Init : 1;
205 UINT8 EcbEncrypt : 1;
206 UINT8 EcbDecrypt : 1;
207 UINT8 CbcEncrypt : 1;
208 UINT8 CbcDecrypt : 1;
209 } Services;
210 UINT32 Family;
211 } Aes;
212 union {
213 struct {
214 UINT8 GetContextSize : 1;
215 UINT8 Init : 1;
216 UINT8 Encrypt : 1;
217 UINT8 Decrypt : 1;
218 UINT8 Reset : 1;
219 } Services;
220 UINT32 Family;
221 } Arc4;
222 union {
223 struct {
224 UINT8 GetContextSize : 1;
225 UINT8 Init : 1;
226 UINT8 Duplicate : 1;
227 UINT8 Update : 1;
228 UINT8 Final : 1;
229 UINT8 HashAll : 1;
230 } Services;
231 UINT32 Family;
232 } Sm3;
233 union {
234 struct {
235 UINT8 Sha256ExtractAndExpand;
236 } Services;
237 UINT32 Family;
238 } Hkdf;
239 union {
240 struct {
241 UINT8 Initialize : 1;
242 UINT8 CtxFree : 1;
243 UINT8 CtxNew : 1;
244 UINT8 Free : 1;
245 UINT8 New : 1;
246 UINT8 InHandshake : 1;
247 UINT8 DoHandshake : 1;
248 UINT8 HandleAlert : 1;
249 UINT8 CloseNotify : 1;
250 UINT8 CtrlTrafficOut : 1;
251 UINT8 CtrlTrafficIn : 1;
252 UINT8 Read : 1;
253 UINT8 Write : 1;
254 } Services;
255 UINT32 Family;
256 } Tls;
257 union {
258 struct {
259 UINT8 Version : 1;
260 UINT8 ConnectionEnd : 1;
261 UINT8 CipherList : 1;
262 UINT8 CompressionMethod : 1;
263 UINT8 Verify : 1;
264 UINT8 VerifyHost : 1;
265 UINT8 SessionId : 1;
266 UINT8 CaCertificate : 1;
267 UINT8 HostPublicCert : 1;
268 UINT8 HostPrivateKey : 1;
269 UINT8 CertRevocationList : 1;
270 } Services;
271 UINT32 Family;
272 } TlsSet;
273 union {
274 struct {
275 UINT8 Version : 1;
276 UINT8 ConnectionEnd : 1;
277 UINT8 CurrentCipher : 1;
278 UINT8 CurrentCompressionId : 1;
279 UINT8 Verify : 1;
280 UINT8 SessionId : 1;
281 UINT8 ClientRandom : 1;
282 UINT8 ServerRandom : 1;
283 UINT8 KeyMaterial : 1;
284 UINT8 CaCertificate : 1;
285 UINT8 HostPublicCert : 1;
286 UINT8 HostPrivateKey : 1;
287 UINT8 CertRevocationList : 1;
288 } Services;
289 UINT32 Family;
290 } TlsGet;
291 } PCD_CRYPTO_SERVICE_FAMILY_ENABLE;
292
293 #endif