From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 949C4740032 for ; Sun, 7 Jan 2024 13:27:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WJBe+kTtvwPYh46HcyEfynbiLljhnymBCdCSi+5Mqtc=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1704634066; v=1; b=RZ0nUWOOLTwH+R8KtnvVBZ2vckCr46OjfBJm1pGMR7R51U/FQ3U97WWSN0AgaAD7ayQ/gmAX OE6fx9NU2zy20MxczOhdjdGx1xhMtfaZZl4lgfShG+o+Aua6qsPDwilwpYY1zBBupeR33uHclXQ 9o4xQFSZrEATa2X3UPcjUH4M= X-Received: by 127.0.0.2 with SMTP id 1fEgYY7687511xmYvEexGaQo; Sun, 07 Jan 2024 05:27:46 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.62]) by mx.groups.io with SMTP id smtpd.web10.14903.1704634065777922680 for ; Sun, 07 Jan 2024 05:27:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nKrM/co9qafnGWCCa6LCgx2h12NYvirQLC1TjWdyz9sVCIP2WjbbihQHvRN2zEY+leTN2JR31VBemTdujIni49TIurJ1IZ05Y4OBcVwilsPV23tY+KnGZEBAqgM+kh3+D7AcU0jAwxveIvFitn5XB3NZXjyX/Ho235JHcbpY5hvKX2WtRNbRAWfitTuNm6sdEUIosgHYfvCEVR4Fmhvcx3seiZ+nna2dFBEt1jv/hlUZ5vm25XCo65ure+ND7wBh7t3G6Lx/sZPYbkY2oJfuINEJVRlDspTIYyTR15eAF6bOE2ZO3flNXpM2WshqxLNJ8w39/i9A+c9kxIffdArpig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4H70uC2Tlxa04TL4pSoyVmekwRkennv569Z3nRSdkhQ=; b=iHa36QPFSlTXfhZ1oeP7S2DvrwmHj162cJj0c3zFbqG5G/BAh8DNZ605qQhFRKaQ96f5qq+w8HhRi9oMgFKscs57grqnt2CGmOzwzMqlxy9qkbgA/V4sHRAd7PkWcCPElFk7cMNtKFKKLZqhS43L28qWSlVVqDBHxXAqKLT/MY12WX586U1wbjdw5Ey6Jz7Vgn+MRaS9vyX/wWS+LoeUI6V6fd8uD4OkN/7k7YBRUvf/6tvrFM6AJMkY5DxC7Z2GWn9gk3NtkJx7wBzyd5qvYVHg0oRmm7DFwoVGm4+/vo4a1OyqBQu8gUY5uNC1/BiIayZ3QWQxjueT2pigslEUgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from BL1PR13CA0375.namprd13.prod.outlook.com (2603:10b6:208:2c0::20) by DS0PR12MB8245.namprd12.prod.outlook.com (2603:10b6:8:f2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.20; Sun, 7 Jan 2024 13:27:40 +0000 X-Received: from BL6PEPF0001AB4A.namprd04.prod.outlook.com (2603:10b6:208:2c0:cafe::d5) by BL1PR13CA0375.outlook.office365.com (2603:10b6:208:2c0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.13 via Frontend Transport; Sun, 7 Jan 2024 13:27:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB4A.mail.protection.outlook.com (10.167.242.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7181.13 via Frontend Transport; Sun, 7 Jan 2024 13:27:40 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Sun, 7 Jan 2024 07:27:38 -0600 From: "Chang, Abner via groups.io" To: CC: Saloni Kasbekar , Zachary Clark-williams , Michael Brown , Nickle Wang , Igor Kulchytskyy Subject: [edk2-devel] [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event Date: Sun, 7 Jan 2024 21:26:58 +0800 Message-ID: <20240107132701.302-4-abner.chang@amd.com> In-Reply-To: <20240107132701.302-1-abner.chang@amd.com> References: <20240107132701.302-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB4A:EE_|DS0PR12MB8245:EE_ X-MS-Office365-Filtering-Correlation-Id: f449a6b2-f132-4dda-45d2-08dc0f846c1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 1VBlOxpydycE+inblEjN2S/JouUsST6+gHwGmLeSGIvne+5BO9XccUXpcu7RpOXwd5t11qjFAW44gv5OCz7pibF8IKBzbxGzfYuwksrvNXMq+v43OHxko2wyzAVEd6MvoG+5UTuU83+JjSoh3rqzRQQxex68w50/B9qh2y5B92XuIh1YkG5UYhe4JpRxFkvbzusOVE83HXdYqLQWey8jNL6YkpbXVz+ri4g+AH5Ybp+gyU8gm8qYselfXgLhWeNCXKmp1ImiHQmSlxuMbN+zePOzcZ3oQVkbK3Fgd8V+U3v+o1KqKFyGmeCJ1sqRyVWE6NejOuH62rp8eXMzqMiZCOttt2wg30aButLy7Kmy6dhibfvVNmYZxUTMB6i8EIiOZqE7f4luUmI6/7AaMsndZeaE25F3rZsR6Duvh9rAiq8Z/kw7u9QUk9MWpiWHjqGh19Wq7+2G5xCnJ+fi2Mup7f129s6O3Bj9OHqVJds+yZuLo0djom1ly95B4UrRdU7Ncq4fyygF6VFtDeQVL8GDCnVRf1hBI5YY/fj1E+yjNESJt8iY8jN2+uZVU8S9sQRENulRMHCEatxnpsnmZ1gygpd7fz0xpaz6VoVJ6hYBlZRRapgiDl2KwVfUlEaR6GFENiYyRd7VnLlfX+RwzVaZNg6egGX9v8dpTg4TfkI5Hbd6922tAYF34kL2V5vy4aH5SxeW7kRCPqRLb8RIymskWHz81CcAJoSRypZMHd9LYtqmxnmyKzYUY0HMXIEtIHrdSQbBlByugVE39bWHCZSM2g== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2024 13:27:40.3256 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f449a6b2-f132-4dda-45d2-08dc0f846c1d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB4A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8245 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: PT69acgjfGEGbrbWdfBjiH4ax7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=RZ0nUWOO; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") From: Abner Chang Add HttpEventTlsConfigured HTTP callback event and notify callback functions when TlsConfigureSession () returns. Signed-off-by: Abner Chang Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Michael Brown Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Michael Brown --- NetworkPkg/Include/Protocol/HttpCallback.h | 15 ++++++++++++++- NetworkPkg/HttpDxe/HttpProto.c | 1 + NetworkPkg/HttpDxe/HttpsSupport.c | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/NetworkPkg/Include/Protocol/HttpCallback.h b/NetworkPkg/Includ= e/Protocol/HttpCallback.h index 3accd2f8424..ae66cc9f771 100644 --- a/NetworkPkg/Include/Protocol/HttpCallback.h +++ b/NetworkPkg/Include/Protocol/HttpCallback.h @@ -2,6 +2,7 @@ This file defines the EDKII HTTP Callback Protocol interface. =20 Copyright (c) 2021, Intel Corporation. All rights reserved.
+ Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 @@ -55,7 +56,19 @@ typedef enum { /// EFI_SUCCESS The initialization of session is done. /// Others Other error as indicated. /// - HttpEventInitSession + HttpEventInitSession, + + /// + /// The Status of Event to configure TLS configuration data. + /// EventStatus: + /// EFI_SUCCESS The TLS is configured successfully with the d= efault value. + /// EFI_INVALID_PARAMETER One or more input parameters to SetSessionDat= a() is invalid. + /// EFI_NOT_READY Current TLS session state is NOT EfiTlsSessio= nStateNotStarted. + /// EFI_NOT_FOUND Fail to get 'HttpTlsCipherList' variable. + /// Others Other error as indicated. + /// + HttpEventTlsConfigured + } EDKII_HTTP_CALLBACK_EVENT; =20 /** diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.= c index 94900328ba9..9c3b497dce2 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1418,6 +1418,7 @@ HttpInitSession ( // if (TlsConfigure) { Status =3D TlsConfigureSession (HttpInstance); + HttpNotify (HttpEventTlsConfigured, Status); if (EFI_ERROR (Status)) { return Status; } diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSu= pport.c index 04a830f7152..8d7bffe1e9c 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -723,7 +723,7 @@ TlsConfigureSession ( Status =3D TlsConfigCertificate (HttpInstance); if (EFI_ERROR (Status)) { if (Status =3D=3D EFI_NOT_FOUND) { - DEBUG((DEBUG_WARN, "TLS Certificate is not found on the system!\n"))= ; + DEBUG ((DEBUG_WARN, "TLS Certificate is not found on the system!\n")= ); // // We still return EFI_SUCCESS to the caller when TlsConfigCertifica= te // returns error, for the use case the platform doesn't require @@ -734,7 +734,7 @@ TlsConfigureSession ( // Status =3D EFI_SUCCESS; } else { - DEBUG((DEBUG_ERROR, "TLS Certificate Config Error!\n")); + DEBUG ((DEBUG_ERROR, "TLS Certificate Config Error!\n")); return Status; } } --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113331): https://edk2.groups.io/g/devel/message/113331 Mute This Topic: https://groups.io/mt/103577248/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-