diff options
author | Bodo Möller <bodo@openssl.org> | 2001-09-10 11:50:30 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2001-09-10 11:50:30 +0200 |
commit | 384eff877c53a9e800452cb8bd56bd81327f52f3 (patch) | |
tree | ceb7ada9430fbb4dfd87d706843f4e1443353b10 /apps | |
parent | Replace old (and invalid) copyright notice. (diff) | |
download | openssl-384eff877c53a9e800452cb8bd56bd81327f52f3.tar.xz openssl-384eff877c53a9e800452cb8bd56bd81327f52f3.zip |
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')
-rw-r--r-- | apps/openssl.c | 9 |
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); |