]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/TlsLibNull/TlsConfigNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / CryptoPkg / Library / TlsLibNull / TlsConfigNull.c
CommitLineData
79cd636f
SB
1/** @file\r
2 SSL/TLS Configuration Null Library Wrapper Implementation.\r
3\r
4Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
5(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
6SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8**/\r
9\r
10#include "InternalTlsLib.h"\r
11\r
12/**\r
13 Set a new TLS/SSL method for a particular TLS object.\r
14\r
15 This function sets a new TLS/SSL method for a particular TLS object.\r
16\r
17 @param[in] Tls Pointer to a TLS object.\r
18 @param[in] MajorVer Major Version of TLS/SSL Protocol.\r
19 @param[in] MinorVer Minor Version of TLS/SSL Protocol.\r
20\r
21 @retval EFI_SUCCESS The TLS/SSL method was set successfully.\r
22 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
23 @retval EFI_UNSUPPORTED Unsupported TLS/SSL method.\r
24\r
25**/\r
26EFI_STATUS\r
27EFIAPI\r
28TlsSetVersion (\r
7c342378
MK
29 IN VOID *Tls,\r
30 IN UINT8 MajorVer,\r
31 IN UINT8 MinorVer\r
79cd636f
SB
32 )\r
33{\r
7c342378 34 ASSERT (FALSE);\r
79cd636f
SB
35 return EFI_UNSUPPORTED;\r
36}\r
37\r
38/**\r
39 Set TLS object to work in client or server mode.\r
40\r
41 This function prepares a TLS object to work in client or server mode.\r
42\r
43 @param[in] Tls Pointer to a TLS object.\r
44 @param[in] IsServer Work in server mode.\r
45\r
46 @retval EFI_SUCCESS The TLS/SSL work mode was set successfully.\r
47 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
48 @retval EFI_UNSUPPORTED Unsupported TLS/SSL work mode.\r
49\r
50**/\r
51EFI_STATUS\r
52EFIAPI\r
53TlsSetConnectionEnd (\r
7c342378
MK
54 IN VOID *Tls,\r
55 IN BOOLEAN IsServer\r
79cd636f
SB
56 )\r
57{\r
7c342378 58 ASSERT (FALSE);\r
79cd636f
SB
59 return EFI_UNSUPPORTED;\r
60}\r
61\r
62/**\r
63 Set the ciphers list to be used by the TLS object.\r
64\r
65 This function sets the ciphers for use by a specified TLS object.\r
66\r
67 @param[in] Tls Pointer to a TLS object.\r
68 @param[in] CipherId Array of UINT16 cipher identifiers. Each UINT16\r
69 cipher identifier comes from the TLS Cipher Suite\r
70 Registry of the IANA, interpreting Byte1 and Byte2\r
71 in network (big endian) byte order.\r
72 @param[in] CipherNum The number of cipher in the list.\r
73\r
74 @retval EFI_SUCCESS The ciphers list was set successfully.\r
75 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
76 @retval EFI_UNSUPPORTED No supported TLS cipher was found in CipherId.\r
77 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r
78\r
79**/\r
80EFI_STATUS\r
81EFIAPI\r
82TlsSetCipherList (\r
7c342378
MK
83 IN VOID *Tls,\r
84 IN UINT16 *CipherId,\r
85 IN UINTN CipherNum\r
79cd636f
SB
86 )\r
87{\r
7c342378 88 ASSERT (FALSE);\r
79cd636f
SB
89 return EFI_UNSUPPORTED;\r
90}\r
91\r
92/**\r
93 Set the compression method for TLS/SSL operations.\r
94\r
95 This function handles TLS/SSL integrated compression methods.\r
96\r
97 @param[in] CompMethod The compression method ID.\r
98\r
99 @retval EFI_SUCCESS The compression method for the communication was\r
100 set successfully.\r
101 @retval EFI_UNSUPPORTED Unsupported compression method.\r
102\r
103**/\r
104EFI_STATUS\r
105EFIAPI\r
106TlsSetCompressionMethod (\r
7c342378 107 IN UINT8 CompMethod\r
79cd636f
SB
108 )\r
109{\r
7c342378 110 ASSERT (FALSE);\r
79cd636f
SB
111 return EFI_UNSUPPORTED;\r
112}\r
113\r
114/**\r
115 Set peer certificate verification mode for the TLS connection.\r
116\r
117 This function sets the verification mode flags for the TLS connection.\r
118\r
119 @param[in] Tls Pointer to the TLS object.\r
120 @param[in] VerifyMode A set of logically or'ed verification mode flags.\r
121\r
122**/\r
123VOID\r
124EFIAPI\r
125TlsSetVerify (\r
7c342378
MK
126 IN VOID *Tls,\r
127 IN UINT32 VerifyMode\r
79cd636f
SB
128 )\r
129{\r
7c342378 130 ASSERT (FALSE);\r
79cd636f
SB
131}\r
132\r
79cd636f
SB
133/**\r
134 Set the specified host name to be verified.\r
135\r
136 @param[in] Tls Pointer to the TLS object.\r
137 @param[in] Flags The setting flags during the validation.\r
138 @param[in] HostName The specified host name to be verified.\r
139\r
140 @retval EFI_SUCCESS The HostName setting was set successfully.\r
141 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
142 @retval EFI_ABORTED Invalid HostName setting.\r
143\r
144**/\r
145EFI_STATUS\r
146EFIAPI\r
147TlsSetVerifyHost (\r
7c342378
MK
148 IN VOID *Tls,\r
149 IN UINT32 Flags,\r
150 IN CHAR8 *HostName\r
79cd636f
SB
151 )\r
152{\r
7c342378 153 ASSERT (FALSE);\r
79cd636f
SB
154 return EFI_UNSUPPORTED;\r
155}\r
156\r
79cd636f
SB
157/**\r
158 Sets a TLS/SSL session ID to be used during TLS/SSL connect.\r
159\r
160 This function sets a session ID to be used when the TLS/SSL connection is\r
161 to be established.\r
162\r
163 @param[in] Tls Pointer to the TLS object.\r
164 @param[in] SessionId Session ID data used for session resumption.\r
165 @param[in] SessionIdLen Length of Session ID in bytes.\r
166\r
167 @retval EFI_SUCCESS Session ID was set successfully.\r
168 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
169 @retval EFI_UNSUPPORTED No available session for ID setting.\r
170\r
171**/\r
172EFI_STATUS\r
173EFIAPI\r
174TlsSetSessionId (\r
7c342378
MK
175 IN VOID *Tls,\r
176 IN UINT8 *SessionId,\r
177 IN UINT16 SessionIdLen\r
79cd636f
SB
178 )\r
179{\r
7c342378 180 ASSERT (FALSE);\r
79cd636f
SB
181 return EFI_UNSUPPORTED;\r
182}\r
183\r
184/**\r
185 Adds the CA to the cert store when requesting Server or Client authentication.\r
186\r
187 This function adds the CA certificate to the list of CAs when requesting\r
188 Server or Client authentication for the chosen TLS connection.\r
189\r
190 @param[in] Tls Pointer to the TLS object.\r
191 @param[in] Data Pointer to the data buffer of a DER-encoded binary\r
192 X.509 certificate or PEM-encoded X.509 certificate.\r
193 @param[in] DataSize The size of data buffer in bytes.\r
194\r
195 @retval EFI_SUCCESS The operation succeeded.\r
196 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
197 @retval EFI_OUT_OF_RESOURCES Required resources could not be allocated.\r
198 @retval EFI_ABORTED Invalid X.509 certificate.\r
199\r
200**/\r
201EFI_STATUS\r
202EFIAPI\r
203TlsSetCaCertificate (\r
7c342378
MK
204 IN VOID *Tls,\r
205 IN VOID *Data,\r
206 IN UINTN DataSize\r
79cd636f
SB
207 )\r
208{\r
7c342378 209 ASSERT (FALSE);\r
79cd636f
SB
210 return EFI_UNSUPPORTED;\r
211}\r
212\r
213/**\r
214 Loads the local public certificate into the specified TLS object.\r
215\r
216 This function loads the X.509 certificate into the specified TLS object\r
217 for TLS negotiation.\r
218\r
219 @param[in] Tls Pointer to the TLS object.\r
220 @param[in] Data Pointer to the data buffer of a DER-encoded binary\r
221 X.509 certificate or PEM-encoded X.509 certificate.\r
222 @param[in] DataSize The size of data buffer in bytes.\r
223\r
224 @retval EFI_SUCCESS The operation succeeded.\r
225 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
226 @retval EFI_OUT_OF_RESOURCES Required resources could not be allocated.\r
227 @retval EFI_ABORTED Invalid X.509 certificate.\r
228\r
229**/\r
230EFI_STATUS\r
231EFIAPI\r
232TlsSetHostPublicCert (\r
7c342378
MK
233 IN VOID *Tls,\r
234 IN VOID *Data,\r
235 IN UINTN DataSize\r
79cd636f
SB
236 )\r
237{\r
7c342378 238 ASSERT (FALSE);\r
79cd636f
SB
239 return EFI_UNSUPPORTED;\r
240}\r
241\r
242/**\r
243 Adds the local private key to the specified TLS object.\r
244\r
bb78d969 245 This function adds the local private key (DER-encoded or PEM-encoded or PKCS#8 private\r
79cd636f
SB
246 key) into the specified TLS object for TLS negotiation.\r
247\r
248 @param[in] Tls Pointer to the TLS object.\r
bb78d969
YL
249 @param[in] Data Pointer to the data buffer of a DER-encoded or PEM-encoded\r
250 or PKCS#8 private key.\r
251 @param[in] DataSize The size of data buffer in bytes.\r
252 @param[in] Password Pointer to NULL-terminated private key password, set it to NULL\r
253 if private key not encrypted.\r
254\r
255 @retval EFI_SUCCESS The operation succeeded.\r
256 @retval EFI_UNSUPPORTED This function is not supported.\r
257 @retval EFI_ABORTED Invalid private key data.\r
258\r
259**/\r
260EFI_STATUS\r
261EFIAPI\r
262TlsSetHostPrivateKeyEx (\r
263 IN VOID *Tls,\r
264 IN VOID *Data,\r
265 IN UINTN DataSize,\r
266 IN VOID *Password OPTIONAL\r
267 )\r
268{\r
269 ASSERT (FALSE);\r
270 return EFI_UNSUPPORTED;\r
271}\r
272\r
273/**\r
274 Adds the local private key to the specified TLS object.\r
275\r
276 This function adds the local private key (DER-encoded or PEM-encoded or PKCS#8 private\r
277 key) into the specified TLS object for TLS negotiation.\r
278\r
279 @param[in] Tls Pointer to the TLS object.\r
280 @param[in] Data Pointer to the data buffer of a DER-encoded or PEM-encoded\r
79cd636f
SB
281 or PKCS#8 private key.\r
282 @param[in] DataSize The size of data buffer in bytes.\r
283\r
284 @retval EFI_SUCCESS The operation succeeded.\r
285 @retval EFI_UNSUPPORTED This function is not supported.\r
286 @retval EFI_ABORTED Invalid private key data.\r
287\r
288**/\r
289EFI_STATUS\r
290EFIAPI\r
291TlsSetHostPrivateKey (\r
7c342378
MK
292 IN VOID *Tls,\r
293 IN VOID *Data,\r
294 IN UINTN DataSize\r
79cd636f
SB
295 )\r
296{\r
7c342378 297 ASSERT (FALSE);\r
79cd636f
SB
298 return EFI_UNSUPPORTED;\r
299}\r
300\r
301/**\r
302 Adds the CA-supplied certificate revocation list for certificate validation.\r
303\r
304 This function adds the CA-supplied certificate revocation list data for\r
305 certificate validity checking.\r
306\r
307 @param[in] Data Pointer to the data buffer of a DER-encoded CRL data.\r
308 @param[in] DataSize The size of data buffer in bytes.\r
309\r
310 @retval EFI_SUCCESS The operation succeeded.\r
311 @retval EFI_UNSUPPORTED This function is not supported.\r
312 @retval EFI_ABORTED Invalid CRL data.\r
313\r
314**/\r
315EFI_STATUS\r
316EFIAPI\r
317TlsSetCertRevocationList (\r
7c342378
MK
318 IN VOID *Data,\r
319 IN UINTN DataSize\r
79cd636f
SB
320 )\r
321{\r
7c342378 322 ASSERT (FALSE);\r
79cd636f
SB
323 return EFI_UNSUPPORTED;\r
324}\r
325\r
bb78d969
YL
326/**\r
327 Set the signature algorithm list to used by the TLS object.\r
328\r
329 This function sets the signature algorithms for use by a specified TLS object.\r
330\r
331 @param[in] Tls Pointer to a TLS object.\r
332 @param[in] Data Array of UINT8 of signature algorithms. The array consists of\r
333 pairs of the hash algorithm and the signature algorithm as defined\r
334 in RFC 5246\r
335 @param[in] DataSize The length the SignatureAlgoList. Must be divisible by 2.\r
336\r
337 @retval EFI_SUCCESS The signature algorithm list was set successfully.\r
338 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
339 @retval EFI_UNSUPPORTED No supported TLS signature algorithm was found in SignatureAlgoList\r
340 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r
341\r
342**/\r
343EFI_STATUS\r
344EFIAPI\r
345TlsSetSignatureAlgoList (\r
346 IN VOID *Tls,\r
347 IN UINT8 *Data,\r
348 IN UINTN DataSize\r
349 )\r
350{\r
351 ASSERT (FALSE);\r
352 return EFI_UNSUPPORTED;\r
353}\r
354\r
355/**\r
356 Set the EC curve to be used for TLS flows\r
357\r
358 This function sets the EC curve to be used for TLS flows.\r
359\r
360 @param[in] Tls Pointer to a TLS object.\r
361 @param[in] Data An EC named curve as defined in section 5.1.1 of RFC 4492.\r
362 @param[in] DataSize Size of Data, it should be sizeof (UINT32)\r
363\r
364 @retval EFI_SUCCESS The EC curve was set successfully.\r
365 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
366 @retval EFI_UNSUPPORTED The requested TLS EC curve is not supported\r
367\r
368**/\r
369EFI_STATUS\r
370EFIAPI\r
371TlsSetEcCurve (\r
372 IN VOID *Tls,\r
373 IN UINT8 *Data,\r
374 IN UINTN DataSize\r
375 )\r
376{\r
377 ASSERT (FALSE);\r
378 return EFI_UNSUPPORTED;\r
379}\r
380\r
79cd636f
SB
381/**\r
382 Gets the protocol version used by the specified TLS connection.\r
383\r
384 This function returns the protocol version used by the specified TLS\r
385 connection.\r
386\r
387 If Tls is NULL, then ASSERT().\r
388\r
389 @param[in] Tls Pointer to the TLS object.\r
390\r
391 @return The protocol version of the specified TLS connection.\r
392\r
393**/\r
394UINT16\r
395EFIAPI\r
396TlsGetVersion (\r
7c342378 397 IN VOID *Tls\r
79cd636f
SB
398 )\r
399{\r
7c342378 400 ASSERT (FALSE);\r
79cd636f
SB
401 return 0;\r
402}\r
403\r
404/**\r
405 Gets the connection end of the specified TLS connection.\r
406\r
407 This function returns the connection end (as client or as server) used by\r
408 the specified TLS connection.\r
409\r
410 If Tls is NULL, then ASSERT().\r
411\r
412 @param[in] Tls Pointer to the TLS object.\r
413\r
414 @return The connection end used by the specified TLS connection.\r
415\r
416**/\r
417UINT8\r
418EFIAPI\r
419TlsGetConnectionEnd (\r
7c342378 420 IN VOID *Tls\r
79cd636f
SB
421 )\r
422{\r
7c342378 423 ASSERT (FALSE);\r
79cd636f
SB
424 return 0;\r
425}\r
426\r
427/**\r
428 Gets the cipher suite used by the specified TLS connection.\r
429\r
430 This function returns current cipher suite used by the specified\r
431 TLS connection.\r
432\r
433 @param[in] Tls Pointer to the TLS object.\r
434 @param[in,out] CipherId The cipher suite used by the TLS object.\r
435\r
436 @retval EFI_SUCCESS The cipher suite was returned successfully.\r
437 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
438 @retval EFI_UNSUPPORTED Unsupported cipher suite.\r
439\r
440**/\r
441EFI_STATUS\r
442EFIAPI\r
443TlsGetCurrentCipher (\r
7c342378
MK
444 IN VOID *Tls,\r
445 IN OUT UINT16 *CipherId\r
79cd636f
SB
446 )\r
447{\r
7c342378 448 ASSERT (FALSE);\r
79cd636f
SB
449 return EFI_UNSUPPORTED;\r
450}\r
451\r
452/**\r
453 Gets the compression methods used by the specified TLS connection.\r
454\r
455 This function returns current integrated compression methods used by\r
456 the specified TLS connection.\r
457\r
458 @param[in] Tls Pointer to the TLS object.\r
459 @param[in,out] CompressionId The current compression method used by\r
460 the TLS object.\r
461\r
462 @retval EFI_SUCCESS The compression method was returned successfully.\r
463 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
464 @retval EFI_ABORTED Invalid Compression method.\r
465 @retval EFI_UNSUPPORTED This function is not supported.\r
466\r
467**/\r
468EFI_STATUS\r
469EFIAPI\r
470TlsGetCurrentCompressionId (\r
7c342378
MK
471 IN VOID *Tls,\r
472 IN OUT UINT8 *CompressionId\r
79cd636f
SB
473 )\r
474{\r
7c342378 475 ASSERT (FALSE);\r
79cd636f
SB
476 return EFI_UNSUPPORTED;\r
477}\r
478\r
479/**\r
480 Gets the verification mode currently set in the TLS connection.\r
481\r
482 This function returns the peer verification mode currently set in the\r
483 specified TLS connection.\r
484\r
485 If Tls is NULL, then ASSERT().\r
486\r
487 @param[in] Tls Pointer to the TLS object.\r
488\r
489 @return The verification mode set in the specified TLS connection.\r
490\r
491**/\r
492UINT32\r
493EFIAPI\r
494TlsGetVerify (\r
7c342378 495 IN VOID *Tls\r
79cd636f
SB
496 )\r
497{\r
7c342378 498 ASSERT (FALSE);\r
79cd636f
SB
499 return 0;\r
500}\r
501\r
502/**\r
503 Gets the session ID used by the specified TLS connection.\r
504\r
505 This function returns the TLS/SSL session ID currently used by the\r
506 specified TLS connection.\r
507\r
508 @param[in] Tls Pointer to the TLS object.\r
509 @param[in,out] SessionId Buffer to contain the returned session ID.\r
510 @param[in,out] SessionIdLen The length of Session ID in bytes.\r
511\r
512 @retval EFI_SUCCESS The Session ID was returned successfully.\r
513 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
514 @retval EFI_UNSUPPORTED Invalid TLS/SSL session.\r
515\r
516**/\r
517EFI_STATUS\r
518EFIAPI\r
519TlsGetSessionId (\r
7c342378
MK
520 IN VOID *Tls,\r
521 IN OUT UINT8 *SessionId,\r
522 IN OUT UINT16 *SessionIdLen\r
79cd636f
SB
523 )\r
524{\r
7c342378 525 ASSERT (FALSE);\r
79cd636f
SB
526 return EFI_UNSUPPORTED;\r
527}\r
528\r
529/**\r
530 Gets the client random data used in the specified TLS connection.\r
531\r
532 This function returns the TLS/SSL client random data currently used in\r
533 the specified TLS connection.\r
534\r
535 @param[in] Tls Pointer to the TLS object.\r
536 @param[in,out] ClientRandom Buffer to contain the returned client\r
537 random data (32 bytes).\r
538\r
539**/\r
540VOID\r
541EFIAPI\r
542TlsGetClientRandom (\r
7c342378
MK
543 IN VOID *Tls,\r
544 IN OUT UINT8 *ClientRandom\r
79cd636f
SB
545 )\r
546{\r
7c342378 547 ASSERT (FALSE);\r
79cd636f
SB
548}\r
549\r
550/**\r
551 Gets the server random data used in the specified TLS connection.\r
552\r
553 This function returns the TLS/SSL server random data currently used in\r
554 the specified TLS connection.\r
555\r
556 @param[in] Tls Pointer to the TLS object.\r
557 @param[in,out] ServerRandom Buffer to contain the returned server\r
558 random data (32 bytes).\r
559\r
560**/\r
561VOID\r
562EFIAPI\r
563TlsGetServerRandom (\r
7c342378
MK
564 IN VOID *Tls,\r
565 IN OUT UINT8 *ServerRandom\r
79cd636f
SB
566 )\r
567{\r
7c342378 568 ASSERT (FALSE);\r
79cd636f
SB
569}\r
570\r
571/**\r
572 Gets the master key data used in the specified TLS connection.\r
573\r
574 This function returns the TLS/SSL master key material currently used in\r
575 the specified TLS connection.\r
576\r
577 @param[in] Tls Pointer to the TLS object.\r
578 @param[in,out] KeyMaterial Buffer to contain the returned key material.\r
579\r
580 @retval EFI_SUCCESS Key material was returned successfully.\r
581 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
582 @retval EFI_UNSUPPORTED Invalid TLS/SSL session.\r
583\r
584**/\r
585EFI_STATUS\r
586EFIAPI\r
587TlsGetKeyMaterial (\r
7c342378
MK
588 IN VOID *Tls,\r
589 IN OUT UINT8 *KeyMaterial\r
79cd636f
SB
590 )\r
591{\r
7c342378 592 ASSERT (FALSE);\r
79cd636f
SB
593 return EFI_UNSUPPORTED;\r
594}\r
595\r
596/**\r
597 Gets the CA Certificate from the cert store.\r
598\r
599 This function returns the CA certificate for the chosen\r
600 TLS connection.\r
601\r
602 @param[in] Tls Pointer to the TLS object.\r
603 @param[out] Data Pointer to the data buffer to receive the CA\r
604 certificate data sent to the client.\r
605 @param[in,out] DataSize The size of data buffer in bytes.\r
606\r
607 @retval EFI_SUCCESS The operation succeeded.\r
608 @retval EFI_UNSUPPORTED This function is not supported.\r
609 @retval EFI_BUFFER_TOO_SMALL The Data is too small to hold the data.\r
610\r
611**/\r
612EFI_STATUS\r
613EFIAPI\r
614TlsGetCaCertificate (\r
7c342378
MK
615 IN VOID *Tls,\r
616 OUT VOID *Data,\r
617 IN OUT UINTN *DataSize\r
79cd636f
SB
618 )\r
619{\r
7c342378 620 ASSERT (FALSE);\r
79cd636f
SB
621 return EFI_UNSUPPORTED;\r
622}\r
623\r
624/**\r
625 Gets the local public Certificate set in the specified TLS object.\r
626\r
627 This function returns the local public certificate which was currently set\r
628 in the specified TLS object.\r
629\r
630 @param[in] Tls Pointer to the TLS object.\r
631 @param[out] Data Pointer to the data buffer to receive the local\r
632 public certificate.\r
633 @param[in,out] DataSize The size of data buffer in bytes.\r
634\r
635 @retval EFI_SUCCESS The operation succeeded.\r
636 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
637 @retval EFI_NOT_FOUND The certificate is not found.\r
638 @retval EFI_BUFFER_TOO_SMALL The Data is too small to hold the data.\r
639\r
640**/\r
641EFI_STATUS\r
642EFIAPI\r
643TlsGetHostPublicCert (\r
7c342378
MK
644 IN VOID *Tls,\r
645 OUT VOID *Data,\r
646 IN OUT UINTN *DataSize\r
79cd636f
SB
647 )\r
648{\r
7c342378 649 ASSERT (FALSE);\r
79cd636f
SB
650 return EFI_UNSUPPORTED;\r
651}\r
652\r
653/**\r
654 Gets the local private key set in the specified TLS object.\r
655\r
656 This function returns the local private key data which was currently set\r
657 in the specified TLS object.\r
658\r
659 @param[in] Tls Pointer to the TLS object.\r
660 @param[out] Data Pointer to the data buffer to receive the local\r
661 private key data.\r
662 @param[in,out] DataSize The size of data buffer in bytes.\r
663\r
664 @retval EFI_SUCCESS The operation succeeded.\r
665 @retval EFI_UNSUPPORTED This function is not supported.\r
666 @retval EFI_BUFFER_TOO_SMALL The Data is too small to hold the data.\r
667\r
668**/\r
669EFI_STATUS\r
670EFIAPI\r
671TlsGetHostPrivateKey (\r
7c342378
MK
672 IN VOID *Tls,\r
673 OUT VOID *Data,\r
674 IN OUT UINTN *DataSize\r
79cd636f
SB
675 )\r
676{\r
7c342378 677 ASSERT (FALSE);\r
79cd636f
SB
678 return EFI_UNSUPPORTED;\r
679}\r
680\r
681/**\r
682 Gets the CA-supplied certificate revocation list data set in the specified\r
683 TLS object.\r
684\r
685 This function returns the CA-supplied certificate revocation list data which\r
686 was currently set in the specified TLS object.\r
687\r
688 @param[out] Data Pointer to the data buffer to receive the CRL data.\r
689 @param[in,out] DataSize The size of data buffer in bytes.\r
690\r
691 @retval EFI_SUCCESS The operation succeeded.\r
692 @retval EFI_UNSUPPORTED This function is not supported.\r
693 @retval EFI_BUFFER_TOO_SMALL The Data is too small to hold the data.\r
694\r
695**/\r
696EFI_STATUS\r
697EFIAPI\r
698TlsGetCertRevocationList (\r
7c342378
MK
699 OUT VOID *Data,\r
700 IN OUT UINTN *DataSize\r
79cd636f
SB
701 )\r
702{\r
7c342378 703 ASSERT (FALSE);\r
79cd636f
SB
704 return EFI_UNSUPPORTED;\r
705}\r
bb78d969
YL
706\r
707/**\r
708 Derive keying material from a TLS connection.\r
709\r
710 This function exports keying material using the mechanism described in RFC\r
711 5705.\r
712\r
713 @param[in] Tls Pointer to the TLS object\r
714 @param[in] Label Description of the key for the PRF function\r
715 @param[in] Context Optional context\r
716 @param[in] ContextLen The length of the context value in bytes\r
717 @param[out] KeyBuffer Buffer to hold the output of the TLS-PRF\r
718 @param[in] KeyBufferLen The length of the KeyBuffer\r
719\r
720 @retval EFI_SUCCESS The operation succeeded.\r
721 @retval EFI_INVALID_PARAMETER The TLS object is invalid.\r
722 @retval EFI_PROTOCOL_ERROR Some other error occurred.\r
723\r
724**/\r
725EFI_STATUS\r
726EFIAPI\r
727TlsGetExportKey (\r
728 IN VOID *Tls,\r
729 IN CONST VOID *Label,\r
730 IN CONST VOID *Context,\r
731 IN UINTN ContextLen,\r
732 OUT VOID *KeyBuffer,\r
733 IN UINTN KeyBufferLen\r
734 )\r
735{\r
736 ASSERT (FALSE);\r
737 return EFI_UNSUPPORTED;\r
738}\r