Merge pull request #8664 from douzzer/20250411-more-libwolfssl_sources_h-2

20250411-more-libwolfssl_sources_h-2
pull/8669/head
David Garske 2025-04-14 07:38:02 -07:00 committed by GitHub
commit b77bd78b5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 22 additions and 58 deletions

View File

@ -23,6 +23,8 @@
#if !defined(NO_AES) && defined(WOLFSSL_KCAPI_AES)
#include <errno.h>
#if defined(HAVE_FIPS) && \
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)

View File

@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
/*
DESCRIPTION
@ -27,15 +29,6 @@ implementations for Post-Quantum cryptography algorithms.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
#if defined(HAVE_LIBOQS)

View File

@ -19,20 +19,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#if !defined(NO_AES)
#include <wolfssl/wolfcrypt/aes.h>
#include <wolfssl/wolfcrypt/logging.h>
#ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>
#else

View File

@ -19,24 +19,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
/* The paper NEON crypto by Daniel J. Bernstein and Peter Schwabe was used to
* optimize for ARM:
* https://cryptojedi.org/papers/veccrypto-20120320.pdf
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>
#ifdef WOLFSSL_RISCV_ASM
#ifdef HAVE_CHACHA
#include <wolfssl/wolfcrypt/chacha.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/cpuid.h>
#ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>

View File

@ -19,25 +19,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
/*
* Based off the public domain implementations by Andrew Moon
* Based on the public domain implementations by Andrew Moon
* and Daniel J. Bernstein
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>
#ifdef WOLFSSL_RISCV_ASM
#ifdef HAVE_POLY1305
#include <wolfssl/wolfcrypt/poly1305.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/cpuid.h>
#ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>

View File

@ -19,12 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
#ifdef WOLFSSL_RISCV_ASM
#if !defined(NO_SHA256) || defined(WOLFSSL_SHA224)
@ -47,8 +42,6 @@
return 0;
}
#endif
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>

View File

@ -19,12 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>
#ifdef WOLFSSL_RISCV_ASM

View File

@ -19,12 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
#ifdef WOLFSSL_RISCV_ASM
#if !defined(NO_SHA512) || defined(WOLFSSL_SHA384)
@ -47,8 +42,6 @@
return 0;
}
#endif
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>

View File

@ -6363,7 +6363,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hash_test(void)
}
if (ret != 0) {
ERROR_OUT(WC_TEST_RET_ENC_I(BAD_FUNC_ARG), out);
ERROR_OUT(WC_TEST_RET_ENC_EC(BAD_FUNC_ARG), out);
}
#endif
ret = wc_HashInit(hash, typesGood[i]);

View File

@ -29,7 +29,8 @@
#define LIBWOLFSSL_SOURCES_H
#if defined(TEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE) && \
defined(WOLF_CRYPT_SETTINGS_H)
defined(WOLF_CRYPT_SETTINGS_H) && \
!defined(LIBWOLFSSL_SOURCES_ASM_H)
#error settings.h included before libwolfssl_sources.h.
#endif
@ -37,8 +38,9 @@
#define BUILDING_WOLFSSL
#endif
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H) && !defined(WC_CONFIG_H_INCLUDED)
#include <config.h>
#define WC_CONFIG_H_INCLUDED
#endif
#include <wolfssl/wolfcrypt/types.h>

View File

@ -29,7 +29,8 @@
#define LIBWOLFSSL_SOURCES_ASM_H
#if defined(TEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE) && \
defined(WOLF_CRYPT_SETTINGS_H)
defined(WOLF_CRYPT_SETTINGS_H) && \
!defined(LIBWOLFSSL_SOURCES_H)
#error settings.h included before libwolfssl_sources_asm.h.
#endif
@ -37,8 +38,9 @@
#define BUILDING_WOLFSSL
#endif
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H) && !defined(WC_CONFIG_H_INCLUDED)
#include <config.h>
#define WC_CONFIG_H_INCLUDED
#endif
#include <wolfssl/wolfcrypt/settings.h>