Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
[openssl.git] / test / cipherbytes_test.c
index bc3051ed34b5c86274373a19043b54574a1f2378..370d033a4da75636f7abdacc63d7695cccc80805 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL licenses, (the "License");
+ * Licensed under the Apache License 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * https://www.openssl.org/source/license.html
@@ -18,7 +18,7 @@
 #include <openssl/ssl3.h>
 #include <openssl/tls1.h>
 
-#include "e_os.h"
+#include "internal/nelem.h"
 #include "testutil.h"
 
 static SSL_CTX *ctx;
@@ -129,22 +129,21 @@ err:
     return ret;
 }
 
-int test_main(int argc, char **argv)
+int setup_tests(void)
 {
-    int ret;
-
     if (!TEST_ptr(ctx = SSL_CTX_new(TLS_server_method()))
             || !TEST_ptr(s = SSL_new(ctx)))
-        return EXIT_FAILURE;
+        return 0;
 
     ADD_TEST(test_empty);
     ADD_TEST(test_unsupported);
     ADD_TEST(test_v2);
     ADD_TEST(test_v3);
-    ret = run_tests(argv[0]);
+    return 1;
+}
 
+void cleanup_tests(void)
+{
     SSL_free(s);
     SSL_CTX_free(ctx);
-
-    return ret;
 }