Move curve448_test.c to be a full internal test
[openssl.git] / test / hmactest.c
index db1b7af001ba77f55246cdb3aca6b5bc64799031..ca775773a6e6b778a309270c6b206b9e5b56de85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-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
@@ -11,7 +11,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "../e_os.h"
+#include "internal/nelem.h"
 
 # include <openssl/hmac.h>
 # include <openssl/sha.h>
@@ -105,7 +105,7 @@ static int test_hmac_md5(int idx)
 }
 # endif
 
-static int test_hmac_bad()
+static int test_hmac_bad(void)
 {
     HMAC_CTX *ctx = NULL;
     int ret = 0;
@@ -125,7 +125,7 @@ err:
     return ret;
 }
 
-static int test_hmac_run()
+static int test_hmac_run(void)
 {
     char *p;
     HMAC_CTX *ctx = NULL;
@@ -180,7 +180,7 @@ err:
 }
 
 
-static int test_hmac_single_shot()
+static int test_hmac_single_shot(void)
 {
     char *p;
 
@@ -194,7 +194,7 @@ static int test_hmac_single_shot()
 }
 
 
-static int test_hmac_copy()
+static int test_hmac_copy(void)
 {
     char *p;
     HMAC_CTX *ctx = NULL, *ctx2 = NULL;
@@ -232,16 +232,17 @@ static char *pt(unsigned char *md, unsigned int len)
 
     for (i = 0; i < len; i++)
         sprintf(&(buf[i * 2]), "%02x", md[i]);
-    return (buf);
+    return buf;
 }
 # endif
 
-void register_tests(void)
+int setup_tests(void)
 {
     ADD_ALL_TESTS(test_hmac_md5, 4);
     ADD_TEST(test_hmac_single_shot);
     ADD_TEST(test_hmac_bad);
     ADD_TEST(test_hmac_run);
     ADD_TEST(test_hmac_copy);
+    return 1;
 }