move !defined(EXTERNAL_OPTS_OPENVPN) assert from src/internal.c to wolfssl/wolfcrypt/types.h with refinements; refine logic+message of assert in wolfssl/wolfcrypt/settings.h re "wolfssl/options.h included in compiled wolfssl library object..".

This commit is contained in:
Daniel Pouzzner
2024-12-09 15:02:41 -06:00
parent fcce09a4d3
commit e248d8499a
3 changed files with 8 additions and 8 deletions

View File

@ -92,12 +92,6 @@
* pair
*/
#ifdef EXTERNAL_OPTS_OPENVPN
#error EXTERNAL_OPTS_OPENVPN should not be defined\
when building wolfSSL
#endif
#ifndef WOLFCRYPT_ONLY
#include <wolfssl/internal.h>

View File

@ -319,8 +319,10 @@
#endif
#endif
#if defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H)
#error wolfssl/options.h included in build of library object.
#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

View File

@ -34,6 +34,10 @@ decouple library dependencies with standard string, memory and so on.
#include <wolfssl/wolfcrypt/settings.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__
#include <AvailabilityMacros.h>
#endif