Skip to content

Commit

Permalink
move !defined(EXTERNAL_OPTS_OPENVPN) assert from src/internal.c to wo…
Browse files Browse the repository at this point in the history
…lfssl/wolfcrypt/types.h; refine logic+message of assert in wolfssl/wolfcrypt/settings.h re "wolfssl/options.h included in compiled wolfssl library object..".
  • Loading branch information
douzzer committed Dec 9, 2024
1 parent fcce09a commit 6f0ea40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 4 additions & 2 deletions wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions wolfssl/wolfcrypt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

#ifdef EXTERNAL_OPTS_OPENVPN
#error EXTERNAL_OPTS_OPENVPN should not be defined in compiled files.
#endif

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#endif
Expand Down

0 comments on commit 6f0ea40

Please sign in to comment.