mirror of
https://github.com/openssl/openssl.git
synced 2025-03-01 19:28:10 +08:00
The various hash #includes in rand_lcl.h *are* needed despite
<openssl/evp.h> is now used (MD_DIGEST_LENGTH definitions!). No need to include such headers directly in md_rand.c.
This commit is contained in:
parent
cb42ce0b67
commit
ea7150b070
crypto/rand
@ -126,8 +126,6 @@
|
|||||||
|
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/sha.h>
|
|
||||||
|
|
||||||
#ifdef BN_DEBUG
|
#ifdef BN_DEBUG
|
||||||
# define PREDICT
|
# define PREDICT
|
||||||
|
@ -133,18 +133,22 @@
|
|||||||
#define MD_Update(a,b,c) EVP_DigestUpdate(a,b,c)
|
#define MD_Update(a,b,c) EVP_DigestUpdate(a,b,c)
|
||||||
#define MD_Final(a,b) EVP_DigestFinal(a,b,NULL)
|
#define MD_Final(a,b) EVP_DigestFinal(a,b,NULL)
|
||||||
#if defined(USE_MD5_RAND)
|
#if defined(USE_MD5_RAND)
|
||||||
|
#include <openssl/md5.h>
|
||||||
#define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH
|
#define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH
|
||||||
#define MD_Init(a) EVP_DigestInit(a,EVP_md5())
|
#define MD_Init(a) EVP_DigestInit(a,EVP_md5())
|
||||||
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md5())
|
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md5())
|
||||||
#elif defined(USE_SHA1_RAND)
|
#elif defined(USE_SHA1_RAND)
|
||||||
|
#include <openssl/sha.h>
|
||||||
#define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH
|
#define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH
|
||||||
#define MD_Init(a) EVP_DigestInit(a,EVP_sha1())
|
#define MD_Init(a) EVP_DigestInit(a,EVP_sha1())
|
||||||
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_sha1())
|
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_sha1())
|
||||||
#elif defined(USE_MDC2_RAND)
|
#elif defined(USE_MDC2_RAND)
|
||||||
|
#include <openssl/mdc2.h>
|
||||||
#define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH
|
#define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH
|
||||||
#define MD_Init(a) EVP_DigestInit(a,EVP_mdc2())
|
#define MD_Init(a) EVP_DigestInit(a,EVP_mdc2())
|
||||||
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_mdc2())
|
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_mdc2())
|
||||||
#elif defined(USE_MD2_RAND)
|
#elif defined(USE_MD2_RAND)
|
||||||
|
#include <openssl/md2.h>
|
||||||
#define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH
|
#define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH
|
||||||
#define MD_Init(a) EVP_DigestInit(a,EVP_md2())
|
#define MD_Init(a) EVP_DigestInit(a,EVP_md2())
|
||||||
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2())
|
#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2())
|
||||||
|
Loading…
Reference in New Issue
Block a user