Laszlo Ersek 9f5d1f7c31 NetworkPkg/TlsAuthConfigDxe: replace OpenFileByDevicePath() with UefiLib API
Replace the OpenFileByDevicePath() function with EfiOpenFileByDevicePath()
from UefiLib, correcting the following issues:

- imprecise comments on OpenFileByDevicePath(),
- code duplication between this module and other modules,
- local variable name "EfiSimpleFileSystemProtocol" starting with "Efi"
  prefix,
- bogus "FileHandle = NULL" assignments,
- passing a potentially unaligned "FILEPATH_DEVICE_PATH.PathName" field to
  a protocol member function (forbidden by the UEFI spec),
- leaking "Handle1" when the device path type/subtype check fails in the
  loop,
- stale SHELL_FILE_HANDLE reference in a comment.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1008
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-08-16 20:02:50 +02:00

74 lines
2.2 KiB
INI

## @file
# Provides the capability to configure Tls Authentication in a setup browser
# By this module, user may change the content of TlsCaCertificate.
#
# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = TlsAuthConfigDxe
MODULE_UNI_FILE = TlsAuthConfigDxe.uni
FILE_GUID = 7ca1024f-eb17-11e5-9dba-28d2447c4829
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = TlsAuthConfigDxeDriverEntryPoint
UNLOAD_IMAGE = TlsAuthConfigDxeUnload
#
# VALID_ARCHITECTURES = IA32 X64
#
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
NetworkPkg/NetworkPkg.dec
[Sources]
TlsAuthConfigImpl.c
TlsAuthConfigImpl.h
TlsAuthConfigNvData.h
TlsAuthConfigDxe.c
TlsAuthConfigDxeStrings.uni
TlsAuthConfigVfr.vfr
[LibraryClasses]
BaseLib
BaseMemoryLib
MemoryAllocationLib
UefiLib
UefiBootServicesTableLib
UefiRuntimeServicesTableLib
UefiDriverEntryPoint
DebugLib
HiiLib
DevicePathLib
UefiHiiServicesLib
FileExplorerLib
PrintLib
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
gEfiHiiConfigAccessProtocolGuid ## PRODUCES
[Guids]
gTlsAuthConfigGuid ## PRODUCES ## GUID
gEfiCertX509Guid ## SOMETIMES_CONSUMES ## GUID # Indicate the cert type
gEfiIfrTianoGuid ## SOMETIMES_PRODUCES ## HII
gEfiTlsCaCertificateGuid ## PRODUCES ## Variable:L"TlsCaCertificate"
[Depex]
gEfiHiiConfigRoutingProtocolGuid AND
gEfiHiiDatabaseProtocolGuid
[UserExtensions.TianoCore."ExtraFiles"]
TlsAuthConfigDxeExtra.uni