From nobody Tue Feb 10 15:46:10 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+66626+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+66626+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603766606; cv=none; d=zohomail.com; s=zohoarc; b=dvfvJK8mrvec439IUhdo+NbgEOIIi/knPqxC3mePVVV+R9ggE72NUMcRIYdiybBLbeYxcM1G55E9ct6d3BcGZUhINyCkWP8uoXY3UbQUSa1G1R7I9LXC+qtLbWgnji3OWFpu/sFt9xmlns7HN+H0Z2V8QBJqL+Ga2LqkIqqec4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603766606; 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=YH3fW9M2VWMKMKPbdDfAZFyxEMBg+bmczGptSN3L3mo=; b=mmU58gRaL73ueiOp05MHJhHoRKfAwk3BxHwrBa54cpf7wqcNwzD1zWGNt+hsyRr7kmVBAIF6ar18h6HxiDa3DfC5/4tMJQdVOOg82/lZLx/tnlkMyPizWv/3afAbuWAp4tciw9D7O3D3hyqQnwQXfpWO87tU6ou315MWbL/qTyE= 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+66626+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 1603766606082771.8664551890926; Mon, 26 Oct 2020 19:43:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id p1ZvYY1788612xgUVv4GRXOe; Mon, 26 Oct 2020 19:43:25 -0700 X-Received: from mga03.intel.com (mga03.intel.com []) by mx.groups.io with SMTP id smtpd.web11.8362.1603766593536324021 for ; Mon, 26 Oct 2020 19:43:23 -0700 IronPort-SDR: //rnMlaM91huwsucLT/AY1iJVO8N60ZNMvmR39tSm2j8TuhgV/QykhBB7ceMCG3QTYfkILTiPg /w8h+HFfVPxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="168117944" X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="168117944" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 19:43:23 -0700 IronPort-SDR: G030EPwFCjj+5YGlT8uWWDZXt8xRHA4nT8WJ2OYPamY4bdnRpNMj2a7nYxKSTlFvSCczhnfU5a QFJ0iyZH6+Bw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="350351920" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.153.118]) by fmsmga004.fm.intel.com with ESMTP; 26 Oct 2020 19:43:21 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [PATCH V2 7/7] CryptoPkg: Make the MD5 disable as default for security Date: Tue, 27 Oct 2020 10:43:00 +0800 Message-Id: <20201027024300.21100-8-zhichao.gao@intel.com> In-Reply-To: <20201027024300.21100-1-zhichao.gao@intel.com> References: <20201027024300.21100-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: etGXV7yKVUKxsFpwUxiYa6u6x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603766605; bh=HGbK6Qe3ApC2V4Bj5Dv2SbjETSekKnsHmVpZ6AyFWkI=; h=Cc:Date:From:Reply-To:Subject:To; b=Ooj1DBITYDuKLXb3ElQOn19u3i7Ee1VvdykUHG+0UDKY4d1AY2NF+a+75TjbNmMgt+G nv23v9cXVhNXX4vyHa6IOiwEImY+84qMwfk6kS/oJAJIlUOkNCiFJ5m57Lvc2ZolYiCw9 eRHry9WedG26jC5bSs6KTLEJSa5bGYJbTh0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3021 Make the deprecated MD5 disable as default setting for security. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Zhichao Gao Reviewed-by: Jiewen Yao --- CryptoPkg/Driver/Crypto.c | 4 ++-- CryptoPkg/Include/Library/BaseCryptLib.h | 2 +- CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c | 2 +- CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c index d9096ea603..26f280cd5d 100644 --- a/CryptoPkg/Driver/Crypto.c +++ b/CryptoPkg/Driver/Crypto.c @@ -243,7 +243,7 @@ DeprecatedCryptoServiceMd4HashAll ( return BaseCryptLibServiceDeprecated ("Md4HashAll"), FALSE; } =20 -#ifdef DISABLE_MD5_DEPRECATED_INTERFACES +#ifndef ENABLE_MD5_DEPRECATED_INTERFACES /** Retrieves the size, in bytes, of the context buffer required for MD5 has= h operations. =20 @@ -4494,7 +4494,7 @@ const EDKII_CRYPTO_PROTOCOL mEdkiiCrypto =3D { DeprecatedCryptoServiceMd4Update, DeprecatedCryptoServiceMd4Final, DeprecatedCryptoServiceMd4HashAll, -#ifdef DISABLE_MD5_DEPRECATED_INTERFACES +#ifndef ENABLE_MD5_DEPRECATED_INTERFACES /// Md5 - deprecated and unsupported DeprecatedCryptoServiceMd5GetContextSize, DeprecatedCryptoServiceMd5Init, diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/L= ibrary/BaseCryptLib.h index ae9bde9e37..496121e6a4 100644 --- a/CryptoPkg/Include/Library/BaseCryptLib.h +++ b/CryptoPkg/Include/Library/BaseCryptLib.h @@ -72,7 +72,7 @@ typedef enum { // One-Way Cryptographic Hash Primitives //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -#ifndef DISABLE_MD5_DEPRECATED_INTERFACES +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES /** Retrieves the size, in bytes, of the context buffer required for MD5 has= h operations. =20 diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c b/CryptoPkg/Lib= rary/BaseCryptLib/Hash/CryptMd5.c index b85e7f4d12..d670f17424 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c +++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c @@ -9,7 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "InternalCryptLib.h" #include =20 -#ifndef DISABLE_MD5_DEPRECATED_INTERFACES +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES /** Retrieves the size, in bytes, of the context buffer required for MD5 has= h operations. =20 diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c b/Crypt= oPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c index 3f14c6d262..8b43d1363c 100644 --- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c +++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c @@ -99,7 +99,7 @@ CryptoServiceNotAvailable ( // One-Way Cryptographic Hash Primitives //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -#ifndef DISABLE_MD5_DEPRECATED_INTERFACES +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES /** Retrieves the size, in bytes, of the context buffer required for MD5 has= h operations. =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 (#66626): https://edk2.groups.io/g/devel/message/66626 Mute This Topic: https://groups.io/mt/77831682/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-