From: Bodo Möller Date: Mon, 10 Sep 2001 15:00:30 +0000 (+0000) Subject: Get rid of hazardous EVP_DigestInit_dbg/EVP_DigestInit case X-Git-Tag: OpenSSL_0_9_6c~113^2~26 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=5e54b4f364f516a212f08e7ac4e611ea5f750aba Get rid of hazardous EVP_DigestInit_dbg/EVP_DigestInit case distinction (which does not work well because if CRYPTO_MDEBUG is defined at library compile time, it is not necessarily defined at application compile time; and memory debugging now can be reconfigured at run-time anyway). To get the intended semantics, we could just use the EVP_DigestInit_dbg unconditionally (which uses the caller's __FILE__ and __LINE__ for memory leak debugging), but this would make memory debugging inconsistent. Instead, callers can use CRYPTO_push_info() to track down memory leaks. --- diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index de642c64c8..70f3eb4f49 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -455,13 +455,7 @@ EVP_MD_CTX *EVP_MD_CTX_create(void); void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); #define EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) -#ifdef CRYPTO_MDEBUG -int EVP_DigestInit_dbg(EVP_MD_CTX *ctx, const EVP_MD *type, - const char *file,int line); -#define EVP_DigestInit(ctx,type) EVP_DigestInit_dbg(ctx,type,__FILE__,__LINE__) -#else int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); -#endif int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, unsigned int cnt); int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);