From f9368474dd80b630adf745314b0336c16a35b0ad Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Mon, 14 Jul 2014 09:03:36 -0400 Subject: Update openssl to 0.9.8za Also update to Tiano Cryptlib r15638 --- Cryptlib/Rand/CryptRand.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Cryptlib/Rand/CryptRand.c') diff --git a/Cryptlib/Rand/CryptRand.c b/Cryptlib/Rand/CryptRand.c index dc3ab992..895ce83f 100644 --- a/Cryptlib/Rand/CryptRand.c +++ b/Cryptlib/Rand/CryptRand.c @@ -1,7 +1,7 @@ /** @file Pseudorandom Number Generator Wrapper Implementation over OpenSSL. -Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "InternalCryptLib.h" #include +#include // // Default seed for UEFI Crypto Library @@ -47,6 +48,14 @@ 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. -- cgit v1.2.3