summaryrefslogtreecommitdiffstats
path: root/apps/openssl.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-09-10 09:50:30 +0000
committerBodo Möller <bodo@openssl.org>2001-09-10 09:50:30 +0000
commit384eff877c53a9e800452cb8bd56bd81327f52f3 (patch)
treeceb7ada9430fbb4dfd87d706843f4e1443353b10 /apps/openssl.c
parent68dbba98170c858dc9e2316ba95fdef82f33f843 (diff)
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).
Diffstat (limited to 'apps/openssl.c')
-rw-r--r--apps/openssl.c9
1 files changed, 7 insertions, 2 deletions
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);