TianoCore EDK2 master
Loading...
Searching...
No Matches
TlsDriver.h
Go to the documentation of this file.
1
10#ifndef __EFI_TLS_DRIVER_H__
11#define __EFI_TLS_DRIVER_H__
12
13#include <Uefi.h>
14
15//
16// Driver Protocols
17//
19
20//
21// Driver Version
22//
23#define TLS_VERSION 0x00000000
24
25#define TLS_SERVICE_SIGNATURE SIGNATURE_32 ('T', 'L', 'S', 'S')
26
27#define TLS_INSTANCE_SIGNATURE SIGNATURE_32 ('T', 'L', 'S', 'I')
28
33
38
40 UINT32 Signature;
41 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
42
43 UINT16 TlsChildrenNum;
44 LIST_ENTRY TlsChildrenList;
45
46 //
47 // Handle to install TlsServiceBinding protocol.
48 //
49 EFI_HANDLE Handle;
50 EFI_HANDLE ImageHandle;
51
52 //
53 // Main SSL Context object which is created by a server or client once per program
54 // life-time and which holds mainly default values for the SSL object which are later
55 // created for the connections.
56 //
57 VOID *TlsCtx;
58};
59
61 UINT32 Signature;
62 LIST_ENTRY Link;
63
64 BOOLEAN InDestroy;
65
66 TLS_SERVICE *Service;
67 EFI_HANDLE ChildHandle;
68
71
72 EFI_TLS_SESSION_STATE TlsSessionState;
73
74 //
75 // Main SSL Connection which is created by a server or a client
76 // per established connection.
77 //
78 VOID *TlsConn;
79};
80
81#define TLS_SERVICE_FROM_THIS(a) \
82 CR (a, TLS_SERVICE, ServiceBinding, TLS_SERVICE_SIGNATURE)
83
84#define TLS_INSTANCE_FROM_PROTOCOL(a) \
85 CR (a, TLS_INSTANCE, Tls, TLS_INSTANCE_SIGNATURE)
86
87#define TLS_INSTANCE_FROM_CONFIGURATION(a) \
88 CR (a, TLS_INSTANCE, TlsConfig, TLS_INSTANCE_SIGNATURE)
89
96VOID
98 IN TLS_INSTANCE *Instance
99 );
100
113 IN TLS_SERVICE *Service,
114 OUT TLS_INSTANCE **Instance
115 );
116
123VOID
125 IN TLS_SERVICE *Service
126 );
127
140 IN EFI_HANDLE Image,
141 OUT TLS_SERVICE **Service
142 );
143
154EFIAPI
155TlsUnload (
156 IN EFI_HANDLE ImageHandle
157 );
158
171EFIAPI
173 IN EFI_HANDLE ImageHandle,
174 IN EFI_SYSTEM_TABLE *SystemTable
175 );
176
197EFIAPI
200 IN EFI_HANDLE *ChildHandle
201 );
202
222EFIAPI
225 IN EFI_HANDLE ChildHandle
226 );
227
228#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_TLS_SESSION_STATE
Definition: Tls.h:274
VOID TlsCleanService(IN TLS_SERVICE *Service)
Definition: TlsDriver.c:84
EFI_STATUS EFIAPI TlsServiceBindingCreateChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE *ChildHandle)
Definition: TlsDriver.c:311
EFI_STATUS EFIAPI TlsServiceBindingDestroyChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
Definition: TlsDriver.c:405
VOID TlsCleanInstance(IN TLS_INSTANCE *Instance)
Definition: TlsDriver.c:24
EFI_STATUS TlsCreateService(IN EFI_HANDLE Image, OUT TLS_SERVICE **Service)
Definition: TlsDriver.c:108
EFI_STATUS TlsCreateInstance(IN TLS_SERVICE *Service, OUT TLS_INSTANCE **Instance)
Definition: TlsDriver.c:48
EFI_STATUS EFIAPI TlsUnload(IN EFI_HANDLE ImageHandle)
Definition: TlsDriver.c:152
EFI_STATUS EFIAPI TlsDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: TlsDriver.c:235
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33