X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fhmactest.c;h=47d812da54be1b39d78ad0d68323e83b0813d91d;hp=d7e68b4cd710c5bfe89308ec57ff10bd4b85558c;hb=0e9725bcb90770d967351b977407b174bbd91869;hpb=623d1056de175ee5cd17839617fbfabac72cba91 diff --git a/test/hmactest.c b/test/hmactest.c index d7e68b4cd7..47d812da54 100644 --- a/test/hmactest.c +++ b/test/hmactest.c @@ -1,7 +1,7 @@ /* - * 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 + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -11,7 +11,7 @@ #include #include -#include "../e_os.h" +#include "internal/nelem.h" # include # include @@ -23,7 +23,6 @@ # include # endif -#include "test_main.h" #include "testutil.h" # ifndef OPENSSL_NO_MD5 @@ -106,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; @@ -126,7 +125,7 @@ err: return ret; } -static int test_hmac_run() +static int test_hmac_run(void) { char *p; HMAC_CTX *ctx = NULL; @@ -181,7 +180,7 @@ err: } -static int test_hmac_single_shot() +static int test_hmac_single_shot(void) { char *p; @@ -195,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; @@ -233,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; }