Add memory leak detection to d2i_test
[oweals/openssl.git] / test / sslapitest.c
index b08eb8c78f0bca0eab965dabae5c9d9e124a7e5a..495bf26ed29f3249baee86fd933ba62b3d394910 100644 (file)
 static char *cert = NULL;
 static char *privkey = NULL;
 
+#ifndef OPENSSL_NO_OCSP
 static const unsigned char orespder[] = "Dummy OCSP Response";
 static int ocsp_server_called = 0;
 static int ocsp_client_called = 0;
 
 static int cdummyarg = 1;
 static X509 *ocspcert = NULL;
+#endif
 
 #define NUM_EXTRA_CERTS 40
 
@@ -108,12 +110,15 @@ static int test_large_message_tls(void)
     return execute_test_large_message(TLS_server_method(), TLS_client_method());
 }
 
+#ifndef OPENSSL_NO_DTLS
 static int test_large_message_dtls(void)
 {
     return execute_test_large_message(DTLS_server_method(),
                                       DTLS_client_method());
 }
+#endif
 
+#ifndef OPENSSL_NO_OCSP
 static int ocsp_server_cb(SSL *s, void *arg)
 {
     int *argi = (int *)arg;
@@ -347,6 +352,7 @@ static int test_tlsext_status_type(void)
 
     return testresult;
 }
+#endif  /* ndef OPENSSL_NO_OCSP */
 
 typedef struct ssl_session_test_fixture {
     const char *test_case_name;
@@ -861,8 +867,12 @@ int main(int argc, char *argv[])
     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
     ADD_TEST(test_large_message_tls);
+#ifndef OPENSSL_NO_DTLS
     ADD_TEST(test_large_message_dtls);
+#endif
+#ifndef OPENSSL_NO_OCSP
     ADD_TEST(test_tlsext_status_type);
+#endif
     ADD_TEST(test_session_with_only_int_cache);
     ADD_TEST(test_session_with_only_ext_cache);
     ADD_TEST(test_session_with_both_cache);