diff options
author | Rich Salz <rsalz@akamai.com> | 2019-12-04 19:15:08 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-12-14 20:57:35 +0100 |
commit | 742ccab318b13a8779d9f9164d479b4a428a6da8 (patch) | |
tree | 47e5cb0544e2f74a4fbefcdd30cb65d8078f214f /apps/openssl.c | |
parent | Parse large GOST ClientKeyExchange messages (diff) | |
download | openssl-742ccab318b13a8779d9f9164d479b4a428a6da8.tar.xz openssl-742ccab318b13a8779d9f9164d479b4a428a6da8.zip |
Deprecate most of debug-memory
Fixes #8322
The leak-checking (and backtrace option, on some platforms) provided
by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered;
only the "make malloc fail" capability remains. OpenSSL recommends using
the compiler's leak-detection instead.
The OPENSSL_DEBUG_MEMORY environment variable is no longer used.
CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(),
CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code.
CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the
above are now deprecated.
Merge (now really small) mem_dbg.c into mem.c
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10572)
Diffstat (limited to 'apps/openssl.c')
-rw-r--r-- | apps/openssl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 769555e5e1..d60267d742 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -258,11 +258,6 @@ int main(int argc, char *argv[]) setup_trace(getenv("OPENSSL_TRACE")); #endif - p = getenv("OPENSSL_DEBUG_MEMORY"); - if (p != NULL && strcmp(p, "on") == 0) - CRYPTO_set_mem_debug(1); - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); - if (getenv("OPENSSL_FIPS")) { BIO_printf(bio_err, "FIPS mode not supported.\n"); return 1; @@ -379,10 +374,6 @@ int main(int argc, char *argv[]) BIO_free(bio_in); BIO_free_all(bio_out); apps_shutdown(); -#ifndef OPENSSL_NO_CRYPTO_MDEBUG - if (CRYPTO_mem_leaks(bio_err) <= 0) - ret = 1; -#endif BIO_free(bio_err); EXIT(ret); } |