X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Fclienthellotest.c;h=877566131a7db936f7d3cba8ddcb8065c83fee5e;hp=318d6e84f84c1f58b0ef456548f9b6dec538e346;hb=d6b55faca3bc085ed487c1a69aa976f81cf1c7fa;hpb=55500ea7c46c27a150a46832e1260891aaad8e52 diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 318d6e84f8..877566131a 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -55,6 +55,7 @@ #include +#include #include #include #include @@ -102,13 +103,9 @@ int main(int argc, char *argv[]) int testresult = 0; int currtest = 0; - SSL_library_init(); - SSL_load_error_strings(); - err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT); - CRYPTO_malloc_debug_init(); - CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + CRYPTO_set_mem_debug(1); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); /* @@ -118,7 +115,11 @@ int main(int argc, char *argv[]) for (; currtest < TOTAL_NUM_TESTS; currtest++) { testresult = 0; if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) { +#ifndef OPENSSL_NO_TLS1_2 ctx = SSL_CTX_new(TLSv1_2_method()); +#else + continue; +#endif } else { ctx = SSL_CTX_new(TLS_method()); } @@ -208,11 +209,10 @@ int main(int argc, char *argv[]) } } - ERR_free_strings(); - ERR_remove_thread_state(NULL); - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - CRYPTO_mem_leaks(err); +#ifndef OPENSSL_NO_CRYPTO_MDEBUG + if (CRYPTO_mem_leaks(err) <= 0) + testresult = 0; +#endif BIO_free(err); return testresult?0:1;