diff options
author | Shang Qingyu <qingyu.shang@intel.com> | 2024-05-15 22:41:09 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-05-31 15:54:23 +0000 |
commit | 3b36aa96de1d5f7a4660bec5c0cbad2616183dd6 (patch) | |
tree | 0426cf851be055f5db1c59d79cf91a9cd5be11b3 /CryptoPkg | |
parent | 7c584bb04874bb5bad16fcf3996f5a893cc81a1c (diff) | |
download | edk2-3b36aa96de1d5f7a4660bec5c0cbad2616183dd6.tar.gz edk2-3b36aa96de1d5f7a4660bec5c0cbad2616183dd6.tar.bz2 edk2-3b36aa96de1d5f7a4660bec5c0cbad2616183dd6.zip |
CryptoPkg: Remove deprecated code related to SHA-1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4698
The default drbg type of randlib has been switched to aes_256_ctr in
openssl1.1.1, so sha1 is not really used in RandomSeed(). Remove related code
which do SHA-1 support checking in CryptRand.c and CryptRandTsc.c to avoid
potential compatibility errors.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Shang Qingyu <qingyu.shang@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c | 8 | ||||
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c | 8 |
2 files changed, 0 insertions, 16 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c b/CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c index 9e2fcefe08..51c7435898 100644 --- a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c +++ b/CryptoPkg/Library/BaseCryptLib/Rand/CryptRand.c @@ -43,14 +43,6 @@ RandomSeed ( }
//
- // The software PRNG implementation built in OpenSSL depends on message digest algorithm.
- // Make sure SHA-1 digest algorithm is available here.
- //
- if (EVP_add_digest (EVP_sha1 ()) == 0) {
- return FALSE;
- }
-
- //
// Seed the pseudorandom number generator with user-supplied value.
// NOTE: A cryptographic PRNG must be seeded with unpredictable data.
//
diff --git a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c b/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c index 30454bf10f..b94c16de56 100644 --- a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c +++ b/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c @@ -41,14 +41,6 @@ RandomSeed ( }
//
- // The software PRNG implementation built in OpenSSL depends on message digest algorithm.
- // Make sure SHA-1 digest algorithm is available here.
- //
- if (EVP_add_digest (EVP_sha1 ()) == 0) {
- return FALSE;
- }
-
- //
// Seed the pseudorandom number generator with user-supplied value.
// NOTE: A cryptographic PRNG must be seeded with unpredictable data.
//
|