public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH V2 0/6] Refactor HTTP DXE to provide TLS reconfiguration capability
@ 2024-01-07 13:26 Chang, Abner via groups.io
  2024-01-07 13:26 ` [edk2-devel] [PATCH V2 1/6] NetworkPkg/HttpDxe: Refactor TlsCreateChild Chang, Abner via groups.io
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Chang, Abner via groups.io @ 2024-01-07 13:26 UTC (permalink / raw)
  To: devel
  Cc: Saloni Kasbekar, Zachary Clark-williams, Michael Brown,
	Nickle Wang, Igor Kulchytskyy

From: Abner Chang <abner.chang@amd.com>

For the HTTPS connetion that doesn't require TLS peer verification,
We introduce a new HTTP event HttpEventTlsConfigured to notify HTTP callback
functions after TlsConfigureSession(). With this event, the upper layer
HTTP application can listen to HttpEventTlsConfigured HTTP event and
reconfigure TLS configuration data in the callback function to set TLS verify
method to TLS_VERIFY_NONE.
The use case such as Redfish service connction which doesn't require the
TLS peer verification on the cetificate, especially to the Redfish service
connection through the in-band network interface.
The root cause we are fixing is the TLS config data is hardcoded in
TlsConfigureSession() for any TLS child in HttpSupport.c. With this hardcoded
code, HTTP application has no way to give the proper TLS config data when TLS
session is initiated.

In V2, total six patches. Relocate HttpEventTlsConfigured event to the end of
       enum. This keeps the enum number backward compatiable.
   - Add 5/6 patch to uncrustify RedfishRestExDriver.h.
   - Fix typo in the commit sibject.

In V1, total five patches:
   Patch 1/5: We agreed to refactor TlsCreateChild and install TLS on
              the given HTTP handle.
   Patch 2/5: We consider TLS certificate not found as a success case to
              ensures HTTP session is still initiated and HttpInitSession()
              returns EFI_SUCCESS to the caller. The failure is pushed back to
              TLS DXE driver if the HTTP communication actually requires
              certificate.
   Patch 3/5: Introduce HttpEventTlsConfigured HTTP callback event
   Patch 4/5: REST EX DXE provides HTTP event callback protocol
   Patch 5/5: REST EX DXE fix.

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>

Abner Chang (6):
  NetworkPkg/HttpDxe: Refactor TlsCreateChild
  NetworkPkg/HttpDxe: Consider TLS certificate not found as a success
    case
  NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event
  RedfishPkg/RedfishRestExDxe: Implement EDKII_HTTP_CALLBACK_PROTOCOL
  RedfishPkg/RedfishRestExDxe: Uncrustify RedfishRestExDriver.h
  RedfishPkg/RedfishRestExDxe: Update Supported function

 .../RedfishRestExDxe/RedfishRestExDxe.inf     |  3 +
 NetworkPkg/HttpDxe/HttpProto.h                |  3 +-
 NetworkPkg/HttpDxe/HttpsSupport.h             | 18 ++--
 NetworkPkg/Include/Protocol/HttpCallback.h    | 15 ++-
 .../RedfishRestExDxe/RedfishRestExDriver.h    | 32 +++++--
 NetworkPkg/HttpDxe/HttpImpl.c                 | 23 +----
 NetworkPkg/HttpDxe/HttpProto.c                |  8 +-
 NetworkPkg/HttpDxe/HttpsSupport.c             | 95 ++++++++++++-------
 .../RedfishRestExDxe/RedfishRestExDriver.c    | 85 +++++++++++++++++
 9 files changed, 204 insertions(+), 78 deletions(-)

-- 
2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113327): https://edk2.groups.io/g/devel/message/113327
Mute This Topic: https://groups.io/mt/103577241/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-10  1:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-07 13:26 [edk2-devel] [PATCH V2 0/6] Refactor HTTP DXE to provide TLS reconfiguration capability Chang, Abner via groups.io
2024-01-07 13:26 ` [edk2-devel] [PATCH V2 1/6] NetworkPkg/HttpDxe: Refactor TlsCreateChild Chang, Abner via groups.io
2024-01-09 23:25   ` Saloni Kasbekar
2024-01-10  1:34     ` Chang, Abner via groups.io
2024-01-07 13:26 ` [edk2-devel] [PATCH V2 2/6] NetworkPkg/HttpDxe: Consider TLS certificate not found as a success case Chang, Abner via groups.io
2024-01-07 13:26 ` [edk2-devel] [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event Chang, Abner via groups.io
2024-01-09 23:25   ` Saloni Kasbekar
2024-01-07 13:26 ` [edk2-devel] [PATCH V2 4/6] RedfishPkg/RedfishRestExDxe: Implement EDKII_HTTP_CALLBACK_PROTOCOL Chang, Abner via groups.io
2024-01-08 14:02   ` Nickle Wang via groups.io
2024-01-07 13:27 ` [edk2-devel] [PATCH V2 5/6] RedfishPkg/RedfishRestExDxe: Uncrustify RedfishRestExDriver.h Chang, Abner via groups.io
2024-01-08 14:03   ` Nickle Wang via groups.io
2024-01-07 13:27 ` [edk2-devel] [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported function Chang, Abner via groups.io
2024-01-08 14:03   ` Nickle Wang via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox