From nobody Mon Feb 9 20:46:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59630+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59630+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1589517611; cv=none; d=zohomail.com; s=zohoarc; b=KnaNL1PeIfi2WPYiKVdJ57oN9/21KF8M1jdODxFjog0J7J8Yuo1GnF7gKXndqYQA9RPlNkCIA71iWn4FfkHhElimc2dbPGta7faTc6ijb8IDi4bnU7qdIZNQN/OzL7rbH3A1VKuyhQq5xCFex5l2tqG+oNpsHXBQr2TPZrEcnZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589517611; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Ln4pLwvsab04JKq2txUKYq+VrrNdtllQnxRiaM+MStc=; b=STozzjkZozQWHr1rgD4qde7iW+YC4pbTHFBV5y3v8AiBZrtGruhAD8UwhvSjiO8yakOD9vgpruQktzrckRl62T4Z1qdw7OCxhVjVeN61BOefDMSVhNe4zwKYnjd0tjZwDk+AYSErlWLyB6unjBgoogCfl/yvHAsOyOwEogWLHXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59630+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589517611078599.7601096329913; Thu, 14 May 2020 21:40:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SHH2YY1788612xCDTYg9AS8N; Thu, 14 May 2020 21:40:10 -0700 X-Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web12.7588.1589517603632873743 for ; Thu, 14 May 2020 21:40:04 -0700 IronPort-SDR: +tt2eXnCcaQcUjH8pfReftU0xrDu9HPQd4SvyBCRVaoCK1EMSN3GppbnnM9XjRIiOPbEw2C2vJ CWXwo1Zkc7Zw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 21:40:04 -0700 IronPort-SDR: SCFoCliqaXjaFpGyKvQSoDubeQHAesIRaId5PcO0of/PAzKm9PFN6m5zwA0lEPNaE1BMTerl5L lB1qQQGJ1saA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,394,1583222400"; d="scan'208";a="307317435" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by FMSMGA003.fm.intel.com with ESMTP; 14 May 2020 21:40:02 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jian J Wang , Xiaoyu Lu , Siyuan Fu , Michael D Kinney , Jiewen Yao , Philippe Mathieu-Daude Subject: [edk2-devel] [PATCH V6 01/13] CryptoPkg/CryptoDxe: Add function to indicate the deprecated algorithm Date: Fri, 15 May 2020 12:39:36 +0800 Message-Id: <20200515043948.15028-2-zhichao.gao@intel.com> In-Reply-To: <20200515043948.15028-1-zhichao.gao@intel.com> References: <20200515043948.15028-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,zhichao.gao@intel.com X-Gm-Message-State: jcrtcslezERnsELsoeIRXeHMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589517610; bh=rWPkRrWbYZNm0z595l0tKZRJ5Y9EzduTIkjUBSPNfAk=; h=Cc:Date:From:Reply-To:Subject:To; b=OZN4wECVhwIX+eDMr0rKqOhV8Iof6LGftumslqExK+jD+0oJbJA6P+qvC3+1U4lXOuM Ysqvn00tHjc12Pf44gzxZyVaDZbxKA3N1Fh3enZ8/ULsmh5b1Hxl6jl2GUZJCPQ3ov3a6 hgpgppc0cQ9Rdto08g50fza1F32OIsDTo7k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1898 Add a internal worker function to indicate the deprecated functions. It would print out debug messages and asserts to inform the consumer they are using a deprecated function. Change the Name of BaseCryptLibServciceNotEnabled to correct spelling BaseCryptLibServiceNotEnabled. Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Siyuan Fu Cc: Michael D Kinney Cc: Jiewen Yao Cc: Philippe Mathieu-Daude Reviewed-by: Jian J Wang Signed-off-by: Zhichao Gao --- CryptoPkg/Driver/Crypto.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c index 35bf2d3d92..ed0083cccf 100644 --- a/CryptoPkg/Driver/Crypto.c +++ b/CryptoPkg/Driver/Crypto.c @@ -41,7 +41,7 @@ #define CALL_BASECRYPTLIB(Enable, Function, Args, ErrorReturnValue) \ EDKII_CRYPTO_PCD->Enable \ ? Function Args \ - : (BaseCryptLibServciceNotEnabled (#Function), ErrorReturnValue) + : (BaseCryptLibServiceNotEnabled (#Function), ErrorReturnValue) =20 /** A macro used to call a void BaseCryptLib function if it is enabled. @@ -61,7 +61,7 @@ #define CALL_VOID_BASECRYPTLIB(Enable, Function, Args) \ EDKII_CRYPTO_PCD->Enable \ ? Function Args \ - : BaseCryptLibServciceNotEnabled (#Function) + : BaseCryptLibServiceNotEnabled (#Function) =20 /** Internal worker function that prints a debug message and asserts if a ca= ll is @@ -78,7 +78,7 @@ **/ static VOID -BaseCryptLibServciceNotEnabled ( +BaseCryptLibServiceNotEnabled ( IN CONST CHAR8 *FunctionName ) { @@ -86,6 +86,24 @@ BaseCryptLibServciceNotEnabled ( ASSERT_EFI_ERROR (EFI_UNSUPPORTED); } =20 +/** + Internal worker function that prints a debug message and asserts if a ca= ll is + made to a BaseCryptLib function that is deprecated and unsupported any l= onger. + + @param[in] FunctionName Null-terminated ASCII string that is the name = of an + EDK II Crypto service. + +**/ +static +VOID +BaseCryptLibServiceDeprecated ( + IN CONST CHAR8 *FunctionName + ) +{ + DEBUG ((DEBUG_ERROR, "[%a] Function %a() is deprecated and unsupported a= ny longer\n", gEfiCallerBaseName, FunctionName)); + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); +} + /** Returns the version of the EDK II Crypto Protocol. =20 --=20 2.21.0.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 (#59630): https://edk2.groups.io/g/devel/message/59630 Mute This Topic: https://groups.io/mt/74221324/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-