summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library/BaseCryptLibOnProtocolPpi
diff options
context:
space:
mode:
authorZhichao Gao <zhichao.gao@intel.com>2020-06-16 13:01:44 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-06-29 05:25:55 +0000
commit0f01cec52f4794777feb067e4fa0bfcedfdc124e (patch)
tree590aa76f532074101db8c91aaa43c15d4a36f735 /CryptoPkg/Library/BaseCryptLibOnProtocolPpi
parentacfd55579542de64418cd4fb1c5560524a79d61f (diff)
downloadedk2-0f01cec52f4794777feb067e4fa0bfcedfdc124e.tar.gz
edk2-0f01cec52f4794777feb067e4fa0bfcedfdc124e.tar.bz2
edk2-0f01cec52f4794777feb067e4fa0bfcedfdc124e.zip
CryptoPkg/BaseCryptLib: Add MARCO to disable the deprecated SHA1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1682 SHA1 is deprecated but it is required for compatible issue. So add a MARCO for the platform to disable the usage of SHA1 for security. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLibOnProtocolPpi')
-rw-r--r--CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
index 8897fd25e6..3f14c6d262 100644
--- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
+++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
@@ -259,6 +259,7 @@ Md5HashAll (
}
#endif
+#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
/**
Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.
@@ -416,6 +417,7 @@ Sha1HashAll (
{
CALL_CRYPTO_SERVICE (Sha1HashAll, (Data, DataSize, HashValue), FALSE);
}
+#endif
/**
Retrieves the size, in bytes, of the context buffer required for SHA-256 hash operations.