public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
To: <devel@edk2.groups.io>
Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>,
	Zachary Clark-williams <zachary.clark-williams@intel.com>,
	Michael Brown <mcb30@ipxe.org>, Nickle Wang <nicklew@nvidia.com>,
	Igor Kulchytskyy <igork@ami.com>
Subject: [edk2-devel] [PATCH 2/5] NetworkPkg: Introduce HttpsTlsConfigDataProtocol
Date: Sat, 30 Dec 2023 19:29:26 +0800	[thread overview]
Message-ID: <20231230112929.1711-3-abner.chang@amd.com> (raw)
In-Reply-To: <20231230112929.1711-1-abner.chang@amd.com>

From: abnchang <abnchang@amd.com>

Introduce HttpsTlsConfigDataProtocol the HTTP application
can install it on the HTTP protocol handle to provide its
own TLS configuration data.

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>
---
 NetworkPkg/NetworkPkg.dec                     |  3 ++
 .../Protocol/HttpsTlsConfigDataProtocol.h     | 48 +++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 NetworkPkg/Include/Protocol/HttpsTlsConfigDataProtocol.h

diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
index e06f35e7747..17473464d1e 100644
--- a/NetworkPkg/NetworkPkg.dec
+++ b/NetworkPkg/NetworkPkg.dec
@@ -94,6 +94,9 @@
   ## Include/Protocol/WiFiProfileSyncProtocol.h
   gEdkiiWiFiProfileSyncProtocolGuid = {0x399a2b8a, 0xc267, 0x44aa, {0x9a, 0xb4, 0x30, 0x58, 0x8c, 0xd2, 0x2d, 0xcc}}
 
+  ## Include/Protocol/HttpsTlsConfigDataProtocol.h
+  gEdkiiHttpsTlsConfigDataProtocolGuid = {0xbfe8e3e3, 0xb884, 0x4a6f, {0xae, 0xd3, 0xb8, 0xdb, 0xeb, 0xc5, 0x58, 0xc0}}
+
 [PcdsFixedAtBuild]
   ## The max attempt number will be created by iSCSI driver.
   # @Prompt Max attempt number.
diff --git a/NetworkPkg/Include/Protocol/HttpsTlsConfigDataProtocol.h b/NetworkPkg/Include/Protocol/HttpsTlsConfigDataProtocol.h
new file mode 100644
index 00000000000..ec429d9ed38
--- /dev/null
+++ b/NetworkPkg/Include/Protocol/HttpsTlsConfigDataProtocol.h
@@ -0,0 +1,48 @@
+/** @file
+  This file defines the EDKII HTTPS TLS Config Data Protocol
+
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef EDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL_H_
+#define EDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL_H_
+
+#include <Protocol/Http.h>
+#include <Protocol/Tls.h>
+
+#define EEDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL_GUID \
+  { \
+    0xbfe8e3e3, 0xb884, 0x4a6f, {0xae, 0xd3, 0xb8, 0xdb, 0xeb, 0xc5, 0x58, 0xc0} \
+  }
+
+///
+/// HTTP TLS configuration structure version that  manages
+/// structure format of EDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL.
+///
+typedef struct {
+  UINT8    Major;
+  UINT8    Minor;
+} EDKII_HTTPS_TLS_CONFIG_DATA_VERSION;
+
+///
+/// HTTPS TLS configuration data structure.
+///
+typedef struct {
+  EFI_TLS_VERSION           Version;
+  EFI_TLS_CONNECTION_END    ConnectionEnd;
+  EFI_TLS_VERIFY            VerifyMethod;
+  EFI_TLS_VERIFY_HOST       VerifyHost;
+  EFI_TLS_SESSION_STATE     SessionState;
+} HTTPS_TLS_CONFIG_DATA;
+
+typedef struct {
+  EDKII_HTTPS_TLS_CONFIG_DATA_VERSION    Version;
+  ///
+  /// EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA_VERSION V1.0
+  ///
+  HTTPS_TLS_CONFIG_DATA                  HttpsTlsConfigData;
+} EDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL;
+
+extern EFI_GUID  gEdkiiHttpsTlsConfigDataProtocolGuid;
+#endif // EDKII_HTTPS_TLS_CONFIG_DATA_PROTOCOL_H_
-- 
2.37.1.windows.1



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



  parent reply	other threads:[~2023-12-30 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 11:29 [edk2-devel] [PATCH 0/5] Support HTTP application TLS configuration protocol Chang, Abner via groups.io
2023-12-30 11:29 ` [edk2-devel] [PATCH 1/5] NetworkPkg/HttpDxe: Refactor TlsCreateChild function Chang, Abner via groups.io
2024-01-01 22:09   ` Michael Brown
2024-01-02  2:55     ` Chang, Abner via groups.io
2023-12-30 11:29 ` Chang, Abner via groups.io [this message]
2023-12-30 11:29 ` [edk2-devel] [PATCH 3/5] NetworkPkg/HttpDxe: Use HttpsTlsConfigDataProtocol Chang, Abner via groups.io
2023-12-30 11:29 ` [edk2-devel] [PATCH 4/5] RedfishPkg/RedfishRestExDxe: Produce EdkiiHttpsTlsConfigData protocol Chang, Abner via groups.io
2023-12-30 11:29 ` [edk2-devel] [PATCH 5/5] RedfishPkg/RedfishRestExDxe: Update the Supported function Chang, Abner via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231230112929.1711-3-abner.chang@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox