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 93224941E21 for ; Tue, 9 Jan 2024 23:25:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rHaPzEkTdpyCnmCfhcby5J03F0i/pLq5YEU1e12eTRg=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1704842720; v=1; b=fIpu8LX1oROF8u54wQ1Cxy0PPgIrK0FhQMRvzLxUmXoQUMg7l8QrY46QKAYsIniSywEaoKVx iu+l8osAKbssB0PwJCaOBmGcWbbgVu8GkIZnv41X+EBOjpcaRx0wZnTIPxQ7jli/eOtOGA/I0oW anO4RXIceOwTWFbZFqJz3/3s= X-Received: by 127.0.0.2 with SMTP id wAshYY7687511xHljy0RE60v; Tue, 09 Jan 2024 15:25:20 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.32509.1704842719246743808 for ; Tue, 09 Jan 2024 15:25:19 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="429538007" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="429538007" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 15:25:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="816144188" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="816144188" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Jan 2024 15:25:13 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 15:25:13 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 15:25:12 -0800 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 9 Jan 2024 15:25:12 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 9 Jan 2024 15:25:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtzTVT9UfOEyYyggnXpaEe7zC74egcDXB3O//q5z8fxMvpI53rLOd9TGvRlAMmsyQXrrpvimW00t8QEJRykvotSzqQ5AeCBRGB0DvNBFvCUocgYz0xLXbG6wVP6M+E82agst7H1wql3EYXSIvuyvk2yGjHJRZJI+iLpMQZP4v4QmHXhB4sqku09O410ZTKsYQOHSRlg7g1pUri0mSaYuTBcMM1XpOZzCskH70PzZnCVY1SFZUuUzvtDg0UTxUFCZr+1BbHizBiDBOrlQFZLF5OVgsEkzp6YzYZ5jilYLkSULgc+LLb05+RcbF1njuKIZx1HE5WWZv440bQC+mYKM0A== 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=T+55EbqRbRM8CegRUIyzTpisiDQ7BOqIY2wl8HMkYRY=; b=hMLdPO9SYjGAD8BdTlhimq5tgdMsOIMDHL2Cwxlu/Qj1tLwRplc4687agbj8AmxPNWcaDrCLSYbJoDkNOaJP5GU9lQv4VUuKxfv/0HqGLz7e4r4ubi0Ke1Xyn8EKhOFZcB7sRc8xn6ytPTD5K68Q0yUdEJzNOgnxnHhiIBj2lBsoYtNWqwN1ZTIZZtXrZk7t1X1a+tVTywW9j54FhvJX8/Z5ik5X1udV660wnEH4AtW4rQwLgEcAL1G4yeqhLRFyzJ/xyqx3sVGIF3xUKMzoqppjd0Aem1zWz1YrytvVwOPXTWx07OeaS7BJc2AWrWnhm/BdjRTCgK/JIhOmzMrMdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from SN7PR11MB8281.namprd11.prod.outlook.com (2603:10b6:806:26b::20) by PH8PR11MB6904.namprd11.prod.outlook.com (2603:10b6:510:227::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Tue, 9 Jan 2024 23:25:11 +0000 X-Received: from SN7PR11MB8281.namprd11.prod.outlook.com ([fe80::d2a9:6c81:214f:f89]) by SN7PR11MB8281.namprd11.prod.outlook.com ([fe80::d2a9:6c81:214f:f89%7]) with mapi id 15.20.7159.020; Tue, 9 Jan 2024 23:25:11 +0000 From: "Saloni Kasbekar" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: "Clark-williams, Zachary" , "Michael Brown" , Nickle Wang , Igor Kulchytskyy Subject: Re: [edk2-devel] [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event Thread-Topic: [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event Thread-Index: AQHaQW1VYEdpI6K8eEeNbnzZvUeRaLDSIzzQ Date: Tue, 9 Jan 2024 23:25:10 +0000 Message-ID: References: <20240107132701.302-1-abner.chang@amd.com> <20240107132701.302-4-abner.chang@amd.com> In-Reply-To: <20240107132701.302-4-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB8281:EE_|PH8PR11MB6904:EE_ x-ms-office365-filtering-correlation-id: 852a3c35-2931-481b-1270-08dc116a399a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: IUcGTa/G4wo7tncJdsdRcW8Fbt/BIgOWPcZH9HSXjTYQeXkVLAaHkyHmFhNMjWD3yM+LLbhLHu95/dAMmuuMxXLgJmKBoUNO7llHidB5ceItjABYAMqkRhZhetr8mc17iX7IhIzTs79sP93cpiFKdNjiQR/fYeOG7fYODkIuyDGbn4BWyaM8Zfkod1D9FxI9zhbCLTKuoCqZULVNKNuhWakvG0pr97BybK/f3sR14y6uu1kXLvtF59CXH/MEpcZ17FeS1Y7wHTQHHfqhvMWYNTNwef9Dr/UPCASJEFrfU+cO2nVzu1FiPLeKkbhR1iAcBwvPwsu07Jc+OoUb1zG0oudGtPmOkuAi0m0hRi8/z/07ssWuVcaAyojNXS2iQZKh5clYvremTjH/r+oBt4M5UDFQoaDO2vPWYAI8htXnbsspkCzCe5kzTwBDjIQeUGlXnDHIDZzwPZNa4eQcv0u4fSNKUxIC4H1xleaBBZlwrFQ/DAqPFsCXdol5ky2ualAQuWMFDripKr254Q/6acpTAAZjh3Y64Mbe6Pm86BJmJ88bcCfWrO2Va98i7MQczfVFoKj31+jAghOKzO45TKxFFYW5ibotmr5qyzdqDOywZo7A0m0Twch7tkBNvTPmHniE x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ufAuPpF3SZKOAx/sG7auQhuLCTtwe/9Bxj9OemQT/h8p/sa05F7kxLHStTSw?= =?us-ascii?Q?40K8qjsdjz2qZN4JRc7FKLSuHZDll8HtoCD0pwR9DMPsvrbiCQVSF+Prl82g?= =?us-ascii?Q?PVqQCGeHGGuKQv9r1bBMDAZ/609mMxrC1VGozMZFM2aorv1njl+ZTDCFpf2I?= =?us-ascii?Q?YRu5mes/2BDInc1dRRFeTds3jXALXpXOgq3KYWwGvH5TSYV11R4O5Rv1kOJm?= =?us-ascii?Q?HIz4AWSfKjFNeirq19E4KZ6iVuy0mpGZQn1Oa139cCDD4idwhouYgNsu3Tcg?= =?us-ascii?Q?ajikKaWQbtjkvwN9NRaeAUveoIna8VFwth4wMBHlXkgN4ew4h7Ol3UU5HzIz?= =?us-ascii?Q?7H+ave4cZPxiDWcBRZv2fPyK901h2US+nXuXH8M1zJLtUXNfj959KLYNBaCW?= =?us-ascii?Q?GUa9phBQTagX9kmCsYGn0sTBaY2X5DCt5yC1cBFhjqaZmuSeS0xI2Jw0xpDi?= =?us-ascii?Q?GcpYXestHtfgOfYSOzQ3YwUYh+/+gVNPuazzL4aZrtsb9qScsK1U+YU43m2F?= =?us-ascii?Q?p49HUNViKZu0Waj+5i3gnRj3CZK8Azz3OqiCH9T9GPQfvpNkQnXXoee/4d3Y?= =?us-ascii?Q?7w/y56VCysfUbhtw1ueOPEiXQlWVNxr3EDRK7aFfjkKIDsnwzxVV9AGa4yOI?= =?us-ascii?Q?6iwCfV4XqHPf7qrFGN30LOWZJYfF2Q8U2su6xhiNbG8zDmtdJ9MAkldAEwnv?= =?us-ascii?Q?ZvdZS+W10Jh7balZu7AI9BiP9MYfoPlRREj3Xj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: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB8281.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 852a3c35-2931-481b-1270-08dc116a399a X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2024 23:25:11.0167 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ACY4M592fhIhromfYC5yM/FaVL4uM+tWcTA2zet3JJ17X4ByydWKL1OR4UpzwxN/faOpvPx1dkA3OgIDs//f/0/qnMGKG6tbklv3Zbe74yU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6904 X-OriginatorOrg: intel.com 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,saloni.kasbekar@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: UyQBPaKRHmy7d9qBD9CIoj3Yx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fIpu8LX1; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=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 Reviewed-by: Saloni Kasbekar -----Original Message----- From: abner.chang@amd.com =20 Sent: Sunday, January 7, 2024 5:27 AM To: devel@edk2.groups.io Cc: Kasbekar, Saloni ; Clark-williams, Zachary <= zachary.clark-williams@intel.com>; Michael Brown ; Nickle W= ang ; Igor Kulchytskyy Subject: [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP= callback event From: Abner Chang Add HttpEventTlsConfigured HTTP callback event and notify callback function= s 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=20 + 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=20 + 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; } } -- 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 (#113494): https://edk2.groups.io/g/devel/message/113494 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-