Add sanity check for configuration method

This commit is contained in:
Eric Blankenhorn
2024-12-06 16:35:21 -06:00
parent f764dbeee1
commit 3d0cc250b9
6 changed files with 17 additions and 2 deletions

View File

@@ -599,6 +599,7 @@ WOLFSSL_CLANG_TIDY
WOLFSSL_COMMERCIAL_LICENSE
WOLFSSL_CONTIKI
WOLFSSL_CRL_ALLOW_MISSING_CDP
WOLFSSL_CUSTOM_CONFIG
WOLFSSL_DILITHIUM_ASSIGN_KEY
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
WOLFSSL_DILITHIUM_NO_ASN1

View File

@@ -24,10 +24,10 @@
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
/* Force enable the compatibility macros for this example */
#undef TEST_OPENSSL_COEXIST

View File

@@ -24,6 +24,9 @@
#include <config.h>
#endif
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/logging.h>

View File

@@ -24,6 +24,9 @@
#include <config.h>
#endif
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <tests/unit.h>

View File

@@ -24,10 +24,10 @@
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#undef OPENSSL_COEXIST /* can't use this option with this example */

View File

@@ -28,6 +28,8 @@
*
* ./configure CFLAGS="-DFEATURE_FLAG_TO_DEFINE -UFEATURE_FLAG_TO_CLEAR [...]"
*
* To build using a custom configuration method, define WOLFSSL_CUSTOM_CONFIG
*
* For more information see:
*
* https://www.wolfssl.com/how-do-i-manage-the-build-configuration-of-wolfssl/
@@ -326,6 +328,12 @@
/* NOTE: cyassl_nucleus_defs.h is akin to user_settings.h */
#include "nucleus.h"
#include "os/networking/ssl/lite/cyassl_nucleus_defs.h"
#elif !defined(BUILDING_WOLFSSL) && !defined(WOLFSSL_OPTIONS_H) && \
!defined(WOLFSSL_CUSTOM_CONFIG)
/* This error indicates that the settings header may not be included before
* other wolfSSL headers. If you are using a custom configuration method,
* define WOLFSSL_CUSTOM_CONFIG to override this error. */
#error "No configuration for wolfSSL detected, check header order"
#endif
#include <wolfssl/wolfcrypt/visibility.h>