]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg/TlsAuthConfigDxe: fix TlsCaCertificate attributes retrieval
authorLaszlo Ersek <lersek@redhat.com>
Fri, 17 Aug 2018 13:12:38 +0000 (15:12 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 22 Aug 2018 08:32:43 +0000 (10:32 +0200)
commit6896efdec2709e530b23c688cf0f31706709a0c5
tree029601f34a39badc4cab73f74be74866a963b8c4
parentd00759b212e7912113d9c3292c0174c6dbf74842
NetworkPkg/TlsAuthConfigDxe: fix TlsCaCertificate attributes retrieval

Per spec, the GetVariable() runtime service is not required to populate
(*Attributes) on output when it fails with EFI_BUFFER_TOO_SMALL.

Therefore we have to fetch the full contents of the TlsCaCertificate
variable temporarily, just so we can (a) get the current attributes, and
(b) add EFI_VARIABLE_APPEND_WRITE to them for the subsequent SetVariable()
call.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Songpeng Li <songpeng.li@intel.com>
Reported-by: Songpeng Li <songpeng.li@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1090
Fixes: b90c335fbbb674470fbf09601cc522bf61564c30
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Songpeng Li <songpeng.li@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c