From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.1890.1588837562087616879 for ; Thu, 07 May 2020 00:46:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=brBRTDcV; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588837561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AQZbqJQpvSaVKUuEv6EwG+X4c9UPTPfKNyL3VJ9XFAM=; b=brBRTDcVdbw538uRwoxvMmN64bvmOckXcZAJrz1S4Gw43GjMKc7iPjy8M6eyi6hpyZ1eyI luruG1f4vXQhXkLblrJdIePHBBVLkPOZvytp6m3X34/BYtRQxjJZzePPP5Hpn8ZLNtgMP/ ZWTHBfxp60qENFMXGJB5NnTE/F/OsVk= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18-t62snJ-bNb26OYYnQo4vZA-1; Thu, 07 May 2020 03:45:54 -0400 X-MC-Unique: t62snJ-bNb26OYYnQo4vZA-1 Received: by mail-wr1-f71.google.com with SMTP id p8so2903108wrj.5 for ; Thu, 07 May 2020 00:45:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AQZbqJQpvSaVKUuEv6EwG+X4c9UPTPfKNyL3VJ9XFAM=; b=INUBZ1aA0MRTlEvlWdBPzH9fnIoSLSA55tKR3roymWdHCGAESBe36IBr9/hSyob5F5 LUJxCqdXwdXf2tSVrWRD1M74sKJ/N3HST0wYdwWmm3+ItZGOSb1yRDkxsPWRaL4iXx6V 8829vKjcKpTNszZ0PnPzsOtt3v+YfxPefvOQH4OOxCBjGru/eyj77lp7gtv20H80HBSQ ZMZJeotQZNKNMWdGFXbmpNG5vmW0scGlyARLaFP0XGtlJbuUqaFt8/CwSH6behmwDnI1 VZ1VLqgePpRxgkWHwY/8/L9HE+ZhzRL2C3SzMORq0w3rLccIi3hV7Qy/zIXCiMugbm6z iGXg== X-Gm-Message-State: AGi0PubbOBDJTOcWmSjWYZF5vhp29rL/fQXD4MeSZL/41ejNhdzX74dV j1W1QPPpQC795aqBVHUshO/8xH8MAAz2eBQsqQ8COp1rYw63t9Yzxh2ayTtO6F5I8AwKVus328M pgkpTZX2dkmrSrA== X-Received: by 2002:adf:e905:: with SMTP id f5mr14099584wrm.409.1588837552946; Thu, 07 May 2020 00:45:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJL3tyic9DqcWWd3yoh+ogMexutMC/gRvZB+NGLZCtMjkh27TM/FdQVckrX/FPjmAkonvO3Tg== X-Received: by 2002:adf:e905:: with SMTP id f5mr14099565wrm.409.1588837552765; Thu, 07 May 2020 00:45:52 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (248.red-88-21-203.staticip.rima-tde.net. [88.21.203.248]) by smtp.gmail.com with ESMTPSA id d7sm6563598wrn.78.2020.05.07.00.45.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 00:45:52 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH V3 1/8] CryptoPkg/CryptoDxe: Add function to indicate the deprecated algorithm To: devel@edk2.groups.io, zhichao.gao@intel.com Cc: Jian J Wang , Xiaoyu Lu , Siyuan Fu , Michael D Kinney , Jiewen Yao References: <20200506235746.19500-1-zhichao.gao@intel.com> <20200506235746.19500-2-zhichao.gao@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Thu, 7 May 2020 09:45:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200506235746.19500-2-zhichao.gao@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 5/7/20 1:57 AM, Gao, Zhichao wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1898 > > Add a internal worker function to indicate the deprecated functions. > It would print out debug messages and asserts ot inform the consumer Typo "to inform". > they are using a deprecated function. > > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Siyuan Fu > Cc: Michael D Kinney > Cc: Jiewen Yao > Signed-off-by: Zhichao Gao > --- > CryptoPkg/Driver/Crypto.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c > index 35bf2d3d92..05ad4b5d55 100644 > --- a/CryptoPkg/Driver/Crypto.c > +++ b/CryptoPkg/Driver/Crypto.c > @@ -86,6 +86,24 @@ BaseCryptLibServciceNotEnabled ( > ASSERT_EFI_ERROR (EFI_UNSUPPORTED); > } > > +/** > + Internal worker function that prints a debug message and asserts if a call is > + made to a BaseCryptLib function that is deprecated and unsupported any longer. > + > + @param[in] FunctionName Null-terminated ASCII string that is the name of an > + EDK II Crypto service. > + > +**/ > +static > +VOID > +BaseCryptLibServciceDeprecated ( > + IN CONST CHAR8 *FunctionName Why extra space alignment? Otherwise: Reviewed-by: Philippe Mathieu-Daude > + ) > +{ > + DEBUG ((DEBUG_ERROR, "[%a] Function %a() is deprecated and unsupported any longer\n", gEfiCallerBaseName, FunctionName)); > + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); > +} > + > /** > Returns the version of the EDK II Crypto Protocol. > >