#include <string.h>
#include <time.h>
-#include "openssl/e_os.h"
+#include "e_os.h"
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
+#include <openssl/engine.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#ifdef OPENSSL_SYS_WINDOWS
CRYPTO_set_locking_callback(lock_dbg_cb);
+ /* enable memory leak checking unless explicitly disabled */
+ if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))
+ {
+ CRYPTO_malloc_debug_init();
+ CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
+ }
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
RAND_seed(rnd_seed, sizeof rnd_seed);
#ifndef OPENSSL_NO_RSA
free_tmp_rsa();
#endif
+ ENGINE_cleanup();
ERR_free_strings();
ERR_remove_state(0);
EVP_cleanup();