1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Files
wolfssl/cmake
Daniel Pouzzner 103ef37cc7 globally rename WC_RNG_BANK_SUPPORT to HAVE_WC_RNG_BANK, and add WC_RNG_WANT_BANKREF_SUPPORT as an explicit feature flag for the bankref mechanism, always disabled for FIPS configurations.
wolfcrypt/src/random.c: allow WC_HAVE_RNG_BANKREF with HAVE_FIPS if WOLFSSL_FIPS_DEV.

wolfssl/wolfcrypt/random.h:

   * remove WC_RNG_BANK_SUPPORT from the exclusion list for WC_RNG_LOCK_ATFORK
   * pivot WC_HAVE_RNG_BANKREF on WC_RNG_WANT_BANKREF_SUPPORT, with FIPS exclusion.

wolfcrypt/src/rng_bank.c: update wc_InitRng_BankRef_local() and wc_BankRef_Release() to use WC_RNG_FLAG_BANKREF, not WC_DRBG_BANKREF.

wolfssl/wolfcrypt/rng_bank.h: remove backward-compat clause defining WC_HAVE_RNG_BANKREF.

linuxkm/lkcapi_rsa_glue.c: refactor km_rsa_ctx_init_rng() to check ctx->rng.flags, not ctx->rng.status, for bankref status.

configure.ac: in ENABLED_RNG_BANK setup, split out WC_RNG_WANT_BANKREF_SUPPORT as a separate flag, and don't define it if FIPS.

wolfcrypt/benchmark/fips_cast_bench.c: omit bench_pct_slhdsa() if defined(WOLFSSL_SLHDSA_VERIFY_ONLY).

wolfcrypt/test/test.c: in myCryptoDevCb(), add HAVE_INTEL_RDRAND to list of macros enabling use of wc_RNG_GenerateBlock() for WC_ALGO_TYPE_RNG.

linuxkm/Makefile: use bash-4.3-compatible syntax in $(()) expression.

.wolfssl_known_macro_extras: remove unneeded entries.
2026-09-24 01:36:32 -05:00
..
2026-02-02 10:26:58 +01:00
2026-07-22 09:52:26 +02:00
2026-02-02 10:26:58 +01:00
2026-07-22 09:52:26 +02:00
2026-02-02 10:26:58 +01:00

wolfSSL CMake

This directory contains some supplementary functions for the CMakeLists.txt in the root.

See also cmake notes in the INSTALL documentation file. When building with autoconf/automake, CMake package files are installed by default under $(libdir)/cmake/wolfssl to support find_package(wolfssl). Disable with ./configure --disable-cmake-install.

If new CMake build options are added cmake/options.h.in must also be updated.

For more information on building wolfSSL, see the wolfSSL Manual.

In summary for cmake:

# From the root of the wolfSSL repo:

mkdir -p out
pushd out
cmake ..
cmake --build .

# View the available ciphers with:
./examples/client/client -e
popd

CMake Presets

The CMakePresets.json; see [cmake-presets(https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html)

  • Cross-platform and cross-IDE.

  • Standardized CMake feature (since CMake 3.19+, recommended after 3.21).

  • Works in Visual Studio, VS Code, CLI, CI systems, etc..

Visual Studio Settings

There's also a Visual Studio specific file: CMakeSettings.json. This the file that supports the GUI CMake settings.

See the Microsoft CMakeSettings.json schema reference

Visual Studio (2022 v17.1 and later):

  • Prefers CMakePresets.json if it exists.

  • Falls back to CMakeSettings.json if no presets are found.

  • Lets you override or extend presets via CMakeSettings.json.

Recommendations:

  • Use CMakePresets.json to define shared, cross-platform presets.

  • Use CMakeSettings.json to define Visual Studio-specific overrides, like:

    • Custom output directories
    • Specific environment variables
    • *UI-related tweaks