Add random serial# support.
[openssl.git] / test / ssl_test_ctx_test.c
index 193a3937d6f52497c0184f9f7b7932d373167fe2..2376ce178f896d342b3a87f589166c84c3dbea13 100644 (file)
@@ -15,7 +15,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "e_os.h"
+#include <internal/nelem.h>
 #include "ssl_test_ctx.h"
 #include "testutil.h"
 #include <openssl/e_os2.h>
@@ -133,23 +133,26 @@ static void tear_down(SSL_TEST_CTX_TEST_FIXTURE *fixture)
 }
 
 #define SETUP_SSL_TEST_CTX_TEST_FIXTURE() \
-    SETUP_TEST_FIXTURE(SSL_TEST_CTX_TEST_FIXTURE *, set_up); \
-    if (fixture == NULL) \
-        return 0
+    SETUP_TEST_FIXTURE(SSL_TEST_CTX_TEST_FIXTURE, set_up);
 #define EXECUTE_SSL_TEST_CTX_TEST() \
     EXECUTE_TEST(execute_test, tear_down)
 
-static int test_empty_configuration()
+static int test_empty_configuration(void)
 {
     SETUP_SSL_TEST_CTX_TEST_FIXTURE();
+    if (fixture == NULL)
+        return 0;
     fixture->test_section = "ssltest_default";
     fixture->expected_ctx->expected_result = SSL_TEST_SUCCESS;
     EXECUTE_SSL_TEST_CTX_TEST();
+    return result;
 }
 
-static int test_good_configuration()
+static int test_good_configuration(void)
 {
     SETUP_SSL_TEST_CTX_TEST_FIXTURE();
+    if (fixture == NULL)
+        return 0;
     fixture->test_section = "ssltest_good";
     fixture->expected_ctx->method = SSL_TEST_METHOD_DTLS;
     fixture->expected_ctx->handshake_mode = SSL_TEST_HANDSHAKE_RESUME;
@@ -186,6 +189,7 @@ static int test_good_configuration()
         SSL_TEST_CT_VALIDATION_STRICT;
 
     EXECUTE_SSL_TEST_CTX_TEST();
+    return result;
 
 err:
     tear_down(fixture);