From 384eff877c53a9e800452cb8bd56bd81327f52f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Mon, 10 Sep 2001 09:50:30 +0000 Subject: Fix apps/openssl.c and ssl/ssltest.c so that they use CRYPTO_set_mem_debug_options() instead of CRYPTO_dbg_set_options(), which is the default implementation of the former and should usually not be directly used by applications (at least if we assume that the options accepted by the default implementation will also be meaningful to any other implementations). Also fix apps/openssl.c and ssl/ssltest such that environment variable setting 'OPENSSL_DEBUG_MEMORY=off' actively disables the compiled-in library defaults (i.e. such that CRYPTO_MDEBUG is ignored in this case). --- apps/openssl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/openssl.c') diff --git a/apps/openssl.c b/apps/openssl.c index f8d4ac69d6..9a5e37eac7 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -227,12 +227,17 @@ int main(int Argc, char *Argv[]) arg.data=NULL; arg.count=0; - if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) + if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */ { if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))) { CRYPTO_malloc_debug_init(); - CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); + CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + } + else + { + /* OPENSSL_DEBUG_MEMORY=off */ + CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); } } CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); -- cgit v1.2.3