1 | /** @file
|
---|
2 | SSL/TLS Initialization Null Library Wrapper Implementation.
|
---|
3 |
|
---|
4 | Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
|
---|
5 | (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #include "InternalTlsLib.h"
|
---|
11 |
|
---|
12 | /**
|
---|
13 | Initializes the library.
|
---|
14 |
|
---|
15 | This function registers ciphers and digests used directly and indirectly
|
---|
16 | by SSL/TLS, and initializes the readable error messages.
|
---|
17 | This function must be called before any other action takes places.
|
---|
18 |
|
---|
19 | @retval TRUE The library has been initialized.
|
---|
20 | @retval FALSE Failed to initialize the library.
|
---|
21 |
|
---|
22 | **/
|
---|
23 | BOOLEAN
|
---|
24 | EFIAPI
|
---|
25 | TlsInitialize (
|
---|
26 | VOID
|
---|
27 | )
|
---|
28 | {
|
---|
29 | ASSERT(FALSE);
|
---|
30 | return FALSE;
|
---|
31 | }
|
---|
32 |
|
---|
33 | /**
|
---|
34 | Free an allocated SSL_CTX object.
|
---|
35 |
|
---|
36 | @param[in] TlsCtx Pointer to the SSL_CTX object to be released.
|
---|
37 |
|
---|
38 | **/
|
---|
39 | VOID
|
---|
40 | EFIAPI
|
---|
41 | TlsCtxFree (
|
---|
42 | IN VOID *TlsCtx
|
---|
43 | )
|
---|
44 | {
|
---|
45 | ASSERT(FALSE);
|
---|
46 | return;
|
---|
47 | }
|
---|
48 |
|
---|
49 | /**
|
---|
50 | Creates a new SSL_CTX object as framework to establish TLS/SSL enabled
|
---|
51 | connections.
|
---|
52 |
|
---|
53 | @param[in] MajorVer Major Version of TLS/SSL Protocol.
|
---|
54 | @param[in] MinorVer Minor Version of TLS/SSL Protocol.
|
---|
55 |
|
---|
56 | @return Pointer to an allocated SSL_CTX object.
|
---|
57 | If the creation failed, TlsCtxNew() returns NULL.
|
---|
58 |
|
---|
59 | **/
|
---|
60 | VOID *
|
---|
61 | EFIAPI
|
---|
62 | TlsCtxNew (
|
---|
63 | IN UINT8 MajorVer,
|
---|
64 | IN UINT8 MinorVer
|
---|
65 | )
|
---|
66 | {
|
---|
67 | ASSERT(FALSE);
|
---|
68 | return NULL;
|
---|
69 | }
|
---|
70 |
|
---|
71 | /**
|
---|
72 | Free an allocated TLS object.
|
---|
73 |
|
---|
74 | This function removes the TLS object pointed to by Tls and frees up the
|
---|
75 | allocated memory. If Tls is NULL, nothing is done.
|
---|
76 |
|
---|
77 | @param[in] Tls Pointer to the TLS object to be freed.
|
---|
78 |
|
---|
79 | **/
|
---|
80 | VOID
|
---|
81 | EFIAPI
|
---|
82 | TlsFree (
|
---|
83 | IN VOID *Tls
|
---|
84 | )
|
---|
85 | {
|
---|
86 | ASSERT(FALSE);
|
---|
87 | }
|
---|
88 |
|
---|
89 | /**
|
---|
90 | Create a new TLS object for a connection.
|
---|
91 |
|
---|
92 | This function creates a new TLS object for a connection. The new object
|
---|
93 | inherits the setting of the underlying context TlsCtx: connection method,
|
---|
94 | options, verification setting.
|
---|
95 |
|
---|
96 | @param[in] TlsCtx Pointer to the SSL_CTX object.
|
---|
97 |
|
---|
98 | @return Pointer to an allocated SSL object.
|
---|
99 | If the creation failed, TlsNew() returns NULL.
|
---|
100 |
|
---|
101 | **/
|
---|
102 | VOID *
|
---|
103 | EFIAPI
|
---|
104 | TlsNew (
|
---|
105 | IN VOID *TlsCtx
|
---|
106 | )
|
---|
107 | {
|
---|
108 | ASSERT(FALSE);
|
---|
109 | return NULL;
|
---|
110 | }
|
---|
111 |
|
---|