1 | /** @file
|
---|
2 | The file operation functions for WiFi Connection Manager.
|
---|
3 |
|
---|
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef __EFI_WIFI_MGR_FILE_UTIL__
|
---|
11 | #define __EFI_WIFI_MGR_FILE_UTIL__
|
---|
12 |
|
---|
13 | #include "WifiConnectionMgrDxe.h"
|
---|
14 |
|
---|
15 | /**
|
---|
16 | Read file content into BufferPtr, the size of the allocate buffer
|
---|
17 | is *FileSize plus AddtionAllocateSize.
|
---|
18 |
|
---|
19 | @param[in] FileHandle The file to be read.
|
---|
20 | @param[in, out] BufferPtr Pointers to the pointer of allocated buffer.
|
---|
21 | @param[out] FileSize Size of input file
|
---|
22 | @param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
---|
23 | In case the buffer need to contain others besides the file content.
|
---|
24 |
|
---|
25 | @retval EFI_SUCCESS The file was read into the buffer.
|
---|
26 | @retval EFI_INVALID_PARAMETER A parameter was invalid.
|
---|
27 | @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
---|
28 | @retval others Unexpected error.
|
---|
29 |
|
---|
30 | **/
|
---|
31 | EFI_STATUS
|
---|
32 | ReadFileContent (
|
---|
33 | IN EFI_FILE_HANDLE FileHandle,
|
---|
34 | IN OUT VOID **BufferPtr,
|
---|
35 | OUT UINTN *FileSize,
|
---|
36 | IN UINTN AddtionAllocateSize
|
---|
37 | );
|
---|
38 |
|
---|
39 | /**
|
---|
40 | Update the CA cert base on the input file path info.
|
---|
41 |
|
---|
42 | @param[in] Private The pointer to the global private data structure.
|
---|
43 | @param[in] FilePath Point to the file path.
|
---|
44 |
|
---|
45 | @retval TRUE Exit caller function.
|
---|
46 | @retval FALSE Not exit caller function.
|
---|
47 |
|
---|
48 | **/
|
---|
49 | BOOLEAN
|
---|
50 | UpdateCAFromFile (
|
---|
51 | IN WIFI_MGR_PRIVATE_DATA *Private,
|
---|
52 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
---|
53 | );
|
---|
54 |
|
---|
55 | /**
|
---|
56 | Update the Private Key base on the input file path info.
|
---|
57 |
|
---|
58 | @param[in] Private The pointer to the global private data structure.
|
---|
59 | @param[in] FilePath Point to the file path.
|
---|
60 |
|
---|
61 | @retval TRUE Exit caller function.
|
---|
62 | @retval FALSE Not exit caller function.
|
---|
63 |
|
---|
64 | **/
|
---|
65 | BOOLEAN
|
---|
66 | UpdatePrivateKeyFromFile (
|
---|
67 | IN WIFI_MGR_PRIVATE_DATA *Private,
|
---|
68 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
---|
69 | );
|
---|
70 |
|
---|
71 | #endif
|
---|