/*
- * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <openssl/e_os2.h>
-#ifdef OPENSSL_NO_ENGINE
-int main(int argc, char *argv[])
-{
- printf("No ENGINE support\n");
- return (0);
-}
-#else
+# include "testutil.h"
+
+#ifndef OPENSSL_NO_ENGINE
# include <openssl/buffer.h>
# include <openssl/crypto.h>
# include <openssl/engine.h>
# include <openssl/err.h>
-# include "testutil.h"
-# include "test_main.h"
static void display_engine_list(void)
{
}
for (loop = 0; loop < NUMTOADD; loop++) {
if (!TEST_true(ENGINE_add(block[loop]))) {
- printf("Adding stopped at %d, (%s,%s)",
- loop, ENGINE_get_id(block[loop]),
- ENGINE_get_name(block[loop]));
+ test_note("Adding stopped at %d, (%s,%s)",
+ loop, ENGINE_get_id(block[loop]),
+ ENGINE_get_name(block[loop]));
goto cleanup_loop;
}
}
ENGINE_free(block[loop]);
return to_return;
}
+#endif
-void register_tests(void)
+int setup_tests(void)
{
+#ifdef OPENSSL_NO_ENGINE
+ TEST_note("No ENGINE support");
+#else
ADD_TEST(test_engines);
-}
#endif
+ return 1;
+}