From nobody Tue Feb 10 00:40: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+59527+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+59527+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1589448480; cv=none; d=zohomail.com; s=zohoarc; b=hcbg2okRiWLZEAQNwpVqbFgXAKtF1z0RrTmE9UW97anjgdz10uqmwo9/xhLOpMDqxpbkvT4tNWuV23xV1FHMlzOAqQMKar1d5YNwvWfFcJmEvcU+X+Atah2wgpeUcvrsHff8+CoelnP97MJZYiMp5Ac6ZvYWLaS53N4Fbp1YP5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589448480; 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=HioNBWmGLIlc2ntwFBCZkJtQ41SLURmmntQ9Ow7NcYI=; b=HB9Gi8SqhdZbMxHdM1xG2Xtse91uSoRuORFHueCc4YjromxUa0Lchx4ypDKtigJSRp5KAWpDCtkY1AilhHHU6aGwzRS8DQC8BzjQgvnXLsfkjJq9MWVjbCRadeZ+UPaEBBc/mzZXyrr2JkH84O/tVjF8cAm5pu2m/D8J6vxA45U= 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+59527+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 1589448480881749.6756131686204; Thu, 14 May 2020 02:28:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zDyPYY1788612xZoYkNK5zDg; Thu, 14 May 2020 02:28:00 -0700 X-Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web11.8744.1589448478745180118 for ; Thu, 14 May 2020 02:28:00 -0700 IronPort-SDR: q9K/fAMV59v6XoWUrSLajTeJ6pEBEGKvfUiUiZsh3l3AhGVppIDzaCzIsnO+ZpXNexIbAYsRww 034mV5fgOmag== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 02:27:59 -0700 IronPort-SDR: 2NuyRCcK9gdKNlqqiLrA/tMvWykN27/XQDBn+r1agd72HJbo6KYPq8TKLsyOxnH3Q9bM1fICTg TZCRrKGg980g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,390,1583222400"; d="scan'208";a="437840221" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by orsmga005.jf.intel.com with ESMTP; 14 May 2020 02:27:57 -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 V5 01/12] CryptoPkg/CryptoDxe: Add function to indicate the deprecated algorithm Date: Thu, 14 May 2020 17:27:41 +0800 Message-Id: <20200514092752.1384-2-zhichao.gao@intel.com> In-Reply-To: <20200514092752.1384-1-zhichao.gao@intel.com> References: <20200514092752.1384-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: NhIBmlrEQo2krttufX2FvIwBx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589448480; bh=85dep5Cr8sYQCqbYqLyGWlbFjlKN1NvxA2/vEpL0asE=; h=Cc:Date:From:Reply-To:Subject:To; b=V7e/c0jIeQuAcOXSfR9GXaxuqr+TuxEXGCiT3px+Y/1jh541A4ZCgN3vyu53tUuWKrx /ZZjaFN1IUOO3SAL/g9ZYtwk8JID6R1ilbf0SSMgKOd2WT9uTF1VdcP+eVqBun/qrm13o KzYmnQgXOcKu+qcoJuOpUzHoHm15AYufEhM= 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 (#59527): https://edk2.groups.io/g/devel/message/59527 Mute This Topic: https://groups.io/mt/74201276/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-