Refactoring BIO: add a simple networking test of s_client and s_server
[openssl.git] / test / ecdhtest.c
index 0145b36c7db97ac32eacb264dce28123551c2bf5..636be3ee9d371e4637477b5967a42a0ca5d637f3 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/ecdh/ecdhtest.c */
 /* ====================================================================
  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
  *
@@ -90,7 +89,6 @@ int main(int argc, char *argv[])
 }
 #else
 # include <openssl/ec.h>
-# include <openssl/ecdh.h>
 
 static const char rnd_seed[] =
     "string to make the random number generator think it has entropy";
@@ -453,14 +451,9 @@ int main(int argc, char *argv[])
     int ret = 1;
     BIO *out;
 
-    CRYPTO_malloc_debug_init();
-    CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
+    CRYPTO_set_mem_debug(1);
     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
-# ifdef OPENSSL_SYS_WIN32
-    CRYPTO_malloc_init();
-# endif
-
     RAND_seed(rnd_seed, sizeof rnd_seed);
 
     out = BIO_new(BIO_s_file());
@@ -522,7 +515,9 @@ int main(int argc, char *argv[])
     BIO_free(out);
     CRYPTO_cleanup_all_ex_data();
     ERR_remove_thread_state(NULL);
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG
     CRYPTO_mem_leaks_fp(stderr);
+#endif
     EXIT(ret);
 }
 #endif