1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Files
wolfssl/cmake
Daniele Lacamera 89f024f660 Falcon: address PR review feedback
- cmake/functions.cmake: remove duplicated BUILD_FALCON conditional block;
  BUILD_FALCON is now set in one place.
- wolfssl/wolfcrypt/include.am: list the internal wc_falcon_*.h headers under
  an "if BUILD_FALCON" block so they ship in "make dist" tarballs and install
  when Falcon is enabled (the public falcon.h was already listed). Automake
  distributes both branches of the conditional, so a Falcon-disabled dist
  still contains them.
- wc_falcon_fft_neon.c: fix strict-aliasing UB in falcon_FFT/falcon_iFFT.
  fpr is a word64 bit pattern; casting fpr* to double* and using
  vld1q_f64/vst1q_f64 accesses the store through the wrong type and can
  miscompile at -O2/-O3. Load/store through uint64_t (the real object type)
  and reinterpret the vector register to/from f64 via new FALCON_VLD/FALCON_VST
  macros. Verified under qemu (NEON_FFT_PASS) with fmla v.2d still emitted.
- wc_falcon_sampler.c / wc_falcon_sampler.h: falcon_prng_get_u8/get_u64 have
  no error return, so a SHAKE256 squeeze failure previously went unnoticed and
  stale buffer bytes could feed the signer. Add a sticky "err" field latched on
  the first refill failure.
- wc_falcon_sign.c: falcon_sign_core now rejects the signature when the PRNG
  latched an error, and falcon_do_sign_tree bounds its restart loop
  (FALCON_SIGN_MAX_RESTARTS) so a wedged sampler terminates instead of
  spinning forever. The bound is far beyond any legitimate restart count.
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
2026-07-22 09:52:26 +02: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