diff options
author | Abner Chang <abner.chang@amd.com> | 2023-12-30 14:42:05 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-10 03:19:31 +0000 |
commit | 0abd598e3f123ce89a9f543206fd355dfc02fef3 (patch) | |
tree | cfa3cc80b908d7c978d19fd4a80afb1fec902bcb /NetworkPkg/HttpDxe/HttpProto.c | |
parent | edba0779ba05c0598dbdd32006714fed4fd24ae0 (diff) | |
download | edk2-0abd598e3f123ce89a9f543206fd355dfc02fef3.tar.gz edk2-0abd598e3f123ce89a9f543206fd355dfc02fef3.tar.bz2 edk2-0abd598e3f123ce89a9f543206fd355dfc02fef3.zip |
NetworkPkg/HttpDxe: Refactor TlsCreateChild
- Use HTTP instance as the parameter for TlsCreateChild function.
- Install TLS protocol on the HTTP instance thats create TLS child.
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Cc: Michael Brown <mcb30@ipxe.org>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Reviewed-by: Michael Brown <mcb30@ipxe.org>
Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.c')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 7dfb82dd2e..94900328ba 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -3,6 +3,7 @@ Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -852,12 +853,12 @@ HttpCleanProtocol ( NetMapClean (&HttpInstance->TxTokens);
NetMapClean (&HttpInstance->RxTokens);
- if ((HttpInstance->TlsSb != NULL) && (HttpInstance->TlsChildHandle != NULL)) {
+ if ((HttpInstance->TlsSb != NULL) && HttpInstance->TlsAlreadyCreated) {
//
// Destroy the TLS instance.
//
- HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->TlsChildHandle);
- HttpInstance->TlsChildHandle = NULL;
+ HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->Handle);
+ HttpInstance->TlsAlreadyCreated = FALSE;
}
if (HttpInstance->Tcp4ChildHandle != NULL) {
|