The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
Let's say, for whatever reason, you'd like to used the same wolfssl options.h created by a Linux ./configure command, also for a Windows build of a DLL.
Without the capability added in this PR, one would need to know both the Linux ./configure command-line options, as well as the respective settings to exactly match in the Windows user_settings.h.
Alternatively, the option of course exists for use a user_settings.h in the Linux environment. This PR is only for using config.h for a Windows build.
We'll assume that the respective ./configure options in WSL are provided to give compatibility in both Windows and Linux.
Otherwise, for an example here, if in WSL on 64bit Windows 11 using the --enable-all:
./autogen.sh
./configure --enable-all
Add this to the respective generated options.h to also use in Windows to address incompatibilities observed for this PR.
/* Disable some items from Ubuntu (WSL) ./configure --enable-all that were
* observed to cause problems in Windows when sharing the same options.h */
#undef HAVE___UINT128_T
#undef WOLFSSL_QUIC
#undef HAVE_HPKE
#undef HAVE_ECH
#undef WOLFSSL_SP_X86_64_ASM
#undef WOLFSSL_SP_X86_64
#undef WOLFSSL_SP_ASM
#undef HAVE_INTEL_AVX2
#undef HAVE_INTEL_AVX1
#undef USE_INTEL_SPEEDUP
#define WOLFSSL_UINT128_T_DEFINED
#define WOLFSSL_NO_ATOMICS
#ifndef INT32_MAX
/* Maximum value for a 32-bit signed integer, used in evp.c */
#define INT32_MAX 2147483647
#endif
/* WOLFSSL_DLL is typically defined in the project build config.
* undef here to avoid "Duplicate definition" warnings. */
#undef WOLFSSL_DLL
Fixes zd# n/a
Testing
Tested on Windows 11, Visual Studio 17.11.5, Platform Toolset v143
Description
Building on https://github.com/wolfSSL/wolfssl/pull/8090 and https://github.com/wolfSSL/wolfssl/pull/8104, this PR adds a new
DLL Release (config.h)
Build Configuration to the Visual Studio 2022 Project file that instead of using theuser_settings.h
from the IDE/WIN directory, uses the generated wolfsslconfig.h
file.Let's say, for whatever reason, you'd like to used the same wolfssl
options.h
created by a Linux./configure
command, also for a Windows build of a DLL.One place that this might be useful is a NodeJS/NPM module such as my wolfcrypt_nodejs branch used in both Windows and Linux. See also https://github.com/wolfSSL/wolfcrypt_nodejs/pull/8
Without the capability added in this PR, one would need to know both the Linux
./configure
command-line options, as well as the respective settings to exactly match in the Windowsuser_settings.h
.Alternatively, the option of course exists for use a
user_settings.h
in the Linux environment. This PR is only for usingconfig.h
for a Windows build.We'll assume that the respective
./configure
options in WSL are provided to give compatibility in both Windows and Linux.Otherwise, for an example here, if in WSL on 64bit Windows 11 using the
--enable-all
:Add this to the respective generated
options.h
to also use in Windows to address incompatibilities observed for this PR.Fixes zd# n/a
Testing
Tested on Windows 11, Visual Studio 17.11.5, Platform Toolset v143
Checklist