forked from wolfSSL/wolfssl
Merge pull request #8262 from embhorn/zd18968
Add sanity check for configuration method
This commit is contained in:
@ -599,6 +599,7 @@ WOLFSSL_CLANG_TIDY
|
|||||||
WOLFSSL_COMMERCIAL_LICENSE
|
WOLFSSL_COMMERCIAL_LICENSE
|
||||||
WOLFSSL_CONTIKI
|
WOLFSSL_CONTIKI
|
||||||
WOLFSSL_CRL_ALLOW_MISSING_CDP
|
WOLFSSL_CRL_ALLOW_MISSING_CDP
|
||||||
|
WOLFSSL_CUSTOM_CONFIG
|
||||||
WOLFSSL_DILITHIUM_ASSIGN_KEY
|
WOLFSSL_DILITHIUM_ASSIGN_KEY
|
||||||
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
|
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
|
||||||
WOLFSSL_DILITHIUM_NO_ASN1
|
WOLFSSL_DILITHIUM_NO_ASN1
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
|
||||||
#ifndef WOLFSSL_USER_SETTINGS
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
#include <wolfssl/options.h>
|
#include <wolfssl/options.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
/* Force enable the compatibility macros for this example */
|
/* Force enable the compatibility macros for this example */
|
||||||
#undef TEST_OPENSSL_COEXIST
|
#undef TEST_OPENSSL_COEXIST
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||||
|
@ -27,9 +27,12 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* mc api header */
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
|
/* mc api header */
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
|
|
||||||
/* sanity test against our default implementation, wolfssl headers */
|
/* sanity test against our default implementation, wolfssl headers */
|
||||||
|
@ -92,12 +92,6 @@
|
|||||||
* pair
|
* pair
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXTERNAL_OPTS_OPENVPN
|
|
||||||
#error EXTERNAL_OPTS_OPENVPN should not be defined\
|
|
||||||
when building wolfSSL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WOLFCRYPT_ONLY
|
#ifndef WOLFCRYPT_ONLY
|
||||||
|
|
||||||
#include <wolfssl/internal.h>
|
#include <wolfssl/internal.h>
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
#include <wolfssl/wolfcrypt/logging.h>
|
#include <wolfssl/wolfcrypt/logging.h>
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
#include <tests/unit.h>
|
#include <tests/unit.h>
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
|
||||||
#ifndef WOLFSSL_USER_SETTINGS
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
#include <wolfssl/options.h>
|
#include <wolfssl/options.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
|
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
|
||||||
#undef OPENSSL_COEXIST /* can't use this option with this example */
|
#undef OPENSSL_COEXIST /* can't use this option with this example */
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
*
|
*
|
||||||
* ./configure CFLAGS="-DFEATURE_FLAG_TO_DEFINE -UFEATURE_FLAG_TO_CLEAR [...]"
|
* ./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:
|
* For more information see:
|
||||||
*
|
*
|
||||||
* https://www.wolfssl.com/how-do-i-manage-the-build-configuration-of-wolfssl/
|
* https://www.wolfssl.com/how-do-i-manage-the-build-configuration-of-wolfssl/
|
||||||
@ -317,6 +319,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(BUILDING_WOLFSSL) && defined(WOLFSSL_USE_OPTIONS_H)) || \
|
||||||
|
(defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H) && \
|
||||||
|
!defined(EXTERNAL_OPTS_OPENVPN))
|
||||||
|
#error wolfssl/options.h included in compiled wolfssl library object.
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_USER_SETTINGS
|
#ifdef WOLFSSL_USER_SETTINGS
|
||||||
#include "user_settings.h"
|
#include "user_settings.h"
|
||||||
#elif defined(USE_HAL_DRIVER) && !defined(HAVE_CONFIG_H)
|
#elif defined(USE_HAL_DRIVER) && !defined(HAVE_CONFIG_H)
|
||||||
@ -326,6 +334,12 @@
|
|||||||
/* NOTE: cyassl_nucleus_defs.h is akin to user_settings.h */
|
/* NOTE: cyassl_nucleus_defs.h is akin to user_settings.h */
|
||||||
#include "nucleus.h"
|
#include "nucleus.h"
|
||||||
#include "os/networking/ssl/lite/cyassl_nucleus_defs.h"
|
#include "os/networking/ssl/lite/cyassl_nucleus_defs.h"
|
||||||
|
#elif !defined(BUILDING_WOLFSSL) && !defined(WOLFSSL_OPTIONS_H) && \
|
||||||
|
!defined(WOLFSSL_CUSTOM_CONFIG)
|
||||||
|
/* This warning 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. */
|
||||||
|
#warning "No configuration for wolfSSL detected, check header order"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/visibility.h>
|
#include <wolfssl/wolfcrypt/visibility.h>
|
||||||
|
@ -34,6 +34,10 @@ decouple library dependencies with standard string, memory and so on.
|
|||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||||
|
|
||||||
|
#if defined(EXTERNAL_OPTS_OPENVPN) && defined(BUILDING_WOLFSSL)
|
||||||
|
#error EXTERNAL_OPTS_OPENVPN should not be defined in compiled wolfssl library files.
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user