Globally remap & refactor conflicting symbols to allow -DOPENSSL_EXTRA -DOPENSSL_COEXIST, or equivalently, --enable-opensslextra --enable-opensslcoexist.

No functional changes.

Several compat symbols that were formerly enums are now macros.

All library source is refactored to use only native symbols in all code gated in with --enable-all-crypto --enable-opensslextra.

wolfcrypt/test/test.c is similarly refactored to use only native symbols.

examples/ and tests/ are unmodified except for header setup to disable OPENSSL_COEXIST and TEST_OPENSSL_COEXIST.
This commit is contained in:
Daniel Pouzzner
2024-10-30 19:28:39 -05:00
parent 89d2964320
commit cf95fdc071
69 changed files with 4299 additions and 3474 deletions

View File

@@ -32,7 +32,6 @@ Or
bench_tls(args);
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -40,6 +39,12 @@ Or
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#ifdef OPENSSL_EXTRA
#undef OPENSSL_COEXIST /* can't use this option with this example */
#endif
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/wc_port.h>
#include <wolfssl/ssl.h>

View File

@@ -32,6 +32,11 @@
#endif
#include <wolfssl/wolfcrypt/settings.h>
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#ifdef OPENSSL_EXTRA
#undef OPENSSL_COEXIST /* can't use this option with this example */
#endif
#include <wolfssl/ssl.h>
#ifdef WOLFSSL_WOLFSENTRY_HOOKS

View File

@@ -25,6 +25,15 @@
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#ifdef OPENSSL_EXTRA
#undef OPENSSL_COEXIST /* can't use this option with this example */
#endif
/* let's use cyassl layer AND cyassl openssl layer */
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#include <wolfssl/ssl.h>

View File

@@ -24,6 +24,16 @@
#include <config.h>
#endif
#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 */
#ifdef OPENSSL_EXTRA
#undef OPENSSL_COEXIST /* can't use this option with this example */
#endif
#include <wolfssl/ssl.h> /* name change portability layer */
#include <wolfssl/wolfcrypt/settings.h>
#ifdef HAVE_ECC

View File

@@ -33,6 +33,10 @@
#include <wolfssl/wolfcrypt/settings.h>
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
#ifdef OPENSSL_EXTRA
#undef OPENSSL_COEXIST /* can't use this option with this example */
#endif
#include <wolfssl/ssl.h> /* name change portability layer */
#ifdef HAVE_ECC