wolfssl/cmake
Tobias Frauenschlaeger 6be2cb9e00 Leave TLS 1.2 transcript state out of TLS 1.3 only builds
Every build hashed each handshake message with SHA-512 and reserved two Hashes
structures for the TLS 1.2 Finished and CertificateVerify digests, whether or
not TLS 1.2 was compiled in. TLS 1.3 hashes the transcript with the cipher
suite's hash, and WOLFSSL_TLS13_SHA512 is what allows SHA-512 to be that hash,
though no cipher suite in the table selects it today. TLS 1.3 also derives
Finished and CertificateVerify differently, so a TLS 1.3 only build never reads
any of it.

Keep verifyHashes and certHashes only when TLS 1.2 is enabled, and the SHA-512
transcript only when TLS 1.2 or WOLFSSL_TLS13_SHA512 is. A TLS 1.3 only build
drops the handshake hashes from 864 to 352 bytes per handshake and stops
running SHA-512 over every handshake message. Note that ./configure
--disable-tlsv12 does not by itself define WOLFSSL_NO_TLS12, so an autotools
build gets the saving only when that macro is set.

Add --enable-tls13-sha512 and the matching CMake WOLFSSL_TLS13_SHA512 option,
so a macro that now decides the layout of the handshake hashes is recorded in
the generated wolfssl/options.h like every other one.
2026-09-14 08:25:46 +02:00
..
consumer
modules Remove liboqs dependency 2026-07-22 09:52:26 +02:00
Config.cmake.in
README.md
config.in Pass an explicit length to CheckIPAddr. Move sys/time.h and sys/un.h to options.h as they are used in the library. Zero heap mp_int structs on allocation, before any error path. 2026-08-12 17:27:42 -07:00
functions.cmake cryptocb: add WC_ALGO_TYPE_KEYSTORE for hardware key store operations 2026-09-07 08:22:01 -07:00
include.am Remove liboqs dependency 2026-07-22 09:52:26 +02:00
options.h.in Leave TLS 1.2 transcript state out of TLS 1.3 only builds 2026-09-14 08:25:46 +02:00
wolfssl-config-version.cmake.in
wolfssl-targets.cmake.in

README.md

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