forked from wolfSSL/wolfssl
Rename utils.c to utils.h
This better signals that this file is meant to be included directly in testing programs and also plays better with my IDE.
This commit is contained in:
@ -382,8 +382,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <wolfssl/certs_test.h>
|
#include <wolfssl/certs_test.h>
|
||||||
|
|
||||||
#define WOLFSSL_TEST_UTILS_INCLUDED
|
#include "tests/utils.h"
|
||||||
#include "tests/utils.c"
|
|
||||||
|
|
||||||
#ifndef WOLFSSL_HAVE_ECC_KEY_GET_PRIV
|
#ifndef WOLFSSL_HAVE_ECC_KEY_GET_PRIV
|
||||||
/* FIPS build has replaced ecc.h. */
|
/* FIPS build has replaced ecc.h. */
|
||||||
|
@ -70,5 +70,5 @@ EXTRA_DIST += tests/unit.h \
|
|||||||
tests/NCONF_test.cnf \
|
tests/NCONF_test.cnf \
|
||||||
tests/test-tls-downgrade.conf \
|
tests/test-tls-downgrade.conf \
|
||||||
tests/TXT_DB.txt \
|
tests/TXT_DB.txt \
|
||||||
tests/utils.c
|
tests/utils.h
|
||||||
DISTCLEANFILES+= tests/.libs/unit.test
|
DISTCLEANFILES+= tests/.libs/unit.test
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* utils.c
|
/* utils.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
@ -25,12 +25,6 @@
|
|||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <tests/unit.h>
|
#include <tests/unit.h>
|
||||||
|
|
||||||
#if !defined(WOLFSSL_TEST_UTILS_INCLUDED)
|
|
||||||
#ifndef WOLFSSL_IGNORE_FILE_WARN
|
|
||||||
#warning utils.c does not need to be compiled separately
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef NO_FILESYSTEM
|
#ifndef NO_FILESYSTEM
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -365,5 +359,3 @@ void join_thread(THREAD_TYPE thread)
|
|||||||
THREAD_CHECK_RET(wolfSSL_JoinThread(thread));
|
THREAD_CHECK_RET(wolfSSL_JoinThread(thread));
|
||||||
}
|
}
|
||||||
#endif /* SINGLE_THREADED */
|
#endif /* SINGLE_THREADED */
|
||||||
|
|
||||||
#endif /* WOLFSSL_TEST_UTILS_INCLUDED */
|
|
@ -45,8 +45,7 @@
|
|||||||
#include <examples/server/server.h>
|
#include <examples/server/server.h>
|
||||||
#include <examples/client/client.h>
|
#include <examples/client/client.h>
|
||||||
|
|
||||||
#define WOLFSSL_TEST_UTILS_INCLUDED
|
#include "tests/utils.h"
|
||||||
#include "tests/utils.c"
|
|
||||||
|
|
||||||
#ifndef NO_SHA256
|
#ifndef NO_SHA256
|
||||||
void file_test(const char* file, byte* check);
|
void file_test(const char* file, byte* check);
|
||||||
|
Reference in New Issue
Block a user