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>
This commit is contained in:
Shang Qingyu 2024-05-15 22:41:09 +08:00 committed by mergify[bot]
parent 7c584bb048
commit 3b36aa96de
2 changed files with 0 additions and 16 deletions

View File

@ -42,14 +42,6 @@ RandomSeed (
return FALSE;
}
//
// 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.

View File

@ -40,14 +40,6 @@ RandomSeed (
return FALSE;
}
//
// 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.