TianoCore EDK2 master
Loading...
Searching...
No Matches
Tls.h
Go to the documentation of this file.
1
17#ifndef __EFI_TLS_PROTOCOL_H__
18#define __EFI_TLS_PROTOCOL_H__
19
25#define EFI_TLS_SERVICE_BINDING_PROTOCOL_GUID \
26 { \
27 0x952cb795, 0xff36, 0x48cf, {0xa2, 0x49, 0x4d, 0xf4, 0x86, 0xd6, 0xab, 0x8d } \
28 }
29
33#define EFI_TLS_PROTOCOL_GUID \
34 { \
35 0xca959f, 0x6cfa, 0x4db1, {0x95, 0xbc, 0xe4, 0x6c, 0x47, 0x51, 0x43, 0x90 } \
36 }
37
39
43typedef enum {
107
108 EfiTlsSessionDataTypeMaximum
110
116typedef struct {
117 UINT8 Major;
118 UINT8 Minor;
120
124typedef enum {
125 EfiTlsClient,
126 EfiTlsServer,
128
135#pragma pack (1)
136typedef struct {
137 UINT8 Data1;
138 UINT8 Data2;
140#pragma pack ()
141
147
153#pragma pack (1)
154typedef struct {
155 UINT16 ExtensionType;
156 UINT16 Length;
157 UINT8 Data[1];
159#pragma pack ()
160
166typedef UINT32 EFI_TLS_VERIFY;
171#define EFI_TLS_VERIFY_NONE 0x0
176#define EFI_TLS_VERIFY_PEER 0x1
181#define EFI_TLS_VERIFY_FAIL_IF_NO_PEER_CERT 0x2
186#define EFI_TLS_VERIFY_CLIENT_ONCE 0x4
187
196#define EFI_TLS_VERIFY_FLAG_NONE 0x00
201#define EFI_TLS_VERIFY_FLAG_ALWAYS_CHECK_SUBJECT 0x01
205#define EFI_TLS_VERIFY_FLAG_NO_WILDCARDS 0x02
209#define EFI_TLS_VERIFY_FLAG_NO_PARTIAL_WILDCARDS 0x04
213#define EFI_TLS_VERIFY_FLAG_MULTI_LABEL_WILDCARDS 0x08
219#define EFI_TLS_VERIFY_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10
224#define EFI_TLS_VERIFY_FLAG_NEVER_CHECK_SUBJECT 0x20
225
229#pragma pack (1)
230typedef struct {
232 CHAR8 *HostName;
234#pragma pack ()
235
241#pragma pack (1)
242typedef struct {
243 UINT32 GmtUnixTime;
244 UINT8 RandomBytes[28];
246#pragma pack ()
247
253#pragma pack (1)
254typedef struct {
255 UINT8 Data[48];
257#pragma pack ()
258
263#define MAX_TLS_SESSION_ID_LENGTH 32
264#pragma pack (1)
265typedef struct {
266 UINT16 Length;
267 UINT8 Data[MAX_TLS_SESSION_ID_LENGTH];
269#pragma pack ()
270
274typedef enum {
306
307 EfiTlsSessionStateMaximum
309
313typedef struct {
323
327typedef enum {
337
363typedef
366 IN EFI_TLS_PROTOCOL *This,
368 IN VOID *Data,
369 IN UINTN DataSize
370 );
371
395typedef
398 IN EFI_TLS_PROTOCOL *This,
400 IN OUT VOID *Data OPTIONAL,
401 IN OUT UINTN *DataSize
402 );
403
442typedef
445 IN EFI_TLS_PROTOCOL *This,
446 IN UINT8 *RequestBuffer OPTIONAL,
447 IN UINTN RequestSize OPTIONAL,
448 OUT UINT8 *Buffer OPTIONAL,
449 IN OUT UINTN *BufferSize
450 );
451
486typedef
488(EFIAPI *EFI_TLS_PROCESS_PACKET)(
489 IN EFI_TLS_PROTOCOL *This,
490 IN OUT EFI_TLS_FRAGMENT_DATA **FragmentTable,
491 IN UINT32 *FragmentCount,
492 IN EFI_TLS_CRYPT_MODE CryptMode
493 );
494
500 EFI_TLS_SET_SESSION_DATA SetSessionData;
501 EFI_TLS_GET_SESSION_DATA GetSessionData;
502 EFI_TLS_BUILD_RESPONSE_PACKET BuildResponsePacket;
503 EFI_TLS_PROCESS_PACKET ProcessPacket;
504};
505
506extern EFI_GUID gEfiTlsServiceBindingProtocolGuid;
507extern EFI_GUID gEfiTlsProtocolGuid;
508
509#endif // __EFI_TLS_PROTOCOL_H__
UINT64 UINTN
BOOLEAN EFIAPI RandomBytes(OUT UINT8 *Output, IN UINTN Size)
Definition: CryptRand.c:76
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_TLS_SET_SESSION_DATA)(IN EFI_TLS_PROTOCOL *This, IN EFI_TLS_SESSION_DATA_TYPE DataType, IN VOID *Data, IN UINTN DataSize)
Definition: Tls.h:365
EFI_TLS_SESSION_STATE
Definition: Tls.h:274
@ EfiTlsSessionError
Definition: Tls.h:305
@ EfiTlsSessionHandShaking
Definition: Tls.h:284
@ EfiTlsSessionDataTransferring
Definition: Tls.h:291
@ EfiTlsSessionNotStarted
Definition: Tls.h:279
@ EfiTlsSessionClosing
Definition: Tls.h:298
EFI_TLS_SESSION_DATA_TYPE
Definition: Tls.h:43
@ EfiTlsKeyMaterial
Definition: Tls.h:99
@ EfiTlsServerRandom
Definition: Tls.h:94
@ EfiTlsSessionState
Definition: Tls.h:84
@ EfiTlsClientRandom
Definition: Tls.h:89
@ EfiTlsVersion
Definition: Tls.h:47
@ EfiTlsCipherList
Definition: Tls.h:57
@ EfiTlsExtensionData
Definition: Tls.h:67
@ EfiTlsCompressionMethod
Definition: Tls.h:62
@ EfiTlsVerifyHost
Definition: Tls.h:106
@ EfiTlsSessionID
Definition: Tls.h:79
@ EfiTlsConnectionEnd
Definition: Tls.h:52
@ EfiTlsVerifyMethod
Definition: Tls.h:72
EFI_STATUS(EFIAPI * EFI_TLS_PROCESS_PACKET)(IN EFI_TLS_PROTOCOL *This, IN OUT EFI_TLS_FRAGMENT_DATA **FragmentTable, IN UINT32 *FragmentCount, IN EFI_TLS_CRYPT_MODE CryptMode)
Definition: Tls.h:488
EFI_STATUS(EFIAPI * EFI_TLS_GET_SESSION_DATA)(IN EFI_TLS_PROTOCOL *This, IN EFI_TLS_SESSION_DATA_TYPE DataType, IN OUT VOID *Data OPTIONAL, IN OUT UINTN *DataSize)
Definition: Tls.h:397
UINT8 EFI_TLS_COMPRESSION
Definition: Tls.h:146
UINT32 EFI_TLS_VERIFY_HOST_FLAG
Definition: Tls.h:191
UINT32 EFI_TLS_VERIFY
Definition: Tls.h:166
#define MAX_TLS_SESSION_ID_LENGTH
Definition: Tls.h:263
EFI_STATUS(EFIAPI * EFI_TLS_BUILD_RESPONSE_PACKET)(IN EFI_TLS_PROTOCOL *This, IN UINT8 *RequestBuffer OPTIONAL, IN UINTN RequestSize OPTIONAL, OUT UINT8 *Buffer OPTIONAL, IN OUT UINTN *BufferSize)
Definition: Tls.h:444
EFI_TLS_CRYPT_MODE
Definition: Tls.h:327
@ EfiTlsEncrypt
Definition: Tls.h:331
@ EfiTlsDecrypt
Definition: Tls.h:335
EFI_TLS_CONNECTION_END
Definition: Tls.h:124
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * FragmentBuffer
Definition: Tls.h:321
UINT32 FragmentLength
Definition: Tls.h:317
Definition: Base.h:213