From: Abner Chang <abner.ch...@amd.com> Definitions of EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL.
Signed-off-by: Abner Chang <abner.ch...@amd.com> Cc: Saloni Kasbekar <saloni.kasbe...@intel.com> Cc: Zachary Clark-williams <zachary.clark-willi...@intel.com> Cc: Michael Brown <mc...@ipxe.org> Cc: Nickle Wang <nick...@nvidia.com> Cc: Igor Kulchytskyy <ig...@ami.com> --- NetworkPkg/NetworkPkg.dec | 3 + .../Protocol/HttpsTlsPlatformPolicyProtocol.h | 72 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 NetworkPkg/Include/Protocol/HttpsTlsPlatformPolicyProtocol.h diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec index e06f35e7747..88676c7eaf6 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/HttpsTlsPlatformPolicyProtocol.h + gEdkiiHttpsTlsPlatformPolicyProtocolGuid = {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/HttpsTlsPlatformPolicyProtocol.h b/NetworkPkg/Include/Protocol/HttpsTlsPlatformPolicyProtocol.h new file mode 100644 index 00000000000..5f82ceba924 --- /dev/null +++ b/NetworkPkg/Include/Protocol/HttpsTlsPlatformPolicyProtocol.h @@ -0,0 +1,72 @@ +/** @file + This file defines the EDKII HTTPS TLS Platform Protocol interface. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL_H_ +#define EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL_H_ + +#include <Protocol/Http.h> +#include <Protocol/Tls.h> + +#define EEDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL_GUID \ + { \ + 0xbfe8e3e3, 0xb884, 0x4a6f, {0xae, 0xd3, 0xb8, 0xdb, 0xeb, 0xc5, 0x58, 0xc0} \ + } + +typedef struct _EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL; + +/// +/// EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA_VERSION +/// +typedef struct { + UINT8 Major; + UINT8 Minor; +} EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA_VERSION; + +typedef struct { + EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA_VERSION Version; + /// + /// EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA_VERSION V1.0 + /// + EFI_TLS_CONNECTION_END ConnectionEnd; + EFI_TLS_VERIFY VerifyMethod; + EFI_TLS_VERIFY_HOST VerifyHost; +} EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA; + +/** + Function to get platform HTTPS TLS Policy. + + @param[in] This Pointer to the EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL + instance. + @param[in] HttpHandle EFI_HTTP_PROTOCOL handle used to transfer HTTP payload. + @param[out] PlatformPolicy Pointer to retrieve EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA. + + @retval EFI_SUCCESS Platform HTTPS TLS config data is returned in + PlatformPolicy. + @retval EFI_INVALID_PARAMETER Either HttpHandle or PlatformPolicy is NULL, or both are NULL. + @retval EFI_NOT_FOUND No HTTP protocol insterface is found on HttpHandle. + @retval EFI_UNSUPPORTED HttpProtocolInstance is not the HTTP instance platform + would like to config. +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_HTTPS_TLS_GET_PLATFORM_POLICY)( + IN EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL *This, + IN EFI_HANDLE HttpHandle, + OUT EDKII_PLATFORM_HTTPS_TLS_CONFIG_DATA *PlatformPolicy + ); + +/// +/// Platform can install more than one EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL +/// instances to return the platfrom HTTP TLS policy config data for the +/// multiple HTTP instances. +/// +struct _EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL { + EDKII_HTTPS_TLS_GET_PLATFORM_POLICY PlatformGetPolicy; +}; + +extern EFI_GUID gEdkiiHttpsTlsPlatformPolicyProtocolGuid; +#endif // EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL_H_ -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112914): https://edk2.groups.io/g/devel/message/112914 Mute This Topic: https://groups.io/mt/103368440/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-