Compare commits

...

2416 Commits

Author SHA1 Message Date
JacobBarthelmeh
9ca379f3bb Merge pull request #9719 from dgarske/usersettings_expand
Improve user_settings.h examples and add validation rules
2026-01-29 15:35:12 -07:00
David Garske
7077a7bdd8 Fix for macros not longer needed in .wolfssl_known_macro_extras 2026-01-29 09:28:23 -08:00
David Garske
c2a987595f Add new user_settings.h templates for tls13, dtls13, pq, openssl_compat, baremetal, rsa_only, pkcs7, ca 2026-01-28 11:27:01 -08:00
David Garske
3946ba8de3 Improve user_settings.h examples and add validation rules
- Standardize header guards to WOLFSSL_USER_SETTINGS_H across all files
  - Add #if 0/1 gates with labels for easy feature toggling
  - Fix bugs: typos in eccnonblock (WOLFSL_SHA*), duplicates in fipsv5/all
  - Add NO_DES3_TLS_SUITES alongside NO_DES3 where needed
  - Update wolfboot_keytools with upstream PQ algorithms (ML-DSA, LMS, XMSS)
  - Add settings.h validation rules with descriptive error messages
  - Auto-define NO_DES3_TLS_SUITES when NO_DES3 is set (instead of error)
  - Update README.md and add missing files to CI tests
2026-01-28 09:52:24 -08:00
JacobBarthelmeh
a6316114bd Merge pull request #9716 from SparkiDev/regression_fixes_22
Regression test fixes
2026-01-27 22:07:50 -07:00
JacobBarthelmeh
ba3653d8d0 Merge pull request #9717 from dgarske/config_rules
Make sure all configure.ac rules are also enforced in settings.h
2026-01-27 21:53:51 -07:00
Sean Parkinson
eb2fb4a9ce Merge pull request #9699 from anhu/downg
Add cipher suite filtering when downgrade is disabled
2026-01-28 08:59:06 +10:00
David Garske
46251bb401 Fix issue with NO_DES3_TLS_SUITES 2026-01-27 14:42:41 -08:00
Sean Parkinson
bc9e37118e Regression test fixes
Mostly combinations of NO_WOLFSSL_CLIENT, NO_WOLFSSL_SERVER and
WOLFSSL_NO_CLIENT_AUTH were failing.
Added configurations to CI loop.

wc_AesGcmDecryptFinal: use WC_AES_BLOCK_SIZE to satisfy compiler.
2026-01-28 07:37:29 +10:00
JacobBarthelmeh
f7b5f00973 Merge pull request #9710 from rlm2002/xChaCha20_Poly1305_unitTest
Unit test updates for XChacha20-Poly1305
2026-01-27 13:56:16 -07:00
JacobBarthelmeh
4f84be8e66 Merge pull request #9715 from dgarske/rsa_key_parsing
Fix for RSA private key parsing (allowing public) and RSA keygen no malloc support
2026-01-27 13:11:14 -07:00
David Garske
74a4bcb546 Enforce all configure.ac rules in settings.h also. Keeping configure.ac for early error checking. 2026-01-27 10:46:29 -08:00
Anthony Hu
3aa758c615 renegotiation indication changes number of ciphersuites so gate on that 2026-01-27 12:57:31 -05:00
JacobBarthelmeh
3e7efe8be2 Merge pull request #9705 from cconlon/nameConstraints
Support for extracting and validating X.509 Name Constraints extensions
2026-01-27 10:01:48 -07:00
Anthony Hu
9a53125794 Simplify testing gating logic. 2026-01-27 11:19:50 -05:00
David Garske
c8fa1e915b Fix for RSA private key parsing (allowing public) and RSA keygen no malloc support. 2026-01-26 16:06:05 -08:00
Ruby Martin
38cb14f2a9 add API unit test for XChacha20-Poly1305
Expand XChacha20-Poly1305 unit test
2026-01-26 15:33:35 -07:00
Chris Conlon
610d530e45 Add Name Constraints extension support with wolfSSL_X509_get_ext_d2i() and wolfSSL_NAME_CONSTRAINTS_check_name() 2026-01-26 10:36:05 -07:00
David Garske
eeaa3a7160 Merge pull request #9596 from kareem-wolfssl/zd19378
Add a runtime option to enable or disable the secure renegotiation check.
2026-01-26 08:34:57 -08:00
Anthony Hu
d6985a6ee3 AES-GCM guard. 2026-01-23 16:23:44 -05:00
Kaleb Himes
4574a0c10e Merge pull request #9706 from miyazakh/selftest_pqc
Enable kyber and dilithium in selftest
2026-01-23 13:41:44 -07:00
David Garske
6ae5555718 Merge pull request #9704 from douzzer/20260122-toolchain-workarounds
20260122-toolchain-workarounds
2026-01-23 12:39:05 -08:00
David Garske
cd88ec57b0 Merge pull request #9685 from kareem-wolfssl/gh7735
Always reinitialize the SSL cipher suites in InitSSL_Side as the side and enabled algos have likely changed.
2026-01-23 12:38:46 -08:00
JacobBarthelmeh
2f388dde4c Merge pull request #9703 from dgarske/stsafe-a120-ecdhe
Fixes for STSAFE-A120 ECDHE
2026-01-23 10:59:45 -07:00
David Garske
4773ea6d44 Merge pull request #9637 from Frauschi/test_coverage
Increase test coverage for PQC and CMake
2026-01-23 07:51:40 -08:00
David Garske
b5209344e0 Merge pull request #9707 from danielinux/enable_stm32g0_AES_only
Add STM32G0 hardware crypto support
2026-01-23 07:50:30 -08:00
Michal Jahelka
269c28be16 Add STM32G0 hardware crypto support 2026-01-23 11:09:08 +01:00
Tobias Frauenschläger
14ce7956f1 Increase test coverage
* More PQC configurations
* More CMake setups
* Fix various bugs uncovered by these tests

Added some missing feature additions to CMake to make the example
`user_settings_all.` config file work for the CI test.
2026-01-23 09:27:16 +01:00
Anthony Hu
2616fe3ff1 Better guards around tests 2026-01-22 22:17:59 -05:00
Hideki Miyazaki
0f72d2eafe enable kyber and dilithium in selftest 2026-01-23 11:59:46 +09:00
Sean Parkinson
27df554e99 Merge pull request #9701 from Frauschi/brainpool-tls13
Add support for TLS 1.3 Brainpool curves
2026-01-23 10:42:32 +10:00
Sean Parkinson
baaa368a61 Merge pull request #9668 from kaleb-himes/PQ-FS-2026-Part1
PQ FS 2026 part1
2026-01-23 10:30:47 +10:00
David Garske
2c83711319 Merge pull request #9693 from kareem-wolfssl/zd21012
Use MinGW XINET_PTON definition for 32-bit MinGW as well as 64-bit.
2026-01-22 15:24:31 -08:00
Daniel Pouzzner
a1b43ab3fa wolfssl/wolfcrypt/dilithium.h: add a check for whether all supported levels are disabled, in WOLFSSL_WC_DILITHIUM setup. 2026-01-22 17:20:46 -06:00
Daniel Pouzzner
71bffcc5eb linuxkm/Kbuild: move FORCE_GLOBAL_OBJTOOL_OFF setup outside ENABLED_LINUXKM_PIE setup, i.e. always usable. 2026-01-22 17:20:46 -06:00
David Garske
a17f68f036 Merge pull request #9587 from kareem-wolfssl/zd20850
Add duplicate entry error to distinguish cases where a duplicate CRL is rejected.
2026-01-22 15:07:19 -08:00
David Garske
2fb19f84e5 Fixes for STSAFE-A120 ECDHE 2026-01-22 22:46:35 +00:00
Kareem
1103552c37 Code review feedback 2026-01-22 15:46:13 -07:00
Kareem
d60dd53165 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd19378 2026-01-22 15:37:30 -07:00
Kareem
4c0c51fdff Merge branch 'master' of https://github.com/wolfSSL/wolfssl into gh7735 2026-01-22 15:13:15 -07:00
Kareem
baedba6a58 Force client haveDH to true in wolfSSL_set_options. haveDH won't be set to true on the client as the server side is what calls DH param generation APIs which set this to true, but we still want the client to support DH cipher suites if enabled. This matches behavior from InitSSL_EitherSide. 2026-01-22 15:13:08 -07:00
kaleb-himes
20fc2de29d Restore sanity to < SEED_BLOCK_SZ 2026-01-22 09:09:29 -07:00
kaleb-himes
20b2fd200f Address failure rates from FIPS CRNGT test by implementing alternate RCT/ADP tests
Update ret code to match docs and update docs

Replace magic numbers with appropriate define

Define MAX_ENTROPY_BITS when MEMUSE not enabled

Fix type cast windows detection

Older FIPS modules still need the old check

CodeSpell you're wrong, that is what I want to name my variable

Turn the hostap into a manual dispatch until it gets fixed

Upon closer review we can not skip the test when memuse enabled

Fix whitespace stuff found by multitest

More syntax things

Correct comments based on latest findings
2026-01-22 09:06:17 -07:00
Tobias Frauenschläger
bde1bf6ce7 Fix user_settings ASM multiple define 2026-01-22 14:14:15 +01:00
Tobias Frauenschläger
eb8ba6124e Support TLS 1.3 ECC Brainpool authentication
This also fixes TLS 1.2 authentication to only succeed in case the
brainpool curve was present in the supported_groups extension.
2026-01-22 14:14:09 +01:00
Tobias Frauenschläger
a462398387 Support Brainpool ECC curve TLS 1.3 key exchange
When both TLS 1.3 and Brainpool curves are enabled, three new groups can
be used for the ECDHE key exchange according to RFC 8734:
* WOLFSSL_ECC_BRAINPOOLP256R1TLS13 (31)
* WOLFSSL_ECC_BRAINPOOLP384R1TLS13 (32)
* WOLFSSL_ECC_BRAINPOOLP512R1TLS13 (33)

Also ensure that the existing TLS 1.2 curves are sent properly.

The TLS client application is updated to support handshakes via
Brainpool curves using the new argument "--bpKs".
2026-01-22 14:14:09 +01:00
David Garske
62ca34497c Merge pull request #9633 from douzzer/20260108-DEFAULT_MAX_CLASSIC_ASYM_KEY_BITS
20260108-DEFAULT_MAX_CLASSIC_ASYM_KEY_BITS
2026-01-21 17:39:56 -08:00
David Garske
baeffb2f6a Merge pull request #9692 from anhu/aead
wc_XChaCha20Poly1305_Init: NULL check aead, not ad
2026-01-21 17:22:32 -08:00
Daniel Pouzzner
142f493964 configure.ac: if ENABLED_32BIT, add -DWC_32BIT_CPU to AM_CFLAGS, and don't add WOLFSSL_X86_64_BUILD to AM_CFLAGS; fix handling for --enable-bump;
wolfssl/wolfcrypt/settings.h: classify OPENSSL_EXTRA as "desktop type system" in bump up of default FP_MAX_BITS and SP_INT_BITS;

wolfssl/wolfcrypt/types.h: if WC_32BIT_CPU, don't define WC_64BIT_CPU.
2026-01-21 18:21:16 -06:00
David Garske
e4e79dd8a3 Merge pull request #9694 from SparkiDev/tls_msg_sanity_fix
TLS: more sanity checks on message order
2026-01-21 15:11:11 -08:00
Anthony Hu
d088fee72c Add cipher suite filtering when downgrade is disabled
When wolfSSL_SetVersion() is called to set a specific TLS version,
the downgrade flag is now set to 0. This causes wolfSSL_parse_cipher_list()
to no longer preserve cipher suites from the other TLS version group.

Previously, when using SSLv23 method and setting cipher suites for only
one TLS version (e.g., TLS 1.2), the library would preserve any existing
cipher suites from the other version (e.g., TLS 1.3) for OpenSSL API
compatibility. With this change, if a specific version is set via
wolfSSL_SetVersion(), only the cipher suites for that version are kept.
2026-01-21 18:01:01 -05:00
Anthony Hu
7d7299e254 Do not allow NULL with non-zero length. 2026-01-21 17:49:30 -05:00
David Garske
11ddec3f69 Merge pull request #9681 from tmael/wfb1_
Fix cert SW issues in Aes and rng
2026-01-21 13:41:01 -08:00
David Garske
e1e7c4d9f0 Merge pull request #9695 from miyazakh/fix_qt_unittest
Include `asn.h` for SN_xxx definitions from `openssl/obj_mac.h`
2026-01-21 12:56:53 -08:00
David Garske
47ff34b503 Merge pull request #9696 from SparkiDev/mldsa_max_vals_from_avail
ML-DSA: max values based on available parameters
2026-01-21 12:56:07 -08:00
David Garske
758d74f51f Merge pull request #9687 from holtrop-wolfssl/rust-hmac-blake2
Rust wrapper: add HMAC-BLAKE2[bs] wrappers
2026-01-21 12:55:48 -08:00
Tesfa Mael
1c3816d7d8 Use seedSz < SEED_BLOCK_SZ 2026-01-21 12:09:53 -08:00
Tesfa Mael
d3d2105035 Fix cert SW issues 2026-01-21 12:09:53 -08:00
Daniel Pouzzner
418a3bff32 Merge pull request #9698 from dgarske/rsa_no_rng2
More fixes for NO RNG and NO check key
2026-01-21 14:01:10 -06:00
David Garske
f52930b844 More fixes for NO RNG and NO check key (broken in #9606 and #9576) 2026-01-21 10:31:57 -08:00
David Garske
2a449ebfdf Merge pull request #9673 from holtrop-wolfssl/update-github-workflows-ubuntu
Update from Ubuntu 22.04 to Ubuntu 24.04 for github workflows
2026-01-21 09:14:39 -08:00
Daniel Pouzzner
cc7897be0d Merge pull request #9689 from dgarske/rsa_no_rng
Fixes for RSA with no RNG
2026-01-21 11:13:03 -06:00
David Garske
98dbc56daa Merge pull request #9691 from douzzer/20260120-linuxkm-RHEL9v6-and-RDSEED-sanity-check
20260120-linuxkm-RHEL9v6-and-RDSEED-sanity-check
2026-01-21 09:03:32 -08:00
JacobBarthelmeh
685bacc917 Merge pull request #9614 from dgarske/stsafe-a120
Add STSAFE-A120 Support
2026-01-21 09:12:23 -07:00
Josh Holtrop
69fd8dc01f Update from Ubuntu 22.04 to Ubuntu 24.04 for several github workflows 2026-01-20 21:44:56 -05:00
Sean Parkinson
88593f8dcd ML-DSA: max values based on available parameters
When building wolfSSL implementation, make maximum sizes based on
available parameter sets.

Add wc_MlDsaKey_SignCtx and wc_MlDsaKey_VerifyCtx macros.
2026-01-21 12:04:28 +10:00
David Garske
38b0fe19a1 Improvements to code for ECDHE and peer review fixes. 2026-01-21 00:03:26 +00:00
David Garske
16fb84d0d1 Peer review fixes. Tested with brainpool. 2026-01-21 00:03:26 +00:00
David Garske
54f0ecb536 Fix for ephemeral key usage limit. 2026-01-21 00:03:26 +00:00
David Garske
384eaa48b3 Peer review fixes (thank you copilot) 2026-01-21 00:03:26 +00:00
David Garske
654901782c Peer review cleanups. ECDHE improvements. 2026-01-21 00:03:26 +00:00
David Garske
02c3086e00 Added ECDHE support 2026-01-21 00:03:26 +00:00
David Garske
09c75f25de Fixes for peer review. 2026-01-21 00:03:26 +00:00
David Garske
c7ca035baf Cleanup WOLFSL_STSAFE and fix issue with multi-test macros 2026-01-21 00:03:26 +00:00
David Garske
a4c2398265 Add STSAFE-A120 Support 2026-01-21 00:03:26 +00:00
Sean Parkinson
8902afdcea TLS: more sanity checks on message order
Add more checks on message ordering for TLS 1.2 and below.
Reformat code.
2026-01-21 10:00:38 +10:00
Hideki Miyazaki
22ed7472b4 fix qt unit test
include asn.h for SN_xxx definitions
2026-01-21 08:59:28 +09:00
Kareem
832bcd7f4b Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20850 2026-01-20 15:59:05 -07:00
Kareem
549f106907 Use MinGW XINET_PTON definition for 32-bit MinGW as well as 64-bit. 2026-01-20 15:55:19 -07:00
Daniel Pouzzner
7048fa80d4 wolfcrypt/src/random.c and wolfssl/wolfcrypt/settings.h: fixes from CI and peer review:
* in wc_GenerateSeed_IntelRD(), use stack/register allocation for sanity_word{1,2}, and
* don't set WC_VERBOSE_RNG if WOLFSSL_DEBUG_PRINTF is missing.
2026-01-20 16:48:21 -06:00
Kareem
0f0163d888 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into gh7735 2026-01-20 15:18:26 -07:00
Anthony Hu
4550814e66 wc_XChaCha20Poly1305_Init: NULL check aead, not ad 2026-01-20 16:37:20 -05:00
Daniel Pouzzner
b91272c9a5 wolfcrypt/src/random.c: add sanity check in wc_GenerateSeed_IntelRD() to work around buggy RDSEED by disabling it if it generates three identical 64 bit words consecutively;
wolfssl/wolfcrypt/settings.h: if DEBUG_WOLFSSL && !WC_NO_VERBOSE_RNG, set WC_VERBOSE_RNG, and add WOLFSSL_NO_DEBUG_CERTS to allow inhibition of WOLFSSL_DEBUG_CERTS.
2026-01-20 15:24:43 -06:00
Daniel Pouzzner
ba53051457 add linuxkm/patches/5.14.0-570.58.1.el9_6/WOLFSSL_LINUXKM_HAVE_GET_RANDOM_CALLBACKS-5v14-570v58v1-el9_6.patch 2026-01-20 15:07:44 -06:00
Josh Holtrop
4a92ee31bb Rust HMAC-BLAKE2: require exact output buffer size 2026-01-20 15:31:58 -05:00
Josh Holtrop
e59ddb95c7 Rust blake2: remove unnecessary cfg guards 2026-01-20 14:56:55 -05:00
David Garske
91d9389b9f Fixes for RSA with no RNG 2026-01-20 11:05:10 -08:00
David Garske
c8867d8c52 Merge pull request #9688 from padelsbach/login-live-com-cert
Address connection issues in ocsp-stapling test
2026-01-20 11:04:51 -08:00
David Garske
17401da6ae Merge pull request #9678 from cconlon/otherNameSan
Fix GENERAL_NAME memory management for otherName and RID SANs
2026-01-20 10:56:37 -08:00
David Garske
3520b4c9a1 Merge pull request #9636 from julek-wolfssl/zephyr-fixes-202601
Address Zephyr and C++ compatibility issues
2026-01-20 10:52:27 -08:00
David Garske
6bdc6a7550 Merge pull request #9618 from SparkiDev/volatile_multi_statement
Multiple volatile variables in a C statement undefined
2026-01-20 10:42:49 -08:00
Kareem
d505c0b7c5 Only reinitialize suites in InitSSL_Side if they were not set by the user. Always allocate suites in InitSSL_Side if they're NULL so InitSSL_Suites will set them. 2026-01-20 11:40:37 -07:00
David Garske
26b8795a3f Merge pull request #9682 from JacobBarthelmeh/lic
add RPCS3 to GPLv2 exception list
2026-01-20 10:38:32 -08:00
Paul Adelsbach
2325c68d4e Address connection issues in ocsp-stapling test 2026-01-20 09:46:35 -08:00
Josh Holtrop
af0fd013a1 HMAC-BLAKE2b: avoid coverity complaints about accessing x_key out of range 2026-01-20 08:14:02 -05:00
Josh Holtrop
a555d5290a Rust wrapper: add HMAC-BLAKE2[bs] wrappers 2026-01-20 08:10:16 -05:00
Kareem
89931bd884 Always reinitialize the SSL cipher suites in InitSSL_Side as the side and enabled algos have likely changed. 2026-01-19 17:50:26 -07:00
Sean Parkinson
c71a4dd66f Merge pull request #9662 from AlexLanzano/tls1.2-empty-cert-fix
[TLS 1.2, TLS 1.3] Fail immediately if server sends empty certificate message for TLS 1.2 and beyond
2026-01-20 09:45:29 +10:00
Chris Conlon
0f395a5f9d Fix memory management in wolfssl_dns_entry_othername_to_gn() and
wolfSSL_X509_get_ext_d2i() for otherName SAN handling, add ASN_RID_TYPE case to wolfSSL_X509_get_ext_d2i()
2026-01-19 16:39:33 -07:00
Daniel Pouzzner
4ce6c4c262 Merge pull request #9623 from julek-wolfssl/dtls-1.3-ms-interval
dtls 1.3: allow rtx interval to be less than a second
2026-01-19 17:01:23 -06:00
Daniel Pouzzner
e465f92905 Merge pull request #9642 from holtrop-wolfssl/hmac-blake2
Add HMAC-BLAKE2b and HMAC-BLAKE2s API functions
2026-01-19 16:49:08 -06:00
Daniel Pouzzner
c2cf8b1545 Merge pull request #9659 from holtrop-wolfssl/improve-error-for-invalid-helloretryrequest
Improve log message and error code for invalid HelloRetryRequest - fix #9653
2026-01-19 16:23:59 -06:00
Juliusz Sosinowicz
f9aec60e0d Restore previous includes but add more externs 2026-01-19 22:02:26 +01:00
JacobBarthelmeh
1e9d71af42 add RPCS3 to GPLv2 exception list 2026-01-19 13:48:16 -07:00
Daniel Pouzzner
bfc4f6bb01 Merge pull request #9677 from dgarske/riscv_sha512
Fix for building RISC-V 64-bit without SHA512
2026-01-19 12:57:59 -06:00
Juliusz Sosinowicz
77e1fb662b Remove circular dependency between ssl.h and wolfio.h 2026-01-19 11:21:14 +01:00
Juliusz Sosinowicz
e86ceb2ad9 zephyr: define missing posix network funcs 2026-01-19 11:21:14 +01:00
Juliusz Sosinowicz
b6f0139d63 zephyr: Fix more C++ linkage 2026-01-19 11:21:14 +01:00
Juliusz Sosinowicz
bba4671042 wolfSSL_dtls13_use_quick_timeout: check for NULL input 2026-01-19 10:13:23 +01:00
Juliusz Sosinowicz
429b690370 Address code review 2026-01-19 09:38:17 +01:00
Juliusz Sosinowicz
48067f1fa7 dtls 1.3: allow rtx interval to be less than a second 2026-01-19 09:32:09 +01:00
Josh Holtrop
e90429dbb8 HMAC-BLAKE2: avoid clang-analyzer warnings about x_key being uninitialized 2026-01-18 22:20:14 -05:00
David Garske
d98bbf1bc4 Merge pull request #9679 from douzzer/20260117-fix-test_wolfSSL_EVP_sm3
20260117-fix-test_wolfSSL_EVP_sm3
2026-01-17 11:47:51 -08:00
Daniel Pouzzner
467d6dd338 tests/api/test_evp_digest.c: fix for copy-paste error in test_wolfSSL_EVP_sm3(), introduced in 43d831ff06. 2026-01-17 09:58:21 -06:00
Josh Holtrop
90c8b5c80d HMAC-BLAKE2: Use uppercase U for unsigned integer constants 2026-01-17 09:15:47 -05:00
Daniel Pouzzner
1e51938965 Merge pull request #9675 from embhorn/zd21049
Doc fixes for ecc
2026-01-17 00:03:46 -06:00
Daniel Pouzzner
84bca62ace Merge pull request #9667 from bigbrett/ancv-verify-callback-fix
Apple Cert Fix: Prevent verify callback from blocking ANCV invocation
2026-01-17 00:02:42 -06:00
Daniel Pouzzner
9ae87e2a48 Merge pull request #9657 from embhorn/gh9655
Fix TLSX_Parse to correctly handle client and server cert type ext with TLS1.3
2026-01-16 23:59:31 -06:00
Daniel Pouzzner
5c7f986925 Merge pull request #9670 from miyazakh/fix_selftest
Fix compilation, crypt test and unit test failures when selftest is enabled
2026-01-16 23:57:27 -06:00
Daniel Pouzzner
0ceed2d832 Merge pull request #9664 from padelsbach/hmac-update-len-check
Add length check to Hmac_UpdateFinal_CT to prevent build error
2026-01-16 15:35:58 -06:00
David Garske
214b3c2dd7 Fix for building RISC-V 64-bit without SHA512 2026-01-16 13:07:08 -08:00
Daniel Pouzzner
9aabef04ba Merge pull request #9641 from SparkiDev/api_c_split_evp
API testing: split out more test cases
2026-01-16 14:58:15 -06:00
Daniel Pouzzner
d18b4b28e0 Merge pull request #9676 from night1rider/fix-sha256-inter-init
initialize i_shaCopy to prevent undefined behavior
2026-01-16 14:14:45 -06:00
Josh Holtrop
b1086a1dbc HMAC-BLAKE2[bs] - remove some spaces per review feedback 2026-01-16 10:38:49 -05:00
Zackery Backman
7a894515cb initialize i_shaCopy to prevent undefined behavior 2026-01-15 18:00:27 -07:00
David Garske
f58787259c Merge pull request #9674 from douzzer/20260115-PQC-WOLFSSL_NO_MALLOC
20260115-PQC-WOLFSSL_NO_MALLOC
2026-01-15 16:18:34 -08:00
Hideki Miyazaki
8ad73d8ac1 Fix compile and crypt test failures when selftest is enabled 2026-01-16 08:55:06 +09:00
Sean Parkinson
9427f9f26c Merge pull request #9665 from dgarske/cleanup_20260114
Remove Devin Lifeguard
2026-01-16 09:22:47 +10:00
Sean Parkinson
fabe0c090a Merge pull request #9646 from rlm2002/coverity
20260112 Coverity: update macros and add length checks
2026-01-16 09:20:01 +10:00
Eric Blankenhorn
b3bb8edf45 Fix doc for wc_ecc_verify_hash / _ex 2026-01-15 17:01:24 -06:00
Eric Blankenhorn
8316a4080d Fix doc for wc_ecc_mulmod 2026-01-15 16:45:48 -06:00
Daniel Pouzzner
eb65361281 wolfcrypt/test/test.c:
* tweaks to xmss_test() for compatibility with WOLFSSL_NO_MALLOC && NO_WOLFSSL_MEMORY;
* fixes for return codes in dilithium_test().

wolfssl/wolfcrypt/dilithium.h: add !WC_NO_CONSTRUCTORS gate around wc_dilithium_new() and wc_dilithium_delete() prototypes, to match gating in implementation.
2026-01-15 16:04:36 -06:00
Brett
65a2b06d89 ANCV: support server-side policy creation 2026-01-15 11:59:59 -07:00
Brett
22a9665e6d Prevent verify callback from blocking ANCV invocation when verify
callback is registered. Reverts behavior to pre-PR#9144
2026-01-15 11:59:59 -07:00
Ruby Martin
b4344c17cc add cleanup logic to sakke_kat_derive_test() 2026-01-15 10:58:26 -07:00
Ruby Martin
2596d56802 verify length limit for supported version ext
add length check to tls extensions
2026-01-15 10:58:26 -07:00
Josh Holtrop
e7612ff36f Improve log message and error code for invalid HelloRetryRequest - fix #9653 2026-01-15 12:55:17 -05:00
David Garske
20c4e2760b Remove Devin Lifeguard 2026-01-15 09:50:34 -08:00
David Garske
16e45f94ae Merge pull request #9672 from holtrop-wolfssl/fix-hostap-git-url
Fix hostap repo clone URL
2026-01-15 09:49:45 -08:00
David Garske
7370e3145d Merge pull request #9666 from padelsbach/arduino-esp32-space
Experimental: Reduce disk space for esp32 Arduino builds
2026-01-15 09:49:27 -08:00
Josh Holtrop
a4a24ad2fe Fix hostap repo clone URL 2026-01-15 09:30:27 -05:00
Eric Blankenhorn
3c5b8f900e Fix TLSX_Parse to correctly handle client and server cert type ext with TLS1.3 2026-01-15 07:36:52 -06:00
Paul Adelsbach
c193c4c64f Reduce disk space for esp32 Arduino builds 2026-01-14 20:02:50 -08:00
David Garske
0f3c769c44 Merge pull request #9660 from douzzer/20260114-fixes
20260114-fixes
2026-01-14 20:00:27 -08:00
David Garske
f0d3957aa9 Merge pull request #9643 from mattia-moffa/20260112-sniffer-fixes
More sniffer length checks
2026-01-14 17:00:12 -08:00
Daniel Pouzzner
96f8eb01f9 wolfssl/wolfcrypt/asn.h and wolfssl/openssl/obj_mac.h: add shortname and longname mappings for ASN subject fields. 2026-01-14 18:03:32 -06:00
Daniel Pouzzner
8d3adfad44 wolfssl/wolfcrypt/falcon.h and wolfssl/wolfcrypt/sphincs.h: in falcon_key and sphincs_key, use WC_BITFIELD foo:1, not bool, to fix readability-implicit-bool-conversion. 2026-01-14 18:03:32 -06:00
Daniel Pouzzner
f738e44e39 wolfcrypt/test/test.c: in random_bank_test(), fix position of a misplaced WC_DRBG_BANKREF gate. 2026-01-14 18:03:32 -06:00
Sean Parkinson
9b5cbbc3fb Merge pull request #9663 from embhorn/zd21045
Resolve unused var warning in oss-fuzz
2026-01-15 08:36:17 +10:00
Josh Holtrop
b432ee93a5 Add incremental API for HMAC-BLAKE2[bs] computation 2026-01-14 16:12:42 -05:00
Daniel Pouzzner
e8934f7a9e Merge pull request #9661 from JacobBarthelmeh/lic
add SWUpdate to GPLv2 exception list
2026-01-14 14:39:49 -06:00
Josh Holtrop
74c79dab1e Update constants in BLAKE2 doxygen documentation 2026-01-14 15:37:29 -05:00
Josh Holtrop
2b3c02531c Use ForceZero to clean up HMAC-BLAKE2[bs] 2026-01-14 15:37:29 -05:00
Josh Holtrop
ee708dc457 Update README and doxygen for BLAKE2b/BLAKE2s 2026-01-14 15:37:29 -05:00
Josh Holtrop
92b57d7e34 Add HMAC-BLAKE2b and HMAC-BLAKE2s API functions 2026-01-14 15:37:28 -05:00
Ruby Martin
e32ac6ffb7 XMEMSET with WC_CALLOC_VAR_EX
switch WC_ALLOC_VAR_EX with XMEMSET to WC_CALLOC_VAR_EX

fix XMEMSET call for WC_CALLOC_VAR_EX
2026-01-14 11:27:21 -07:00
Paul Adelsbach
f3fb63aea7 Add length check to Hmac_UpdateFinal_CT to prevent build error 2026-01-14 09:31:35 -08:00
Eric Blankenhorn
625a3cd250 Resolve unused var warning in oss-fuzz 2026-01-14 11:23:19 -06:00
David Garske
2a5256ba18 Merge pull request #9654 from embhorn/zd21038
Fix DecodeAuthKeyInternal not clearing cert->extAuthKeyIdSet
2026-01-14 09:19:24 -08:00
JacobBarthelmeh
32d33f2a53 add SWUpdate to GPLv2 exception list 2026-01-14 09:42:39 -07:00
Alex Lanzano
bdc525dd6d [TLS 1.2, TLS 1.3] Fail immediately if server sends empty certificate message for TLS 1.2 and beyond 2026-01-14 11:30:13 -05:00
David Garske
35f6910186 Merge pull request #9649 from douzzer/20260112-fixes
20260112-fixes
2026-01-13 15:03:43 -08:00
Daniel Pouzzner
1d247b744c wrapper/rust/: fix unit tests to avoid out-of-order wolfCrypt_Cleanup(). 2026-01-13 14:43:50 -06:00
Daniel Pouzzner
f878c43814 wolfcrypt/src/wc_port.c: in wolfCrypt_Cleanup(), return error if called with initRefCount <= 0. 2026-01-13 14:42:27 -06:00
Daniel Pouzzner
627f51632b configure.ac: add -Wno-deprecated-enum-enum-conversion to CFLAGS to suppress C++20 default if applicable. 2026-01-13 12:41:53 -06:00
Daniel Pouzzner
366f5fe411 src/ssl.c: refactor initRefCount increment/decrement to avoid -Wvolatile. 2026-01-13 11:21:40 -06:00
Daniel Pouzzner
f6fbd2a3b7 wolfcrypt/test/test.c: in random_bank_test(), add a missing WC_DRBG_BANKREF gate, and fix wc_rng_bank_init(bank, ...) to pass _FLAG_NO_VECTOR_OPS to set up .sha_method test. 2026-01-13 11:21:40 -06:00
Daniel Pouzzner
b195628204 wolfcrypt/src/sha512.c: fix underinitialization and config-dependent leak paths in InitSha512_Family(). 2026-01-13 11:21:40 -06:00
Daniel Pouzzner
fc68137b47 wolfcrypt/src/wc_port.c:
* fixes for readability-implicit-bool-conversion in wolfSSL_Atomic_Ptr_CompareExchange().
* refactor initRefCount as a wolfSSL_Atomic_Int, unless !WOLFSSL_ATOMIC_OPS, for thread safety.
2026-01-13 11:21:39 -06:00
Daniel Pouzzner
e0db99218f wolfcrypt/src/asn.c: fix -Wstringop-truncation from gcc-16.0.0_p20260104 in KeyPemToDerPassCb(). 2026-01-13 11:21:39 -06:00
Daniel Pouzzner
6f48e0613e Merge pull request #9647 from SparkiDev/sp_volatile_op_fix
SP volatile op fix
2026-01-13 11:20:13 -06:00
Sean Parkinson
37b20fabdc SP volatile op fix
Performing a non-atomic operation on a volatile.
Deprecated in C++20 and checked by new versions of compilers.
2026-01-14 02:17:20 +10:00
Eric Blankenhorn
4e419938a7 Fix DecodeAuthKeyInternal not clearing cert->extAuthKeyIdSet 2026-01-13 08:09:10 -06:00
Daniel Pouzzner
caa6429242 Merge pull request #9624 from holtrop-wolfssl/rust-xchacha20-poly1305
Rust wrapper: add one-shot XChaCha20-Poly1305 encrypt/decrypt functions
2026-01-13 00:51:15 -06:00
Sean Parkinson
1aa79af41e Multiple volatile variables in a C statement undefined
Undefined behaviour when there are multiple volatile variables accessed
in the one C statement.
Changes to introduce non-volatile temporaries, split statement or make
variable non-volatile.
2026-01-13 15:08:50 +10:00
Daniel Pouzzner
05e480f14f Merge pull request #9644 from philljj/bsdkm_time
bsdkm: sys time wrapper.
2026-01-12 22:01:33 -06:00
Daniel Pouzzner
48cb84df0d Merge pull request #9645 from SparkiDev/curve25519_invert_nct_x64_asm_fix
Curve25519 x64 ASM: nct invert needs vzeroupper
2026-01-12 16:57:00 -06:00
Sean Parkinson
ffe304643e Curve25519 x64 ASM: nct invert needs vzeroupper
When ymm registers used, vzeroupper is required at end.
2026-01-13 08:38:23 +10:00
jordan
268fc98a9a bsdkm: cleanup for multi-test. 2026-01-12 15:17:34 -06:00
Sean Parkinson
43d831ff06 API testing: split out more test cases
EVP into test_evp_cipher, test_evp_digest, test_evp_pkey and test_evp.
OBJ into test_ossl_obj.
OpenSSL RAND into test_ossl_rand.
OpenSSL PKCS7 and PKCS12 tests into test_ossl_p7p12.
CertificateManager into test_certman.

Move some BIO tests from api.c into test_evp_bio.c.

Fix line lengths.
2026-01-13 06:34:49 +10:00
jordan
1ed6e41d16 bsdkm: sys time wrapper. 2026-01-12 13:51:22 -06:00
Mattia Moffa
100d765b0c More sniffer length checks 2026-01-12 18:25:27 +01:00
David Garske
7e0a8551e9 Merge pull request #9638 from douzzer/20260109-rng_bank-fixes
20260109-rng_bank-fixes
2026-01-12 08:25:23 -08:00
Sean Parkinson
3f8efdc802 Merge pull request #9600 from padelsbach/addcrl-cleanup
Cleanup AddCRL mutex and alloc/free
2026-01-12 09:11:20 +10:00
Sean Parkinson
ce69f1cec0 Merge pull request #9635 from miyazakh/x509errstr_handling
Fix OpenSSL error code handling in ERR_reason_error_string()
2026-01-12 08:57:17 +10:00
Sean Parkinson
84ca4a05fa Merge pull request #9628 from miyazakh/fix_crlnumber
Fix CRL Number hex string buffer overflow in CRL parser
2026-01-12 08:52:57 +10:00
Hideki Miyazaki
8571a67f13 fix PR test 2026-01-10 14:53:23 +09:00
Hideki Miyazaki
0e8af03f1d OpenSSL error code handling in reason_error_string 2026-01-10 13:50:08 +09:00
Daniel Pouzzner
902164ca03 wolfcrypt/src/rng_bank.c: fixes for typography and s/wc_FreeRng(rng2)/wc_rng_free(rng2)/ in random_bank_test();
wolfcrypt/src/rng_bank.c: tweaks to silence benign Coverity CHECKED_RETURN.
2026-01-09 18:17:09 -06:00
Daniel Pouzzner
d0e32f82b7 .wolfssl_known_macro_extras: fix for lexical order. 2026-01-09 17:52:37 -06:00
Daniel Pouzzner
a043b7a8d6 wolfcrypt/src/rng_bank.c, wolfssl/wolfcrypt/rng_bank.h, wolfcrypt/test/test.c:
* add WC_RNG_BANK_STATIC to WC_RNG_BANK_SUPPORT, supporting WOLFSSL_NO_MALLOC;

* in random_bank_test(), fix gate around _NO_VECTOR_OPS sha256.sha_method test (WOLFSSL_SMALL_STACK_CACHE, and USE_INTEL_SPEEDUP not WC_HAVE_VECTOR_SPEEDUPS);

* in definition of struct wc_rng_bank_inst, accommodate WOLFSSL_NO_ATOMICS builds;

wolfssl/wolfcrypt/random.h: in definition of struct WC_RNG, add gate to avoid empty union in !HAVE_HASHDRBG configs.
2026-01-09 17:52:37 -06:00
Daniel Pouzzner
a091ed9151 Merge pull request #9590 from philljj/fips_bsdkm
Fips bsdkm
2026-01-09 17:51:11 -06:00
Hideki Miyazaki
7b577f8914 change byte to char 2026-01-10 07:32:21 +09:00
Paul Adelsbach
e62c94d5e3 Cleanup AddCRL mutex and alloc/free 2026-01-09 10:44:06 -08:00
David Garske
2d3941056b Merge pull request #9630 from gasbytes/signedAttribsCount-fix
Increment signedAttribsCount with the right number of attributes it encoded
2026-01-09 10:06:01 -08:00
jordan
99527be3bf bsdkm: review cleanup. 2026-01-09 08:07:28 -06:00
Hideki Miyazaki
d4760b148d addressed review comments 2026-01-09 09:10:49 +09:00
Sean Parkinson
819eab8b46 Merge pull request #9609 from Frauschi/memory_leak_fix
Fix memory leak in case of handshake error
2026-01-09 10:10:31 +10:00
Hideki Miyazaki
d052128830 addressed review comments 2026-01-09 09:01:14 +09:00
Daniel Pouzzner
d555c1aaaa Merge pull request #9619 from rlm2002/coverity
20260106 Coverity fixes
2026-01-08 15:03:43 -06:00
David Garske
f8b5352e50 Merge pull request #9612 from Frauschi/zephyr_track_memory
Add Zephyr support for TRACK_MEMORY
2026-01-08 13:01:18 -08:00
David Garske
9fe3b195e1 Merge pull request #9605 from Frauschi/build_system_fixes
Build systems improvements
2026-01-08 13:00:57 -08:00
David Garske
7258697b0c Merge pull request #9629 from per-allansson/fix-ios-xcode-builds
IDE/XCODE: fix file types for asm.S files
2026-01-08 12:27:44 -08:00
Reda Chouk
9c7b586565 Increment signedAttribsCount with the right number of attributes it
encoded
2026-01-08 20:46:47 +01:00
David Garske
4f1d578212 Merge pull request #9610 from Frauschi/pre_master_secret_size
Remove PQC-based buffer size increase for PreMasterSecret
2026-01-08 11:18:19 -08:00
David Garske
198eac24d3 Merge pull request #9606 from Frauschi/cleanup_decode_private_key
Cleanup for DecodePrivateKey() functionality
2026-01-08 11:09:44 -08:00
David Garske
d25f98fd82 Merge pull request #9584 from miyazakh/fix_qtfail
Fix qt jenkins nightly test failure
2026-01-08 10:58:20 -08:00
David Garske
133d29dcef Merge pull request #9626 from rizlik/name_contraints_fixes
asn: MatchBaseName fixes
2026-01-08 10:56:53 -08:00
David Garske
f57484d1b3 Merge pull request #9616 from douzzer/20251230-persistent-drbg
20251230-persistent-drbg
2026-01-08 10:54:45 -08:00
David Garske
b609fe28ca Merge pull request #9611 from Frauschi/psk_compile_fix
Fix for PSK compile option
2026-01-08 10:52:57 -08:00
Tobias Frauenschläger
b934d9587a Add Zephyr support for TRACK_MEMORY 2026-01-08 19:27:24 +01:00
David Garske
97d9bfcea6 Merge pull request #9601 from rizlik/early_data_client_side_fixes
check that we are resuming in write_early_data + minor fixes
2026-01-08 10:26:48 -08:00
David Garske
71f3bd4cd3 Merge pull request #9627 from SparkiDev/aarch64_asm_chacha20_256
ChaCha20 Aarch64 ASM fix: 256-bit case fixed
2026-01-08 10:24:48 -08:00
David Garske
d290caa848 Merge pull request #9608 from Frauschi/typo_fix
Fix for WOLFSSL_BLIND_PRIVATE_KEY and WOLFSSL_DUAL_ALG_CERTS
2026-01-08 10:23:30 -08:00
Tobias Frauenschläger
05dc9f0449 Fix memory leak in case of handshake error
Make sure peer dilithium key is properly freed in case the handshakes fails.
2026-01-08 16:50:28 +01:00
Per Allansson
c979f95648 IDE/XCODE: fix file types for asm.S files 2026-01-08 16:47:04 +01:00
Hideki Miyazaki
08876e278a Fix CRL Number hex string buffer overflow in CRL parser 2026-01-08 17:25:19 +09:00
Sean Parkinson
883ceecf8a ChaCha20 Aarch64 ASM fix: 256-bit case fixed
Fixed the 256-bits at a time crypt assembly code.

Add a chunking test for ChaCha20.
2026-01-08 18:01:15 +10:00
Daniel Pouzzner
0059f1647e move WC_RNG_BANK_SUPPORT implementation from wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h to new files wolfcrypt/src/rng_bank.c and wolfssl/wolfcrypt/rng_bank.h;
wolfcrypt/src/rng_bank.c:

  * add wc_local_rng_bank_checkout_for_bankref, wc_BankRef_Release(), wc_rng_bank_new(), and wc_rng_bank_free();

  * in wc_rng_bank_checkin(), take a struct wc_rng_bank_inst **rng_inst and NULL it before return;

  * in wc_rng_bank_init(), add a devId arg, and handle devId in wc_rng_bank_inst_reinit();

  * add WC_RNG_BANK_INST_LOCK_* and use them in wc_rng_bank_checkout() and wc_rng_bank_checkin();

  * fix order of operations in wc_rng_bank_checkout() re DISABLE_VECTOR_REGISTERS();

wolfcrypt/src/random.c:

  * refactor per-instance salting for wc_rng_bank_inst: remove changes in Hash_df(), Hash_DRBG_Instantiate(), and _InitRng(), and in wc_rng_bank_init() and wc_rng_bank_inst_reinit(), use wc_InitRngNonce_ex() and pass the wc_rng_bank_inst pointer as the nonce;

  * simplify the WC_RNG_BANK_SUPPORT variant of wc_RNG_GenerateBlock() -- delegate to wc_local_rng_bank_checkout_for_bankref() and remove supplementary error checking;

  * in wc_FreeRng(), call wc_BankRef_Release() when WC_DRBG_BANKREF, and in wc_BankRef_Release(), fix refcount flub (not wolfSSL_RefFree, rather wolfSSL_RefDec);

  * streamline the WOLFSSL_LINUXKM wc_GenerateSeed();

wolfcrypt/test/test.c: add random_bank_test();

linuxkm/lkcapi_sha_glue.c: use WC_RNG_BANK_INST_TO_RNG() opportunistically;

configure.ac: add --enable-amdrdseed as a synonym for --enable-amdrand;

linuxkm/linuxkm_wc_port.h: when LINUXKM_LKCAPI_REGISTER_HASH_DRBG_DEFAULT, don't include get_random_bytes() in struct wolfssl_linuxkm_pie_redirect_table;

add various comments for clarity.
2026-01-07 22:54:07 -06:00
Daniel Pouzzner
1e0351a69b wolfssl/wolfcrypt/random.h and wolfssl/wolfcrypt/async.h: use #ifdef HAVE_ANONYMOUS_INLINE_AGGREGATES, not #if HAVE_ANONYMOUS_INLINE_AGGREGATES. 2026-01-07 22:54:07 -06:00
Daniel Pouzzner
98ffc519b4 wolfssl/wolfcrypt/types.h: if _MSC_VER, disable HAVE_ANONYMOUS_INLINE_AGGREGATES by default. 2026-01-07 22:54:07 -06:00
Daniel Pouzzner
c1d2828daf wolfcrypt/src/random.c, wolfssl/wolfcrypt/random.h, wolfssl/wolfcrypt/wc_port.h, linuxkm/lkcapi_sha_glue.c: fixes from autotesting:
* refactor to eliminate recursion in wc_RNG_GenerateBlock();
* refactor enum wc_rng_bank_flags as word32 and macros;
* fix -Wconversions, -Wunused, and stray EINVAL in wc_rng_bank_init();
* make struct wc_rng_bank_inst a top-level definition for C++ compat;
* fix several bugprone-macro-parentheses.
2026-01-07 22:54:07 -06:00
Daniel Pouzzner
b87af914bc configure.ac: add handling for --enable-rng-bank, and add it to the all-crypto feature set. 2026-01-07 22:54:07 -06:00
Daniel Pouzzner
b2199e9862 linuxkm/{lkcapi_dh_glue.c,lkcapi_ecdh_glue.c,lkcapi_rsa_glue.c}: use LKCAPI_INITRNG() rather than wc_InitRng(), and remove calls to LKCAPI_INITRNG_FOR_SELFTEST(). also, in km_rsa_ctx_init_rng(), recognize WC_DRBG_BANKREF as a usable RNG status. 2026-01-07 22:54:07 -06:00
Daniel Pouzzner
1c6ef8b621 linuxkm/lkcapi_sha_glue.c:
* refactor to use new wc_rng_bank facility:
  * wc_linuxkm_drbg_init_tfm()
  * wc_linuxkm_drbg_exit_tfm()
  * get_drbg() (renamed to linuxkm_get_drbg())
  * put_drbg() (renamed to linuxkm_put_drbg())
  * wc_linuxkm_drbg_generate()
  * wc_linuxkm_drbg_seed()
  * wc_mix_pool_bytes()
  * wc_crng_reseed()
* add:
  * linuxkm_affinity_lock()
  * linuxkm_affinity_get_id()
  * linuxkm_affinity_unlock()
  * linuxkm_InitRng_DefaultRef()
* remove:
  * get_drbg_n()
  * drbg_init_from()
  * fork_default_rng()
  * LKCAPI_INITRNG_FOR_SELFTEST.
* when LINUXKM_LKCAPI_REGISTER_HASH_DRBG_DEFAULT, define LKCAPI_INITRNG to linuxkm_InitRng_DefaultRef, else define it to wc_InitRng().
2026-01-07 22:54:07 -06:00
Daniel Pouzzner
3c15be6610 wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h: implement WC_RNG_BANK_SUPPORT:
* add WC_DRBG_BANKREF status code;
* add `struct wc_rng_bank *bankref` to struct WC_RNG, and move status slot out from HAVE_HASHDRBG gate;
* add WC_DRBG_MAX_SALT_SZ, and add saltSz and salt slots to struct DRBG_internal;
* add salt handling to Hash_df(), Hash_DRBG_Instantiate(), and _InitRng();
* add types:
  * enum wc_rng_bank_flags
  * struct wc_rng_bank
* add implementations:
  * wc_rng_bank_init()
  * wc_rng_bank_set_affinity_handlers()
  * wc_rng_bank_fini()
  * wc_rng_bank_checkout()
  * wc_rng_bank_checkin()
  * wc_rng_bank_inst_reinit()
  * wc_rng_bank_seed()
  * wc_rng_bank_reseed()
  * wc_InitRng_BankRef()
  * wc_rng_new_bankref()
  * WC_RNG_BANK_INST_TO_RNG()
* in wc_RNG_GenerateBlock() and wc_FreeRng(), add WC_RNG_BANK_SUPPORT sections;

wolfcrypt/src/random.c: in WC_VERBOSE_RNG messages, add "ERROR: " prefixes to text to assure pickup by autotesting.  also fixed line lengths.
2026-01-07 22:54:07 -06:00
Daniel Pouzzner
6c8ff6dfa9 linuxkm/x86_vector_register_glue.c: in wc_save_vector_registers_x86(), don't render warning of call while non-preemptible if WC_SVR_FLAG_INHIBIT was passed in. 2026-01-07 22:54:07 -06:00
Daniel Pouzzner
dd158b073c linuxkm/linuxkm_wc_port.h and linuxkm/module_hooks.c: remove WOLFSSL_DEBUG_BACKTRACE_ERROR_CODES gate around setup for wolfssl_linuxkm_pie_redirect_table.dump_stack.
linuxkm/module_hooks.c: in wc_linuxkm_relax_long_loop(), use cpu_relax() as a fallback when non-preemptible.
2026-01-07 22:54:07 -06:00
Daniel Pouzzner
500c790b18 wolfssl/wolfcrypt/settings.h:
* add FIPS_VERSION_NE();
* move more generic setup code from WOLFSSL_LINUXKM/WOLFSSL_BSDKM to kernel-generic WOLFSSL_KERNEL_MODE; fix WOLFSSL_OLD_PRIME_CHECK setup to exclude FIPS.
2026-01-07 22:54:06 -06:00
Daniel Pouzzner
32b1598db1 wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: in wolfSSL_RefFree() and wolfSSL_RefWithMutexFree(), zero the refcount (valid refcount objects are initialized to count of 1); add wolfSSL_RefCur(). 2026-01-07 22:54:06 -06:00
Daniel Pouzzner
f1dd234ac9 wolfcrypt/src/error.c, wolfssl/wolfcrypt/error-crypt.h: add BUSY_E and ALREADY_E. 2026-01-07 22:54:06 -06:00
Hideki Miyazaki
cdd75ff5ef fix indent 2026-01-08 08:46:22 +09:00
Ruby Martin
6090ddb3f3 initialize hmac_copy
add WC_CALLOC_VAR_EX function, replace WC_ALLOC_VAR_EX in tests
2026-01-07 15:43:16 -07:00
Hideki Miyazaki
6392c2b420 undo changes
fix indentation
2026-01-08 07:10:25 +09:00
David Garske
6264c115cc Merge pull request #9563 from LinuxJedi/renode
Add Renode GH Action for STM32H753
2026-01-07 09:51:30 -08:00
David Garske
5c2c4599ed Merge pull request #9537 from SparkiDev/aarch64_darwin_addr_calc_fix
ARM64 ASM: Darwin specific address calc fix
2026-01-07 09:50:05 -08:00
Marco Oliverio
94dc7ae9ad asn: MatchBaseName fixes 2026-01-07 17:53:43 +01:00
Josh Holtrop
a9b2e83d1c Rust wrapper: add one-shot XChaCha20-Poly1305 encrypt/decrypt functions 2026-01-07 11:43:08 -05:00
David Garske
cf9016b29f Merge pull request #9622 from SparkiDev/rsa_pkcs15_verify_bounds_check
RSA PKCS#1.5 verify: bounds check input
2026-01-07 08:26:24 -08:00
David Garske
84aeeb655f Merge pull request #9580 from SparkiDev/curve25519_smul_improv
Curve25519 improvements
2026-01-07 08:25:41 -08:00
David Garske
19f7b946f5 Merge pull request #9621 from SparkiDev/mlkem_check_pub
MLKEM: check public key when decoding
2026-01-07 08:24:51 -08:00
David Garske
dd8d2a2d4d Merge pull request #9575 from SparkiDev/dilithium_16_bit_fixes
MLDSA/Dilithium: fix 16-bit int issues
2026-01-07 08:24:22 -08:00
David Garske
b5d3c87876 Merge pull request #9603 from SparkiDev/ppc32_sha256_asm_reg
PPC32 ASM: alternative C code with registers prepended
2026-01-07 08:23:55 -08:00
David Garske
315ebf5be6 Merge pull request #9615 from SparkiDev/arm32_aes_block_inline
AES ARM32/Thumb2: option to inline block
2026-01-07 08:21:51 -08:00
Tobias Frauenschläger
87182992b8 Fix for PSK compile option
The derivation of the ResumptionSecret is only necessary in case SessionTickets are enabled.
2026-01-07 16:58:52 +01:00
Marco Oliverio
50b39c91da fixup! (d)tls13: check if early data is possible in write_early_data 2026-01-07 14:30:16 +01:00
Tobias Frauenschläger
b8cb5bee87 Cleanup for DecodePrivateKey() functionality
* Create a new method DecodePrivateKey_ex() that gets the key to decode as parameters
* Adapt DecodePrivateKey() and DecodeAltPrivateKey() to use this new method
* Fix unblinding for TLS 1.3 Dual Algorithm Certificate alternative keys

This removes a lot of nearly duplicate code and simplifies maintenance.
2026-01-07 13:45:11 +01:00
Takashi Kojo
5f68ea087a Merge pull request #9562 from kojiws/sync_ja_doc_rsa
[JA] Sync Japanese RSA Part with English on API Document
2026-01-07 18:18:53 +09:00
Sean Parkinson
80a0f6bb32 RSA PKCS#1.5 verify: bounds check input
As long as NO_RSA_BOUNDS_CHECK is not defined, the input range is
checked for verification.
2026-01-07 17:49:50 +10:00
Sean Parkinson
2a08fbe3ed MLKEM: check public key when decoding
Check that the public key values are less than Q when decoding.
2026-01-07 13:11:15 +10:00
Hideki Miyazaki
c6dd1a745e boundary check 2026-01-07 09:19:43 +09:00
Hideki Miyazaki
c923c4c026 fix compile error 2026-01-07 07:16:28 +09:00
Hideki Miyazaki
30fe079763 Addressed review comments 2026-01-07 06:55:22 +09:00
Hideki Miyazaki
10d3e251fd fix qt jenkins nightly test failure 2026-01-07 06:55:22 +09:00
Sean Parkinson
eab58ae226 Merge pull request #9599 from holtrop-wolfssl/rust-chacha20-poly1305
Rust wrapper: add wolfssl_wolfcrypt::chacha20_poly1305 module
2026-01-06 20:28:24 +10:00
Sean Parkinson
b293a1cc5c Merge pull request #9591 from rlm2002/coverity
20251229 Coverity Dereference before Null check
2026-01-06 20:25:01 +10:00
Sean Parkinson
5343cb386a Merge pull request #9588 from kareem-wolfssl/ghAlerts
Fix incorrect alerts.
2026-01-06 20:22:51 +10:00
Sean Parkinson
a1089ba9f2 AES ARM32/Thumb2: option to inline block
Branching to a common block encrypt/decrypt may work for assembly but
not always for C code.
Added option, for assembly and inline assembly, to inline block
encrypt/decrypt: WOLFSSL_ARMASM_AES_BLOCK_INLINE.
2026-01-06 11:24:21 +10:00
Sean Parkinson
38241227a2 Curve25519 improvements
Add non-constant time implemenations of mod_inv for x64 and Aarch64
assembly.

Generate base point table, with better formatting, for double smul with
a script.
Increase Bi table size to 32 entries for 64-bit asm.
Minor improvements to double smul.

WOLFSSL_CURVE25519_NOT_USE_ED25519 to not use ed25519 base smul in
curve25519 base smul.
2026-01-06 10:24:21 +10:00
Daniel Pouzzner
83f7204f99 Merge pull request #9597 from sameehj/rhel9_linuxkm_sign
linuxkm: handle RHEL9 disabled akcipher sign/decrypt ops
2026-01-05 17:23:45 -06:00
Sean Parkinson
a20d5f7b9d Merge pull request #9613 from philljj/fix_ecc_test_name
wolfcrypt test: fix ecc521 err msg.
2026-01-06 08:49:01 +10:00
jordan
842511b0ef wolfcrypt test: fix ecc521 err msg. 2026-01-05 12:25:53 -06:00
Sameeh Jubran
d27c04bbca linuxkm: handle RHEL9 disabled akcipher sign/decrypt ops
RHEL9 kernels (9.6+) disable RSA signing and decryption in the kernel
crypto API for security reasons (CVE-2023-6240). The kernel forcibly
overwrites akcipher sign/decrypt callbacks to return -ENOSYS, regardless
of what the driver provides.

Commit 3709c35c in the RHEL kernel:
"crypto: akcipher - Disable signing and decryption"

This affects our self-tests which call crypto_akcipher_sign() and
crypto_akcipher_decrypt(). On RHEL9, these operations return -ENOSYS
even though our driver correctly implements them.

Add compile-time checks for RHEL_RELEASE_CODE >= 9.6 to detect this
scenario and skip the affected self-tests gracefully. The tests pass
since the algorithms are registered correctly; the kernel simply
refuses to execute sign/decrypt operations as a matter of policy.

Note: encrypt and verify operations are unaffected and continue to be
tested normally.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-01-05 19:42:29 +02:00
Tobias Frauenschläger
116260762f Fix for WOLFSSL_BLIND_PRIVATE_KEY and WOLFSSL_DUAL_ALG_CERTS 2026-01-05 17:26:11 +01:00
Tobias Frauenschläger
62764d08e4 Remove PQC-based buffer size increase for PreMasterSecret
The size of the PreMasterSecret buffer is based on the ENCRYPT_LEN
constant, which has been increased to 5kB for PQC support (Dilithium and
Falcon, as their signatures are that large).

However, only in the TLS 1.2 case, the PreMasterSecret buffer is used to
store signatures. In the TLS 1.3 path, only actual symmetric secrets are
stored in that buffer, which are much smaller in size (the "old" size of
the constant without the PQC increase).

As PQC is only allowed in TLS 1.3 and NOT in TLS 1.2, we can revert
that size increase, saving around 4,5kB of dynamic memory during the
handshake.
2026-01-05 15:58:53 +01:00
Tobias Frauenschläger
99bde324aa Build systems improvements
* Add `WOLFSSL_USER_SETTINGS` to CMake `options.h.in`
* Add CMake support for Dilithium
* Add user_settings.h support for aes_asm.S
* Add PKCS#11 support to CMake
* Minor ARM assembly port fixes
2026-01-05 15:46:58 +01:00
Josh Holtrop
9007d12d2a Rust wrapper: add wolfssl_wolfcrypt::chacha20_poly1305 module 2026-01-05 08:44:34 -05:00
Andrew Hutchings
4b606ebbeb Fix trailing whitespace and flush-left 2026-01-05 13:39:43 +00:00
Andrew Hutchings
0c4ca257a0 Add Renode GH Action for STM32H753
This adds bare metal wolfCrypt test with hardware RNG and AES-GCM for
STM32H753 using Renode.

Renode does not support HASH HAL at this time.
2026-01-05 13:39:43 +00:00
Sean Parkinson
99692003d4 PPC32 ASM: alternative C code with registers prepended
C implementation with registers prepended with letter 'r'.
2026-01-05 21:12:10 +10:00
Marco Oliverio
7b9d3748cf tls13: early_data: prevent earlyData reset on re-entry
Avoid resetting ssl->earlyData in wolfSSL_write_early_data when the
function is re-entered due to WC_PENDING_E, WANT_WRITE, or WANT_READ.
2026-01-05 10:40:34 +01:00
Marco Oliverio
29941d5645 (d)tls13: check if early data is possible in write_early_data 2026-01-05 10:35:02 +01:00
Marco Oliverio
d9bba72b8c tls13: merge guarded code in a single section 2026-01-05 09:04:36 +01:00
David Garske
80c1228a38 Merge pull request #9594 from holtrop-wolfssl/rust-curve25519
Rust wrapper: add wolfssl_wolfcrypt::curve25519 module
2025-12-31 12:45:43 -08:00
Daniel Pouzzner
bbd3d4f55d Merge pull request #9579 from dgarske/coding_standard_20251223
Add new coding standard for local (internal) function names
2025-12-31 11:55:58 -06:00
philljj
776512846f Merge pull request #9598 from fabiankeil/unbreak-freebsd-build
tests: Unbreak the build on FreeBSD-based systems
2025-12-31 10:31:52 -06:00
Fabian Keil
21f35137a1 tests: Unbreak the build on FreeBSD-based systems
... by using the same additional includes as on Linux.

Fixes:

      CC       tests/api/unit_test-test_rsa.o
    tests/api.c:19554:9: error: call to undeclared function 'waitpid'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
     19554 |         waitpid(pid, &waitstatus, 0);
	   |         ^

Tested on ElectroBSD amd64 14.3-STABLE.
2025-12-31 14:48:06 +01:00
Daniel Pouzzner
cb78341886 Merge pull request #7586 from kareem-wolfssl/gh7197
Keep RNG seed file descriptor open until the RNG is freed.
2025-12-30 15:57:25 -06:00
philljj
5fa06818c0 Merge pull request #9595 from douzzer/20251229-linuxkm-rng-wolfentropy
20251229-linuxkm-rng-wolfentropy
2025-12-30 14:50:53 -06:00
Kareem
ddb2fb628e Add a runtime option to enable or disable the secure renegotation check. 2025-12-30 13:19:04 -07:00
Kareem
1773a4ab41 Send no_renegotiation alert when rejecting renegotation attempt as defined in RFC 5246 section 7.2.2. 2025-12-30 13:18:48 -07:00
Daniel Pouzzner
0621615b15 wolfcrypt/src/random.c: remove WC_VERBOSE_RNG messaging from wc_RNG_TestSeed(), which is called by test code with expected failure, and move it to _InitRng() and PollAndReSeed(), where it's always expected to succeed. 2025-12-30 13:27:31 -06:00
Daniel Pouzzner
299ca1cfef fixes from peer review: added comments for clarity, and remove errant condition added in _InitRng(). 2025-12-30 12:13:15 -06:00
JacobBarthelmeh
7a2e1c1dd0 Merge pull request #9585 from dgarske/add-missing-api-docs
Add missing API documentation
2025-12-30 09:37:22 -07:00
Josh Holtrop
8c125df85e Rust wrapper: ensure curve25519_key struct will have free called after init 2025-12-30 10:46:44 -05:00
Daniel Pouzzner
d504baaf3a linuxkm/lkcapi_sha_glue.c and .wolfssl_known_macro_extras: fixes from check-source-text. 2025-12-29 20:55:36 -06:00
Daniel Pouzzner
450b0b46c6 wolfcrypt/src/random.c and wolfssl/wolfcrypt/settings.h: add WC_VERBOSE_RNG messages, and activate by default when WOLFSSL_KERNEL_MODE. 2025-12-29 20:55:36 -06:00
Daniel Pouzzner
fecc1cffe7 linuxkm/lkcapi_sha_glue.c: add retry loop around wc_InitRng(), and allow interrupt in preemptible threads, in wc_linuxkm_drbg_init_tfm(). 2025-12-29 20:55:36 -06:00
Daniel Pouzzner
1844b8e3ac linuxkm/Makefile: fix bash cleanup in recipe for libwolfssl.ko -- new trap for an event replaces previous trap rather than adding to it. 2025-12-29 20:55:36 -06:00
David Garske
d39b0e6f82 Fixes from peer review. 2025-12-29 17:30:23 -08:00
David Garske
0d44018627 Merge pull request #9593 from julek-wolfssl/copilot/changes-20251229
Add AGENTS.md to .gitignore
2025-12-29 17:22:39 -08:00
Anthony Hu
48ebe99372 Validate asn date based on position of Z (#8603) 2025-12-29 16:01:22 -06:00
Josh Holtrop
e971cb6942 Rust wrapper: avoid warning when neither blake2b nor blake2s is enabled 2025-12-29 14:33:25 -05:00
Josh Holtrop
0a834bed7a Rust wrapper: add wolfssl_wolfcrypt::curve25519 module 2025-12-29 14:33:25 -05:00
Juliusz Sosinowicz
730b0d3e38 Add AGENTS.md to .gitignore 2025-12-29 19:01:50 +01:00
David Garske
5dee8ddfcb Merge pull request #9586 from holtrop-wolfssl/rust-blake2
Rust wrapper: add wolfssl_wolfcrypt::blake2 module
2025-12-29 09:55:58 -08:00
Ruby Martin
39056bb262 move null check to prevent dereference before null check issue
add new scope, whitespace
2025-12-29 10:55:13 -07:00
David Garske
ea8af7ae71 Merge pull request #9592 from julek-wolfssl/fix/coverity-tls-frag
Fix Coverity (D)TLS fragmentation size checks
2025-12-29 09:54:32 -08:00
David Garske
17e992ab3f Merge pull request #9589 from douzzer/20251226-fixes
20251226-fixes
2025-12-29 09:20:16 -08:00
David Garske
8bcac03086 Fix duplicated wc_rng_free and wc_rng_new 2025-12-29 08:52:17 -08:00
David Garske
5b5686c53c Peer review improvements. 2025-12-29 08:37:51 -08:00
Juliusz Sosinowicz
f2d24404c8 Fix Coverity (D)TLS fragmentation size checks
Add MAX_RECORD_SIZE-based bounds checks in SendHandshakeMsg and Dtls13SendFragmentedInternal to prevent negative/overflowed fragment sizes from reaching memcpy/BuildMessage/DtlsMsgPoolSave.
2025-12-29 17:16:04 +01:00
jordan
b33a8568c3 bsdkm: small cleanup. 2025-12-28 10:32:18 -06:00
jordan
e4996c317e bsdkm: fips support. 2025-12-28 10:16:53 -06:00
Daniel Pouzzner
7bbd28d369 wolfcrypt/src/aes.c: fix clang-diagnostic-unreachable-code in AesSetKey_C(). 2025-12-26 18:13:44 -06:00
Daniel Pouzzner
283792c207 linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_startup(), deinstall the callbacks and stdrng first before checking refcnt. 2025-12-26 16:41:43 -06:00
Kareem
7d04a53a6c Update X509_get_default_cert_* stubs to return empty strings.
According to the documentation, these functions must return static strings, so NULL was not valid.

Fixes #6474.
2025-12-26 15:26:05 -07:00
Kareem
6145f3aba2 Fix incorrect alert being sent when wolfSSL receives unexpected PSK extension.
Fixes #9503.
2025-12-26 15:24:14 -07:00
Kareem
a7b83b06c1 Alert on out of order message with unexpected_message.
Fixes #9531.
2025-12-26 15:23:23 -07:00
Daniel Pouzzner
3b3ddd1fb4 wolfcrypt/src/random.c: in wc_GenerateSeed(), move the gate closures for !FORCE_FAILURE_RDSEED and !ENTROPY_MEMUSE_FORCE_FAILURE to follow the /dev/urandom fallback method. 2025-12-26 14:16:11 -06:00
Kareem
17b6ce7b7b Add parenthesis around XBADFD. 2025-12-26 12:38:54 -07:00
Kareem
d09b5ee1f1 Add duplicate entry error to distinguish cases where a duplicate CRL is rejected. 2025-12-26 12:02:35 -07:00
Daniel Pouzzner
b487287abf wolfcrypt/benchmark/benchmark.c: smallstack refactor of bench_mlkem_encap() 2025-12-26 12:45:26 -06:00
Josh Holtrop
bbac280890 Rust wrapper: add wolfssl_wolfcrypt::blake2 module 2025-12-26 13:02:27 -05:00
David Garske
77d9410aa0 Add missing API documentation for Doxygen:
This PR adds Doxygen documentation for native wolfSSL API functions that were previously undocumented. It includes documentation notes for APIs gated on specific preprocessor macros:

- WOLF_PRIVATE_KEY_ID: _Id and _Label init helpers (wc_AesInit_Id, wc_AesInit_Label, wc_ecc_init_id, wc_ecc_init_label, wc_InitRsaKey_Id, wc_InitRsaKey_Label) require this for PKCS11 support

- WC_NO_CONSTRUCTORS: New/Delete constructor functions (wc_AesNew/Delete, wc_curve25519_new/delete, wc_ed25519_new/delete, wc_NewRsaKey/DeleteRsaKey) are only available when this is not defined. WC_NO_CONSTRUCTORS is automatically defined when WOLFSSL_NO_MALLOC is defined.

- WOLFSSL_PUBLIC_ASN: ASN functions marked with WOLFSSL_ASN_API include  notes indicating they are not public by default

- WOLFSSL_DUAL_ALG_CERTS: wc_GeneratePreTBS and wc_MakeSigWithBitStr for Post-Quantum dual algorithm certificate signing

The New/Delete functions are documented as being exposed to support allocation of structures using dynamic memory to provide better ABI compatibility.
2025-12-26 08:41:56 -08:00
David Garske
73ee89a2fc Improve no-void-functions rule 2025-12-26 08:06:37 -08:00
David Garske
e70e7cb144 Merge pull request #9583 from kareem-wolfssl/gh8152_2
Update CMake logic to allow WOLFSSL_SYS_CA_CERTS without filesystem support on Windows/Mac.
2025-12-26 07:48:43 -08:00
David Garske
1744c11686 Merge pull request #9570 from kareem-wolfssl/variousFixes
Add SSL_get_rfd and SSL_get_wfd.  Various documentation updates.
2025-12-26 07:47:17 -08:00
David Garske
c3e65153cc Improve the Devin lifeguard coding standard rules 2025-12-26 07:39:37 -08:00
David Garske
48d6811e04 Merge pull request #9582 from douzzer/20251224-wc_GenerateSeed-unreachable-code
20251224-wc_GenerateSeed-unreachable-code
2025-12-26 07:38:07 -08:00
Koji Takeda
51d49658d4 Update Japanese RSA API document 2025-12-26 09:16:33 +09:00
Kareem
0a02f5ef6b Code review feedback 2025-12-24 17:12:40 -07:00
Kareem
496d124736 Merge remote-tracking branch 'upstream/master' into gh7197 2025-12-24 17:05:04 -07:00
Kareem
f98229554b Update CMake logic to allow WOLFSSL_SYS_CA_CERTS without filesystem support on Windows/Mac. 2025-12-24 17:02:25 -07:00
Daniel Pouzzner
f4f4c7cfae src/ssl.c: fix clang-analyzer-deadcode.DeadStores in check_cert_key(). 2025-12-24 17:49:33 -06:00
Daniel Pouzzner
a944575e4b wolfcrypt/src/random.c: fix clang-diagnostic-unreachable-code in wc_GenerateSeed(). 2025-12-24 17:48:37 -06:00
Takashi Kojo
ff14797c3a Merge pull request #9552 from tamasan238/pr9458
[JA] Fix issues with the API documentation
2025-12-25 08:28:21 +09:00
Daniel Pouzzner
019a420187 Merge pull request #9568 from kareem-wolfssl/zd20947
Add a flag which allows requesting exactly SEED_SZ and using the full seed to instantiate the DRBG during RNG init.
2025-12-24 17:03:26 -06:00
Takashi Kojo
09ce46e2d5 Merge pull request #9581 from tamasan238/pr9578
[JA] Correct the API docs for wolfSSL_write_early_data()
2025-12-25 07:34:57 +09:00
Masaki I.
ee8fcf9d36 [JA] Correct the API docs for wolfSSL_write_early_data() 2025-12-24 14:53:10 +09:00
David Garske
2354ea196b Merge pull request #9513 from rizlik/dtls_header_fix
fix DTLS header headroom accounting
2025-12-23 17:20:12 -08:00
David Garske
0fae0a7ba6 Merge pull request #9397 from rizlik/earlydata_want_write_fixes
wolfssl: preserve early-data handling across WANT_WRITE retries
2025-12-23 17:19:39 -08:00
David Garske
d885749c09 Merge pull request #9561 from miyazakh/renesas_ssp_upgrade
add Renesas SK-S7G2 support
2025-12-23 15:15:45 -08:00
David Garske
57ef8a7caf Merge pull request #9574 from anhu/dtls_guard
Guard a bit of DTLS code.
2025-12-23 15:03:46 -08:00
David Garske
18176392fa Merge pull request #9576 from douzzer/20251222-linuxkm-PK-initrng-optimize
20251222-linuxkm-PK-initrng-optimize
2025-12-23 15:02:53 -08:00
Marco Oliverio
149bf19b4c split overlong line 2025-12-23 23:41:52 +01:00
Marco Oliverio
2e63845531 use wolfssl_local as local functions prefix 2025-12-23 23:39:07 +01:00
David Garske
96e2e80108 Add new coding standard for local (internal) function names. 2025-12-23 14:32:08 -08:00
Marco Oliverio
bafb8e56d5 use wolfssl_local_ as local functions prefix 2025-12-23 23:32:08 +01:00
Kareem
06d8f69dac Separate new /dev/urandom opening logic into a new section in wc_GenerateSeed. 2025-12-23 14:52:52 -07:00
Kareem
cb81cc8ce6 Merge remote-tracking branch 'upstream/master' into gh7197 2025-12-23 14:43:57 -07:00
Hideki Miyazaki
ba63d81441 add .gitignore to include.am 2025-12-24 06:36:08 +09:00
Hideki Miyazaki
75fad16f20 addressed code review comments 2025-12-24 05:59:09 +09:00
Anthony Hu
40327b7fe3 Binary consts to hexidecimal. C2X feature. 2025-12-23 14:45:36 -05:00
Daniel Pouzzner
b66f1b78a7 peer/Devin review:
* in get_crypto_default_rng() (linuxkm/lkcapi_sha_glue.c), sanity check that crypto_default_rng isn't null;
* in wc_InitRsaKey_ex(), remove frivolous NULL/zero assignments (XMEMSET clears them implicitly);
* in wc_CheckRsaKey(), check ret from wc_InitRng() and short circuit return if failed.
2025-12-23 13:05:40 -06:00
Daniel Pouzzner
da4fc4921e tests/api/test_ed25519.c: in test_wc_Ed25519PublicKeyToDer(), on old FIPS, tolerate old error code from wc_Ed25519PublicKeyToDer(). 2025-12-23 12:25:10 -06:00
Daniel Pouzzner
cd88a8ae88 peer review -- add !WC_NO_RNG gates around WC_RNG changes in wolfcrypt/src/rsa.c and wolfssl/wolfcrypt/rsa.h. 2025-12-23 11:41:59 -06:00
David Garske
d36bfabe18 Merge pull request #9560 from JacobBarthelmeh/clang
fix for shadows global declaration warning
2025-12-23 08:54:50 -08:00
David Garske
9de98cee73 Merge pull request #9569 from kareem-wolfssl/gh8152
Only enforce !NO_FILESYSTEM for WOLFSSL_SYS_CA_CERTS on non Windows/Mac systems.
2025-12-23 08:53:51 -08:00
Anthony Hu
c03c2dd541 Add tests 2025-12-23 11:48:57 -05:00
David Garske
70165c517b Merge pull request #9571 from mattia-moffa/20251222-sniffer-uint-underflow-vuln
Add missing length check in sniffer for AES-GCM/AES-CCM/ARIA-GCM
2025-12-23 08:37:50 -08:00
David Garske
776b31267c Merge pull request #9466 from SparkiDev/tls13_pt_alert_when_enc
TLS 1.3, plaintext alert: ignore when expecting encrypted
2025-12-23 08:37:00 -08:00
David Garske
86808b8a9b Merge pull request #9578 from anhu/early_data_doc
Correct the API docs for wolfSSL_write_early_data()
2025-12-23 08:14:10 -08:00
David Garske
8f089cdcfe Merge pull request #9508 from SparkiDev/ppc32_sha256_asm_pic
PPC32 SHA-256 ASM: support compiling for PIC
2025-12-23 08:12:50 -08:00
Anthony Hu
0b5e9c76ed Correct the API docs for wolfSSL_write_early_data() 2025-12-23 10:08:02 -05:00
Daniel Pouzzner
b087533fdf linuxkm/lkcapi_sha_glue.c:
* add drbg_init_from() and fork_default_rng(), and
* use the latter to define LKCAPI_INITRNG_FOR_SELFTEST() opportunistically (with fallback to plain wc_InitRng());

linuxkm/lkcapi_rsa_glue.c:
* add km_rsa_ctx_init_rng(),
* remove wc_InitRng() from km_rsa_ctx_init(),
* remove the WC_RSA_BLINDING gates around calls to wc_RsaSetRNG(), and
* call km_rsa_ctx_init_rng() before each call that needs an initialized RNG;

linuxkm/lkcapi_dh_glue.c and linuxkm/lkcapi_ecdh_glue.c: in km_ffdhe_init() and km_ecdh_init(), if linuxkm_lkcapi_registering_now, use LKCAPI_INITRNG_FOR_SELFTEST() to initialize ctx->rng;

linuxkm/lkcapi_glue.c: add notes that lkcapi_sha_glue inclusion and registrations must precede PK, and move declaration of linuxkm_lkcapi_registering_now to precede lkcapi glue inclusions.
2025-12-22 22:58:29 -06:00
Daniel Pouzzner
5030484bcf wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h:
* add WC_DRBG_{NOT_INIT,OK,FAILED,CONT_FAILED} in public header file, and
* move setup for RNG_SECURITY_STRENGTH, ENTROPY_SCALE_FACTOR, SEED_BLOCK_SZ, SEED_SZ, MAX_SEED_SZ, and RNG_HEALTH_TEST_CHECK_SIZE from random.c to random.h, with public WC_DRBG_SEED_SZ and WC_DRBG_MAX_SEED_SZ.
2025-12-22 22:58:29 -06:00
Daniel Pouzzner
b2ef89b2db wolfcrypt/src/rsa.c and wolfssl/wolfcrypt/rsa.h: make RsaKey.rng and wc_RsaSetRNG() available unconditionally, rather than only if WC_RSA_BLINDING, for use by wc_CheckRsaKey(). 2025-12-22 22:58:29 -06:00
Sean Parkinson
21c86682e0 MLDSA/Dilithium: fix 16-bit int issues
Need to cast byte or number to ensure it is large enough to shift left
by required value.
2025-12-23 09:51:38 +10:00
Sean Parkinson
b766f11e7b TLS 1.3, plaintext alert: ignore when expecting encrypted
In TLS 1.3, ignore valid unencrypted alerts that appear after encryption
has started.
Only ignore WOLFSSL_ALERT_COUNT_MAX-1 alerts.
2025-12-23 09:09:06 +10:00
Sean Parkinson
59f84355a5 Merge pull request #9573 from night1rider/aes-free-callbacks
Aes Free callback support
2025-12-23 08:47:05 +10:00
Sean Parkinson
c8f2cc5b43 Merge pull request #9566 from dgarske/ca_skid_cert_akid
Added build option to allow certificate CA matching using AKID with signers SKDI
2025-12-23 08:40:14 +10:00
Anthony Hu
cb2a80bf53 Guard a bit of DTLS code. 2025-12-22 17:05:47 -05:00
night1rider
afbc65a6c3 Aes Free callback support 2025-12-22 12:39:41 -07:00
Kareem
8de470b436 Add new WOLFSSL_RNG_USE_FULL_SEED macro to known macros. 2025-12-22 11:49:27 -07:00
Kareem
fe45b74921 Add trailing newline back to ssl.h. 2025-12-22 11:45:25 -07:00
Mattia Moffa
ca78994298 Add missing length check in sniffer for AES-GCM/AES-CCM/ARIA-GCM 2025-12-22 16:13:27 +01:00
Marco Oliverio
29d8fa7cb6 tls13: fix indentation alignment 2025-12-22 13:45:34 +01:00
Marco Oliverio
540fae80ab test_dtls: test payload split when WOLFSSL_NO_DTLS_SIZE_CHECK 2025-12-22 13:41:33 +01:00
Marco Oliverio
8cbc4047df internal: rename to use wolfssl internal prefix 2025-12-22 13:41:33 +01:00
Marco Oliverio
aa4fb5d3e5 internal: GetMaxPlainTextSize: precise pad size when adjusting for MTU 2025-12-22 13:41:33 +01:00
Marco Oliverio
1200efdeb3 internal: GetRecordSize: precise header computation on fallback path 2025-12-22 13:41:33 +01:00
Marco Oliverio
75e7d5e9bd fix: split message > MTU on WOLFSSL_NO_DTLS_SIZE_CHECK 2025-12-22 12:49:31 +01:00
Sean Parkinson
da06e1aeea Merge pull request #9558 from kareem-wolfssl/zd20944_2
Move Curve25519 public key check to make_pub/make_pub_blind to cover the case where they are called directly by an application.
2025-12-22 19:38:42 +10:00
Sean Parkinson
7a326ef43f Merge pull request #9553 from julek-wolfssl/ed25519-export-key-check
ed25519: validate presence of keys in export functions
2025-12-22 19:31:14 +10:00
Marco Oliverio
14b124769a use wolfssl internal prefix for MaybeCheckAlertOnErr 2025-12-22 10:04:50 +01:00
Marco Oliverio
12c2cdafaf rename wolfSSL_MaybeCheckAlertOnErr in wolfMaybeCheckAlertOnErr 2025-12-22 09:51:06 +01:00
Marco Oliverio
f4c48c19c1 fix: abide unused arguments when WOLFSSL_CHECK_ALER_ON_ERR is disabled 2025-12-22 09:51:06 +01:00
Marco Oliverio
38d8eb6f0d address reviewer's comments 2025-12-22 09:51:06 +01:00
Marco Oliverio
950c074c25 test: fix typo in structure field 2025-12-22 09:51:06 +01:00
Marco Oliverio
8de68decd2 test: tls13_early_data: test WANT_WRITE in early data 2025-12-22 09:51:06 +01:00
Marco Oliverio
609e30a69c test: tls13_early_data: refactor splitEarlyData test option 2025-12-22 09:51:06 +01:00
Marco Oliverio
57282140a9 WOLFSSL_CHECK_ALERT_ON_ERR: ignore non fatal errors 2025-12-22 09:51:06 +01:00
Marco Oliverio
093d77727b early_data: avoid resetting ssl->earlyData after WANT_WRITE retry 2025-12-22 09:51:06 +01:00
Marco Oliverio
a1c8790039 wolfssl: preserve early-data handling across WANT_WRITE retries
The early-data logic setups "early" exits in Accept/Connect state machine so
that the data exchanged during the handshake can be delivered to the
caller.

After the caller process the data, it usually calls Accept/Connect again
to cotinue the handshake.

Under non-blocking I/O there is the chance that these early exits are
skipped, this commit fixes that.

Server-side accept (TLS 1.3/DTLS 1.3) could skip the early-data shortcut
whenever sending the Finished flight first hit WANT_WRITE: when Accept
is called again and the data is eventually flushed into the I/O layer
the accept state is advanced past TLS13_ACCEPT_FINISHED_SENT, so the
next wolfSSL_accept() call skipped the block that marks
SERVER_FINISHED_COMPLETE and lets the application drain 0-RTT data. By
keeping the FALL_THROUGH into TLS13_ACCEPT_FINISHED_SENT and only
returning early while that handshake flag is still unset, we revisit the
shortcut immediately after the buffered flight is delivered, preserving
the intentional behaviour even under non-blocking I/O.

On the client, the same pattern showed up after SendTls13ClientHello()
buffered due to WANT_WRITE: after flushing, the connect state is already
CLIENT_HELLO_SENT so the early-data exit is no longer executed. We now
fall through into the CLIENT_HELLO_SENT case and only short-circuit once
per handshake, ensuring the reply-processing loop still executes on the
retry.
2025-12-22 09:51:05 +01:00
Hideki Miyazaki
fc583d068f add SK-S7G2 support
Update README based on copilot suggestion
2025-12-20 10:32:09 +09:00
Kareem
adf38007f4 Document wolfSSL_CTX_New's behavior on failure around WOLFSSL_METHOD.
Fixes #9517.
2025-12-19 17:19:45 -07:00
Kareem
ac98505204 Document wolfSSL_CTX_set_default_passwd_cb and wolfSSL_CTX_set_default_passwd_cb_userdata.
Fixes #6008.
2025-12-19 17:18:45 -07:00
Kareem
7c4feb5e87 Improve the error message returned by BAD_KEY_SHARE_DATA.
Fixes #9084.
2025-12-19 17:17:33 -07:00
Kareem
5b473f6b9b Add SSL_get_rfd and SSL_get_wfd.
Fixes https://github.com/wolfSSL/wolfssl-nginx/issues/25.
2025-12-19 17:16:35 -07:00
Kareem
b6766106c8 Add documentation for Base16_Encode and Base64_Encode's behavior of adding a NULL terminator byte.
Fixes #5602
2025-12-19 17:15:44 -07:00
Kareem
a1999d29ed Only enforce !NO_FILESYSTEM for WOLFSSL_SYS_CA_CERTS on non Windows/Mac systems.
wolfSSL's support for WOLFSSL_SYS_CA_CERTS uses APIs which don't depend on !NO_FILESYSTEM
on Windows/Mac.

Fixes #8152.
2025-12-19 16:37:50 -07:00
JacobBarthelmeh
0a0c43054f Merge pull request #9564 from douzzer/20251219-fixes
20251219-fixes
2025-12-19 16:24:20 -07:00
Kareem
3e59b83727 Only keep /dev/urandom open, close /dev/random after each use.
Improve logic for opening RNG seed FD.
2025-12-19 15:57:49 -07:00
Kareem
fe105d4b48 Add a flag which allows requesting exactly SEED_SZ and using the full seed to instantiate the DRBG during RNG init.
This flag can not be used with FIPS.
2025-12-19 15:25:15 -07:00
David Garske
1cb2231ff5 Added build option to allow certificate CA matching using AKID with signers SKID ( WOLFSSL_ALLOW_AKID_SKID_MATCH). Fixed issue with cert->extAuthKeyIdSz not being set with ASN template code. 2025-12-19 14:14:39 -08:00
Daniel Pouzzner
a7550346dd wolfcrypt/test/test.c: in rng_seed_test(), fix gates for FIPS 5.2.4. 2025-12-19 15:50:27 -06:00
Daniel Pouzzner
d3f74557fe wolfcrypt/src/wolfentropy.c: add volatile attribute to entropy_memuse_initialized declaration; in wc_Entropy_Get(), if HAVE_FIPS, call Entropy_Init() if necessary, to accommodate FIPS KATs; in Entropy_Init(), add thread safety. 2025-12-19 15:45:17 -06:00
JacobBarthelmeh
d5723d0d89 Merge pull request #9544 from julek-wolfssl/gh/9362
Check KeyShare after HRR
2025-12-19 14:36:31 -07:00
David Garske
1825bd86f5 Merge pull request #9550 from JacobBarthelmeh/caam
sanity checks on buffer size with AES and CAAM Integrity use
2025-12-19 11:03:40 -08:00
JacobBarthelmeh
d26c11c626 Merge pull request #9551 from josepho0918/iar
Add IAR support to WC_OFFSETOF macro
2025-12-19 11:36:33 -07:00
JacobBarthelmeh
8153ea6189 Merge pull request #9559 from cconlon/pkcs7SignedNonOctet
Fix PKCS#7 SignedData parsing for non-OCTET_STRING content types
2025-12-19 11:12:06 -07:00
Daniel Pouzzner
6f95a9c58e wolfcrypt/src/random.c: in _InitRng(), remove "drbg_instantiated" conditional cleanup logic (Coverity true-benign-positive: DEADCODE because drbg_instantiated is always false when ret != DRBG_SUCCESS). 2025-12-19 10:30:14 -06:00
Daniel Pouzzner
fb26b2dfe1 wolfcrypt/test/test.c: in HMAC tests, initialize ret, to silence uninitvar from cppcheck-force-source. 2025-12-19 09:07:14 -06:00
Daniel Pouzzner
96c47cd18c wolfcrypt/test/test.c: in _rng_test(), inhibit the WC_RESEED_INTERVAL subtest if an rng callback is installed. 2025-12-19 08:55:35 -06:00
Juliusz Sosinowicz
dd35f10b57 ed25519: validate presence of keys in export functions 2025-12-19 10:14:26 +01:00
JacobBarthelmeh
a3072c7a8d fix for shadows global declaration warning 2025-12-18 17:18:39 -07:00
Chris Conlon
afe82b9512 Fix PKCS#7 degenerate detection based on signerInfos length 2025-12-18 16:28:03 -07:00
Chris Conlon
d6dcd30736 Fix PKCS#7 streaming for non OCTET STRING content types 2025-12-18 16:28:01 -07:00
JacobBarthelmeh
bbc3a72ea8 Merge pull request #9556 from julek-wolfssl/rng-tools-timeout-fix
rng-tools: increase jitter timeout
2025-12-18 15:59:42 -07:00
Kareem
b0b840aa0f Rename fdOpen to seedFdOpen to avoid potential conflicts.
Gate keeping the seed FD open behind WOLFSSL_KEEP_RNG_SEED_FD_OPEN and only
enable by default for HAProxy.  It is causing issues on OS X and may
cause issues on other OSes, and is generally a major behavior change.
2025-12-18 15:55:35 -07:00
Kareem
c238defe23 Add cast for public_size 2025-12-18 15:32:59 -07:00
Kareem
755097d512 Track if RNG seed FD was opened and only close it if it was already open. This fixes the case where wc_FreeRng is called when _InitRng was not called on the RNG. Since the FD value defaults to 0 before _InitRng was called, and 0 is potentially a valid FD, it was being closed. 2025-12-18 15:27:00 -07:00
JacobBarthelmeh
4162f24434 Merge pull request #9555 from embhorn/zd20964
Null deref check in Pkcs11ECDH
2025-12-18 15:14:35 -07:00
Chris Conlon
5eef52c6fa Add test for PKCS#7 SignedData with non-OCTET_STRING content 2025-12-18 15:02:02 -07:00
Kareem
81d32f4fe6 Move Curve25519 public key check to make_pub/make_pub_blind to cover the case where they are called directly by an application. 2025-12-18 14:37:59 -07:00
David Garske
4e96b11cce Merge pull request #9557 from douzzer/20251218-fixes
20251218-fixes
2025-12-18 12:35:44 -08:00
Kareem
0420c942a0 Only use -1 for uninitialized fds as 0 is a valid fd. 2025-12-18 11:22:22 -07:00
Kareem
2e83b97909 Only attempt to close RNG file descriptor on platforms with XCLOSE. 2025-12-18 11:15:33 -07:00
Kareem
fb880e943b Reset fd after closing it. 2025-12-18 11:15:33 -07:00
Kareem
6bcbfec200 Initalize RNG seed fd in _InitRng. 2025-12-18 11:15:33 -07:00
Kareem
ea43bcba72 Keep RNG seed file descriptor open until the RNG is freed. 2025-12-18 11:15:33 -07:00
Daniel Pouzzner
8a8ef3512e src/internal.c: in FreeSSL_Ctx(), use wolfSSL_RefWithMutexFree(&ctx->ref), matching refactor in #8187. 2025-12-18 11:48:31 -06:00
Juliusz Sosinowicz
4e15ccec35 rng-tools: increase jitter timeout 2025-12-18 18:40:54 +01:00
Daniel Pouzzner
83e9a0780f wolfcrypt/src/wc_lms.c: fix leak in wc_LmsKey_Reload(). 2025-12-18 11:09:37 -06:00
Daniel Pouzzner
59b3219c0f wolfcrypt/test/test.c: fix memory leaks in Hmac tests. 2025-12-18 10:47:21 -06:00
Eric Blankenhorn
d1a4677a8a Null deref check in Pkcs11ECDH 2025-12-18 10:10:57 -06:00
Marco Oliverio
988ba340ba address reviewer's comments 2025-12-18 10:28:54 +01:00
Masaki I.
42e324e545 [JA] Fix issues with the API documentation 2025-12-18 18:08:59 +09:00
Joseph Chen
1484fb5069 Add IAR support to WC_OFFSETOF macro 2025-12-18 15:46:35 +08:00
Sean Parkinson
a103f5af8b Merge pull request #9545 from douzzer/20251211-DRBG-SHA2-smallstackcache-prealloc
20251211-DRBG-SHA2-smallstackcache-prealloc
2025-12-18 10:07:37 +10:00
Sean Parkinson
b7e69fb2f3 Merge pull request #9543 from kareem-wolfssl/zd20944
Check Curve25519 public key after generating one to avoid generating invalid keys.
2025-12-18 09:29:58 +10:00
JacobBarthelmeh
911e996a8d Merge pull request #9546 from SparkiDev/curve25519_base_smul_improv
Curve25519: improved smul
2025-12-17 15:28:56 -07:00
JacobBarthelmeh
498b86fabd Merge pull request #9542 from holtrop-wolfssl/rust-wolfssl-wolfcrypt-crate
Create wolfssl-wolfcrypt Rust crate
2025-12-17 12:17:51 -07:00
Daniel Pouzzner
b23f59f137 Merge pull request #9540 from sameehj/linuxkm_tegra_fips_fixes
linuxkm: fix Tegra Yocto FIPS build issues (ARM64, RT, PIE)
2025-12-17 12:49:23 -06:00
JacobBarthelmeh
04a06fee0f Merge pull request #9535 from philljj/kernel_readme
linuxkm: add a readme.
2025-12-17 11:32:58 -07:00
JacobBarthelmeh
a2ab7b3e80 Merge pull request #9548 from julek-wolfssl/fix-os-check-cflags
Fix incorrect use of CFLAGS in os-check
2025-12-17 10:37:44 -07:00
JacobBarthelmeh
39a903b30c Merge pull request #9549 from embhorn/zd20965
Fix MQX example null deref
2025-12-17 10:35:43 -07:00
JacobBarthelmeh
16e035d692 Merge pull request #9547 from SparkiDev/aesgcm_ossl_arm32_asm_fix
AES-GCM ARM32/Thumb2 ASM: don't change aes->reg in decrypt
2025-12-17 10:33:38 -07:00
JacobBarthelmeh
393dab2151 Merge pull request #9524 from julek-wolfssl/zephyr-cpp
Updates for latest zephyr with cpp
2025-12-17 10:30:18 -07:00
JacobBarthelmeh
e93835acd9 sanity checks on buffer size with AES and CAAM Integrity use 2025-12-17 10:15:32 -07:00
Daniel Pouzzner
fc7d4ffad4 PR#9545 20251211-DRBG-SHA2-smallstackcache-prealloc addressing peer review: clear dest if necessary in InitHandshakeHashesAndCopy(), style tweaks in random.c, explanatory comments in sha512.c. 2025-12-17 11:07:22 -06:00
Daniel Pouzzner
33fc601011 tweaks from PRBs results:
tests/api.c:
* remove inapt SSL_library_init() in test_wolfSSL_EVP_Cipher_extra();
* move TEST_X509_DECLS to follow TEST_DECL(test_wolfSSL_Init);

tests/api/test_random.c: enlarge seed buffer in test_wc_RNG_TestSeed() to accommodate amdrand block size;

tests/quic.c: wrap exercises in wolfSSL_Init()...wolfSSL_Cleanup();

tests/unit.c: in unit_test(), add several more fflush(stdout)s, report error from wolfSSL_Cleanup(), and fix line length;

wolfcrypt/test/test.c: omit reseed test in _rng_test() if HAVE_INTEL_RDRAND or old FIPS, and use simplified random_test() if HAVE_INTEL_RDRAND;

wolfssl/wolfcrypt/mem_track.h: add memList pointer in struct memoryStats, and set it in InitMemoryTracker();

wolfssl/wolfcrypt/settings.h: undefine WOLFSSL_SMALL_STACK_CACHE if WOLFSSL_SMALL_STACK is undefined;

.github/workflows/trackmemory.yml: add --enable-intelrdseed scenario.
2025-12-17 11:01:11 -06:00
Daniel Pouzzner
e159c650ea .wolfssl_known_macro_extras: add CONFIG_CRYPTO_DRBG. 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
79d1e6b295 .github/workflows/trackmemory.yml: new workflow testing various configs with -DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY. 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
fb82bdbc35 wolfcrypt/test/test.c:
* in wolfcrypt_test_main(), when WOLFSSL_TRACK_MEMORY, check and error if wc_MemStats_Ptr->currentBytes > 0;
  * don't call the hash initialization APIs for hash structs that are later copied over with the hash copy API (sha224_test(), sha256_test(), sha512_test(), etc)
  * in hash_test(), either wc_HashNew() or wc_HashInit(), not both (fixes leaks);
  * in hmac_*_test(), add test coverage for wc_HmacCopy();
  * in _rng_test(), when WOLFSSL_TRACK_MEMORY && WOLFSSL_SMALL_STACK_CACHE, check that wc_MemStats_Ptr->totalAllocs doesn't increase when wc_RNG_GenerateBlock() is called, and if HAVE_HASHDRBG) && !CUSTOM_RAND_GENERATE_BLOCK, check that forcing a reseed doesn't result in an increase.
  * add missing context cleanups in openSSL_evpMD_test().
2025-12-17 11:01:10 -06:00
Daniel Pouzzner
8bd0fb0e4b wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h: refactor WOLFSSL_SMALL_STACK_CACHE support to eliminate all heap calls after init and before cleanup.
* add DRBG_internal.{seed_scratch,digest_scratch}
  * add WC_RNG.{drbg_scratch,health_check_scratch,newSeed_buf}
  * refactor to implement new WOLFSSL_SMALL_STACK_CACHE dynamics:
    * wc_RNG_HealthTestLocal()
    * Hash_df()
    * Hash_gen()
    * Hash_DRBG_Generate()
    * Hash_DRBG_Instantiate()
    * _InitRng()
    * PollAndReSeed()
    * wc_FreeRng()
    * wc_RNG_HealthTest_ex_internal()
    * wc_RNG_HealthTest_ex()
    * wc_RNG_HealthTestLocal()
  * refactor out WOLFSSL_KERNEL_MODE gates (now all WOLFSSL_SMALL_STACK_CACHE)
2025-12-17 11:01:10 -06:00
Daniel Pouzzner
2b28931855 wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: in WOLFSSL_SMALL_STACK_CACHE builds, allocate shafoo->W at init or context copy time, rather than in the transform function. for the SHA512 family, allocate additional space in W for "buffer" in wc_Sha512Transform(). 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
525266c467 wolfssl/wolfcrypt/mem_track.h and wolfcrypt/src/memory.c: add WOLFSSL_API extern memoryStats *wc_MemStats_Ptr, set by InitMemoryTracker() and cleared by CleanupMemoryTracker(), allowing public access to the memory statistics.
tests/unit.c: at end of unit_test(), when WOLFSSL_TRACK_MEMORY, explicitly wolfSSL_Cleanup() then check and error if wc_MemStats_Ptr->currentBytes > 0.
2025-12-17 11:01:10 -06:00
Daniel Pouzzner
1e38a1011e wolfcrypt/src/wolfentropy.c: in wc_Entropy_Get():
* use a bss segment allocation for noise, to avoid a heap allocation (access is already mutex-protected), and
  * in the loop, WC_CHECK_FOR_INTR_SIGNALS() and WC_RELAX_LONG_LOOP().
2025-12-17 11:01:10 -06:00
Daniel Pouzzner
38b675ef68 linuxkm/lkcapi_sha_glue.c:
* as for other glue families, when LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG, don't "#error Config conflict" if explicit LINUXKM_LKCAPI_DONT_REGISTER_foo is defined for the missing algorithm;
  * in km_hmac_init(), use wc_HmacCopy() to copy p_ctx->wc_hmac to t_ctx->wc_hmac;
  * in get_drbg(), when tfm == crypto_default_rng, only migrate_disable() and local_bh_disable() if preempt_count() == 0, i.e. if not in already in an uninterruptible context;
  * add can_spin argument to get_drbg_n() -- wc_linuxkm_drbg_seed() can_spin, wc_mix_pool_bytes() !can_spin, and wc_crng_reseed() can_spin;
  * add compile-time assert that WOLFSSL_SMALL_STACK_CACHE is defined if LINUXKM_DRBG_GET_RANDOM_BYTES;

.wolfssl_known_macro_extras: add CONFIG_CRYPTO_DRBG.
2025-12-17 11:01:10 -06:00
Daniel Pouzzner
50b51adc93 wolfcrypt/src/hmac.c and wolfssl/wolfcrypt/hmac.h: implement WOLFSSL_API wc_HmacCopy(), and remove the WOLFSSL_HMAC_COPY_HASH gate on HmacKeyCopyHash(). 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
8090817c11 configure.ac: when KERNEL_MODE_DEFAULTS, set ENABLED_SMALL_STACK_CACHE_DEFAULT=yes regardless of FIPS/version. 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
8e03d0523c wolfssl/test.h: add missing wc_HmacFree()s in myMacEncryptCb(), myDecryptVerifyCb(), myEncryptMacCb(), myVerifyDecryptCb(). 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
15fcf7095f linuxkm/lkcapi_{dh,ecdh,ecdsa,rsa,aes}_glue.c: when LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG, don't "#error Config conflict" if explicit LINUXKM_LKCAPI_DONT_REGISTER_foo is defined for the missing algorithm. 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
dc0fe803a5 src/internal.c: in InitHandshakeHashesAndCopy(), don't call InitHandshakeHashes(), to avoid leaking in the later wc_FooCopy() operation. 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
918b6973bd tests/api.c: in test_wolfSSL_dtls_stateless_HashWOLFSSL(), when WOLFSSL_SMALL_STACK_CACHE, omit ssl->hsHashes from the comparison (init-time heap pointers destabilize its bit signature). 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
2802e2d82b wolfcrypt/src/rsa.c: in RsaUnPad_OAEP(), refactor volatile-based constant time mitigation to fix "using value of assignment with ‘volatile’-qualified left operand is deprecated [-Werror=volatile]" (new warning from gcc-16.0.0_p20251207, not reported by gcc-16.0.0_p20251116-r1). 2025-12-17 11:01:10 -06:00
Daniel Pouzzner
cd3e81a656 src/ssl_load.c: in ProcessBufferCert(), check ctx for nullness before accessing ctx->verifyNone (fixes -Wnull-dereference reported by multi-test dtls-no-rsa-no-dh after merge of 36e66eb763). 2025-12-17 11:01:10 -06:00
Eric Blankenhorn
d5691fe849 Fix MQX example null deref 2025-12-17 09:35:01 -06:00
Eric Blankenhorn
5aa2840bed Fix MQX example null deref 2025-12-17 09:33:21 -06:00
Sameeh Jubran
a5f1fde955 linuxkm: fix Tegra Yocto FIPS build issues (ARM64, RT, PIE)
Fix multiple build and runtime issues when building wolfSSL LinuxKM FIPS
on NVIDIA Tegra (ARM64) kernels under Yocto.

- Disable ARM64 LSE atomics for out-of-tree modules to avoid jump_table
  asm constraints
- Handle PREEMPT_RT mutex and spinlock differences correctly
- Avoid alt_cb_patch_nops / queued_spin_lock_slowpath on Tegra
- Remove conflicting compiler auto-var-init flags for PIE objects
- Align PIE symbol redirection with RT and Tegra kernels

This restores successful LinuxKM FIPS builds on Tegra-based Yocto systems.

Signed-off-by: Sameeh Jubran <sameeh.j@gmail.com>
2025-12-17 14:32:26 +02:00
Juliusz Sosinowicz
432f0e33f6 Fix incorrect use of CFLAGS in os-check 2025-12-17 10:28:43 +01:00
Juliusz Sosinowicz
f61bfd7805 Check KeyShare after HRR 2025-12-17 10:27:04 +01:00
Sean Parkinson
af2c6cc932 AES-GCM ARM32/Thumb2 ASM: don't change aes->reg in decrypt
OpenSSL compatability layer expects aes->reg to be unmodified by AES-GCM
decrypt call. ARM32/Thumb2 assembly implementation  modifies buffer.
Keep a copy and restore aes->reg after call.
2025-12-17 16:04:25 +10:00
Sean Parkinson
f54266c2c6 Curve25519: improved smul
Use the Ed25519 base smul in Curve25519 base mul and covert to
Montogmery curve for a faster implementation.
Only when Ed25519 is compiled in or WOLFSSL_CURVE25519_USE_ED25519 is
defined.
When compiling Intel x64 assembly and Aarch64 assembly, always define
WOLFSSL_CURVE25519_USE_ED25519.
Can't use with blinding - normal C implementation.

Optimized the Curve25519 smul slightly for Intel x64 and Aarch64.
Improved the conditional table lookup on Intel x64 to use AVX2 when
available.
2025-12-17 13:25:36 +10:00
JacobBarthelmeh
b42e9a9410 Merge pull request #9529 from SparkiDev/dsa_pg_sp_int_fix
DSA Parameter Generation: init g earlier
2025-12-16 14:52:45 -07:00
JacobBarthelmeh
75fdf959c1 Merge pull request #9514 from kareem-wolfssl/zd20936
Fix uninitialized variable, fix potentially undefined printf reference in HASH_DRBG_Generate.
2025-12-16 14:48:17 -07:00
JacobBarthelmeh
9156b50bbc Merge pull request #9538 from SparkiDev/tls13_dup_ext_alert_code_fix
TLS 1.3: duplicate extension alert code fix
2025-12-16 14:43:19 -07:00
JacobBarthelmeh
95afe9ca06 Merge pull request #9539 from julek-wolfssl/APP_DATA_READY-docs
Update APP_DATA_READY doc string
2025-12-16 14:42:39 -07:00
Juliusz Sosinowicz
ac84464140 Updates for latest zephyr with cpp 2025-12-16 17:25:18 +01:00
Josh Holtrop
9020373405 Rust crate: update CHANGELOG for v1.0.0 2025-12-16 10:08:10 -05:00
Josh Holtrop
37fa1581d3 Rust crate: bump version to 1.0.0 2025-12-16 10:04:32 -05:00
Josh Holtrop
95e8276d55 Rust crate: add CHANGELOG.md 2025-12-16 09:06:07 -05:00
Josh Holtrop
52e7801939 Rust crate: bump version 2025-12-16 09:03:10 -05:00
Josh Holtrop
357b8952c6 Rust crate: only set link-search and link-arg for local repo build 2025-12-16 09:02:34 -05:00
Marco Oliverio
0fa0fd2317 (d)tls: refactor wolfSSL_GetMaxFragSize(), simplify length computations 2025-12-16 10:46:29 +01:00
Marco Oliverio
e9f3bd5ddd dtls: test precise header headroom computation 2025-12-16 10:00:30 +01:00
Kareem
36eda9fb75 Check Curve25519 public key after generating one to avoid generating invalid keys.
Thanks to Kr0emer for the report.
2025-12-15 16:31:29 -07:00
Sean Parkinson
5512c2d0b4 Merge pull request #9541 from jackctj117/empty-hash-comment
Added comment with empty hash use
2025-12-16 08:34:16 +10:00
Sean Parkinson
85d40c8e9b Merge pull request #9522 from JacobBarthelmeh/time
tie in use of check_time with x509 store
2025-12-16 08:24:49 +10:00
Josh Holtrop
a3cc7214e7 Update include.am for Rust crate rename 2025-12-15 16:28:26 -05:00
Kareem
968662063d Merge remote-tracking branch 'upstream/master' into zd20936 2025-12-15 14:06:18 -07:00
Josh Holtrop
447ba11379 Add README.md in wolfssl-wolfcrypt crate directory 2025-12-15 15:22:44 -05:00
Josh Holtrop
0a469d4a4d Avoid unused variable warning in ECCPoint test 2025-12-15 13:02:55 -05:00
Sean Parkinson
d3863e5fa3 TLS 1.3: duplicate extension alert code fix
The specification states to return illegal_parameter when a message is
syntactically correct but semantically invalid. (RFC 8446 section 6,
Paragraph 5)
2025-12-15 10:00:56 -08:00
Josh Holtrop
8cd0c9bd11 Rust wrapper: rename wolfssl crate to wolfssl-wolfcrypt 2025-12-15 13:00:51 -05:00
jackctj117
585a8d22aa Added comment with empty hash imofrmation 2025-12-15 10:52:24 -07:00
Daniel Pouzzner
52ee00132d Merge pull request #9528 from SparkiDev/tls13_missing_ext_fix
TLS 1.3 missing extension: return correct alert code
2025-12-15 11:05:02 -06:00
Daniel Pouzzner
901ddab007 Merge pull request #9534 from rlm2002/coverity
20251212 Coverity fix for CID 524467
2025-12-15 11:03:18 -06:00
Daniel Pouzzner
b9368d7a3d Merge pull request #9516 from embhorn/gh3665
Add checking of size param and clarify usage in doc
2025-12-15 10:49:57 -06:00
Daniel Pouzzner
7e5d1d3d6d Merge pull request #9523 from JacobBarthelmeh/bio
remove unimplemented function macro
2025-12-15 10:39:55 -06:00
Daniel Pouzzner
61c72d2406 Merge pull request #9525 from JacobBarthelmeh/docs
public disclosure of CVE-2025-13912
2025-12-15 10:34:39 -06:00
Daniel Pouzzner
a379797482 Merge pull request #9526 from holtrop/rust-wrapper-notes
Rust wrapper: update crate metadata and README
2025-12-15 09:58:25 -06:00
Juliusz Sosinowicz
c73de0d133 Update APP_DATA_READY doc string 2025-12-15 12:18:10 +01:00
Sean Parkinson
dacb3425cd DSA Parameter Generation: init g earlier
Ensure dsa->g is initialized with other mp_ints so that it can be
cleared at the end regardless of failures.

Don't clear tmp or tmp2 if allocation or initialization failed as you
will access uninitialized data.
2025-12-15 09:12:11 +10:00
Sean Parkinson
44be44a509 TLS 1.3 missing extension: return correct alert code
Change TLS 1.3 handling to return missing_extension alert code when
 - KeyShare is present but SupportedGroups is missing and
 - SupportedGroups is present but KeyShare is missing

Added tests for this.
2025-12-15 09:07:13 +10:00
Sean Parkinson
6e94381149 ARM64 ASM: Darwin specific address calc fix
Don't use ':lo12:' in Darwin specific address calculation code.
@PAGEOFF is indicating this.
2025-12-15 08:46:24 +10:00
Sean Parkinson
19cba1c462 Merge pull request #9527 from night1rider/CMAC-Compile-Issue
Fix wc_CmacFree() to use correct heap pointer from internal Aes structure
2025-12-15 08:34:11 +10:00
jordan
d52eb8f4d0 linuxkm: readme patch description. 2025-12-12 18:58:10 -06:00
JacobBarthelmeh
5099e6e315 add macro guard on use of time_t 2025-12-12 16:42:19 -07:00
jordan
9736427e7a linuxkm: add a readme. 2025-12-12 17:07:07 -06:00
Kaleb Himes
6475106ce7 Merge pull request #9449 from lealem47/hash_script
Use only the first 64 bytes of hash output in fips-hash.sh
2025-12-12 14:47:12 -07:00
Ruby Martin
27b5ac9f84 sanitize loop bound in tls_multi_handshakes_one_record() unit test
add additional check for breaking while loop
2025-12-12 14:18:25 -07:00
JacobBarthelmeh
01442a1460 adjust macro guard around test case 2025-12-12 13:36:14 -07:00
Lealem Amedie
61e58f0f04 Fix for analyzer null dereference 2025-12-12 12:31:07 -07:00
Lealem Amedie
afa56497a8 Use cut command for portability 2025-12-12 12:31:07 -07:00
Lealem Amedie
7e26bc06c5 Use only the first 64 bytes of hash output in fips-hash.sh 2025-12-12 12:31:07 -07:00
Kareem
2d4e589a8d Merge remote-tracking branch 'upstream/master' into zd20936 2025-12-12 11:37:45 -07:00
Kareem
3797c03e6c Merge remote-tracking branch 'upstream/master' into zd20936 2025-12-12 11:37:34 -07:00
night1rider
cf42d14e10 Fix wc_CmacFree() and wc_CMAC_Grow() to use correct heap pointer from internal Aes structure 2025-12-12 11:14:16 -07:00
JacobBarthelmeh
e1bbb71878 tie in use of check_time with x509 store 2025-12-12 09:22:23 -07:00
Daniel Pouzzner
ab2196b4ca Merge pull request #9530 from SparkiDev/arm64_asm_deadcode_fix
Aarch64 AES ASM no hw crypto: no dead code
2025-12-11 23:41:30 -06:00
Sean Parkinson
8e14d4a774 Aarch64 AES ASM no hw crypto: no dead code
Fix code so that there is no dead code compiled.
That is, change if checks to #ifdef checks.
2025-12-12 12:31:36 +10:00
Daniel Pouzzner
38d5dc6c7a Merge pull request #9510 from embhorn/gh7981
Fix test when ECH and harden are enabled
2025-12-11 13:07:29 -06:00
Daniel Pouzzner
3e8c6811c7 Merge pull request #9518 from SparkiDev/api_c_split_3
api.c: Split out more functions
2025-12-11 13:06:58 -06:00
Daniel Pouzzner
2ffa5be427 Merge pull request #9511 from jackctj117/CertGenCache
Added --enable-certgencache to os-check
2025-12-11 13:03:31 -06:00
Daniel Pouzzner
9201b4e5eb Merge pull request #9515 from anhu/salt_len_min
Note that HMAC_FIPS_MIN_KEY is also salt len min for HKDF
2025-12-11 13:03:06 -06:00
Daniel Pouzzner
ebbfc2e413 Merge pull request #9507 from miyazakh/add_tools_includeam
Add RA6M4/tools folder to include.am
2025-12-11 12:46:37 -06:00
Daniel Pouzzner
ef8bf55528 Merge pull request #9495 from SparkiDev/aarch64_no_hw_crypto_asm_aes
Aarch64 no harware crypto assembly AES
2025-12-11 12:46:07 -06:00
Daniel Pouzzner
f26a52e2dd Merge pull request #9494 from SparkiDev/benchmark_ecdsa_p521
Benchmark ECDSA: use digest size instead of key size
2025-12-11 12:43:58 -06:00
Daniel Pouzzner
093f15ca4f Merge pull request #9496 from embhorn/zd20913
Enable wolfSSL_i2d_X509_NAME_canon to handle blank optional fields
2025-12-11 12:43:32 -06:00
Daniel Pouzzner
8c839b1ffc Merge pull request #9502 from rlm2002/x509_addressIsIP
Run check for IP address in wolfSSL_X509_check_host()
2025-12-11 12:41:54 -06:00
Daniel Pouzzner
90521b09a4 Merge pull request #9500 from holtrop/fix-rust-eccpoint-import-tests
Rust wrapper: fix ECCPoint import_der_ex unit tests
2025-12-11 12:41:19 -06:00
Daniel Pouzzner
f07e379d6d Merge pull request #9456 from anhu/test_inits
Initialize test variables; avoid false warnings.
2025-12-11 12:40:44 -06:00
Josh Holtrop
31f6dd7039 Rust wrapper: update crate metadata and README 2025-12-11 12:50:30 -05:00
Anthony Hu
cd4f96924b Better error message too. 2025-12-11 12:23:38 -05:00
JacobBarthelmeh
1d448ec3b4 public disclosure of CVE-2025-13912 2025-12-11 10:22:22 -07:00
JacobBarthelmeh
d7a852af82 remove unimplemented function macro 2025-12-11 09:32:57 -07:00
cwilley
2d9d399a50 Merge pull request #9519 from douzzer/20251210-linuxkm-get_drbg-local_bh_disable
20251210-linuxkm-get_drbg-local_bh_disable
2025-12-11 08:02:34 -08:00
Eric Blankenhorn
67b6b284d6 Add checking of size param and clarify usage in doc 2025-12-11 08:27:57 -06:00
Sean Parkinson
b4b617de49 api.c: Split out more functions
More X509 function testing.
X509 store function testing.
X509 lookup function testing.
2025-12-11 19:00:19 +10:00
Sean Parkinson
0b2fb66af6 api.c: Split out more functions
wolfSSL_PEM, wolfSSL_X509, wolfSSL_X509_NAME, wolfSSL_X509_PUBKEY API
testing moved out to separate files.
2025-12-11 15:32:09 +10:00
Daniel Pouzzner
fe33bb9bd9 linuxkm/lkcapi_sha_glue.c:
* in get_drbg(), call local_bh_disable() for the crypto_default_rng, and in put_drbg(), call local_bh_enable() if needed.
* re-gate migrate_disable() and migrate_enable() so they're called for any SMP kernel >= 5.7, regardless of CONFIG_PREEMPT_COUNT.
* in get_drbg_n(), if the caller can't sleep, return immediately if the requested DRBG is busy, to avoid priority inversions and deadlocks.
2025-12-10 20:33:48 -06:00
Sean Parkinson
569a5e0388 Merge pull request #9509 from rizlik/comment_fix
internal.c: fix comment to be more precise
2025-12-11 10:26:52 +10:00
Sean Parkinson
b69ce5a568 Merge pull request #9506 from rlm2002/coverity
check if ctx and ssl are null when checking public key in certificate
2025-12-11 08:30:58 +10:00
Sean Parkinson
1faf740f10 Merge pull request #9505 from douzzer/20251209-linuxkm-GENERATE_SECTION_MAP--sections
20251209-linuxkm-GENERATE_SECTION_MAP--sections
2025-12-11 08:03:44 +10:00
Sameeh Jubran
4d4751bff3 Merge pull request #9512 from douzzer/20251210-linuxkm-5.17-ubuntu-jammy-tegra-patches
20251210-linuxkm-5.17-ubuntu-jammy-tegra-patches
2025-12-10 22:46:12 +02:00
Anthony Hu
008132c33b Note that HMAC_FIPS_MIN_KEY is also salt len min for HKDF 2025-12-10 15:05:25 -05:00
Kareem
63976cb09b Fix uninitialized variable, use WOLFSSL_DEBUG_PRINTF macro in Hash_DRBG_Generate to avoid undefined printf reference. 2025-12-10 12:28:54 -07:00
Daniel Pouzzner
650990e1e2 add linuxkm/patches/5.17-ubuntu-jammy-tegra/WOLFSSL_LINUXKM_HAVE_GET_RANDOM_CALLBACKS-5v17-ubuntu-jammy-tegra.patch 2025-12-10 11:51:29 -06:00
Daniel Pouzzner
ba861971eb wolfssl/wolfcrypt/wc_port.h: don't attempt to define WC_DEPRECATED() for _MSC_VER < 1400 -- still causing error on old MSVC (now C2085 rather than C2485). 2025-12-10 11:15:55 -06:00
jackctj117
9db4aad468 Added --enable-certgencache to os-check 2025-12-10 10:14:39 -07:00
Eric Blankenhorn
8053e8f9b3 Fix test when ECH and harden are enabled 2025-12-10 08:14:59 -06:00
Marco Oliverio
33a518958c internal.c: fix comment to be more precise 2025-12-10 14:11:07 +01:00
Takashi Kojo
6c5e84178e Merge pull request #9371 from tamasan238/doc
[ja] update docs - part 1
2025-12-10 18:16:12 +09:00
Masaki Iwai
d100ff81ba Merge branch 'master' into doc 2025-12-10 16:07:30 +09:00
Takashi Kojo
a555e211d4 Merge pull request #9405 from tamasan238/doc-2
[ja] update docs - part 2
2025-12-10 15:58:57 +09:00
Sean Parkinson
0ab09ab147 PPC32 SHA-256 ASM: support comnpiling for PIC
When compiling for PIC, 30 and 31 are not always available.
Alternative implementation added not using them that puts registers on
the stack.
Small code size version implemented as well.
2025-12-10 16:20:49 +10:00
Hideki Miyazaki
090d89acbc add RA6M4/tools folder to include.am 2025-12-10 10:18:26 +09:00
Ruby Martin
36e66eb763 check if ctx and ssl are null when checking public key in certificate 2025-12-09 17:04:05 -07:00
David Garske
f18fdcae91 Merge pull request #9501 from JacobBarthelmeh/xcode
Fix for XCODE build with ARM assembly
2025-12-09 15:38:31 -08:00
Daniel Pouzzner
41b2fc28b3 wolfssl/wolfcrypt/wc_port.h: add WC_DEPRECATED() definitions for _MSC_VER < 1400. 2025-12-09 17:15:48 -06:00
Daniel Pouzzner
d210b92a16 linuxkm/Makefile: tweak GENERATE_SECTION_MAP recipe to expect --sections output from readelf, and feed that to it, to work around missing section names in --symbols output on binutils <2.36. 2025-12-09 17:03:16 -06:00
Sean Parkinson
80b7ea638e Aarch64 no harware crypto assembly AES
Implementations of AES-ECB, AES-CBC, AES-CTR, AES-GCM, AES-XTS with base
instructions and NEON but not using crypto instructions.

Benchmark of AES-ECB added.
Updated AES tests.
2025-12-10 08:55:58 +10:00
David Garske
c9fbad2bc3 Merge pull request #9504 from julek-wolfssl/cov-20251203
Fix uninit variables
2025-12-09 09:24:05 -08:00
Juliusz Sosinowicz
24b35badb4 Fix uninit variables 2025-12-09 17:07:40 +01:00
JacobBarthelmeh
c05f0680c6 remove trailing whitespace 2025-12-09 07:00:50 -07:00
JacobBarthelmeh
5873142403 add xcode github actions build test 2025-12-08 14:42:51 -07:00
JacobBarthelmeh
ea058c6e85 xcode set correct file type for assembly files with project 2025-12-08 14:42:19 -07:00
Josh Holtrop
b5bea05c55 Rust wrapper: fix ECCPoint import_der_ex unit tests 2025-12-08 13:28:48 -05:00
Ruby Martin
edbca503be Run check for IP address in wolfSSL_X509_check_host() 2025-12-08 11:04:45 -07:00
David Garske
ab1a738859 Merge pull request #9499 from holtrop/rust-32-bit-fixes
Rust wrapper: fix "e" param type for wc_MakeRsaKey() on 32-bit targets
2025-12-08 07:58:32 -08:00
Josh Holtrop
1b4d09d752 Rust wrapper: fix "e" param type for wc_MakeRsaKey() on 32-bit targets 2025-12-08 10:02:25 -05:00
Sean Parkinson
5a89ef9f76 Merge pull request #9497 from douzzer/20251206-old-fips-test_wc_RsaPublicEncryptDecrypt
20251206-old-fips-test_wc_RsaPublicEncryptDecrypt
2025-12-08 20:32:21 +10:00
Daniel Pouzzner
12d07c4d43 tests/api/test_rsa.c: in test_wc_RsaPublicEncryptDecrypt(), add FIPS gate around new test coverage from #9454 (23c5678797). 2025-12-06 10:20:45 -06:00
Eric Blankenhorn
83f6fe1a1a Enable wolfSSL_i2d_X509_NAME_canon to handle blank optional fields 2025-12-05 15:12:29 -06:00
Sean Parkinson
886b0c2ec6 Benchmark ECDSA: use digest size instead of key size
The key size can be larger than the maximum digest size supported by the
sign and verify APIs.
Calculate a reasonable digest size for the key size and bound it on the
maximum digest size.
2025-12-05 09:01:12 +10:00
David Garske
1b7072b739 Merge pull request #9493 from holtrop/build-rust-wrappers-on-arm
Rust wrapper: run CI tests on ARM
2025-12-04 13:54:28 -08:00
Josh Holtrop
379ec8a23e Rust wrapper: run CI tests on ARM 2025-12-04 15:49:55 -05:00
David Garske
fd58885887 Merge pull request #9490 from douzzer/20251202-linuxkm-old-kernel-fixes
20251202-linuxkm-old-kernel-fixes
2025-12-04 11:42:00 -08:00
JacobBarthelmeh
5b7480486e Merge pull request #9487 from dgarske/qathash
Fix QAT hash final with no update and fix g++ warnings
2025-12-04 11:35:46 -07:00
David Garske
f01c4f10fa Merge pull request #9454 from SparkiDev/rsa_dec_too_small_output_fix
RSA decrypt: don't write past buffer end on error
2025-12-04 10:06:37 -08:00
David Garske
1dfa4d1bcf Merge pull request #9488 from SparkiDev/aes_gcm_4bit_be
AES-GCM, 4-bit table, Big Endian: fast impl of GMULT
2025-12-04 10:06:06 -08:00
David Garske
003f2385b9 Merge pull request #9491 from SparkiDev/sha256_armasm_small
ARM32/Thumb2 ASM SHA-256: provide small code size option
2025-12-04 10:05:01 -08:00
David Garske
1ebecb68c8 Merge pull request #9484 from holtrop/add-rust-wrapper-build-configs
Add several library configurations from os-check.yml to the Rust wrapper CI build
2025-12-04 08:00:24 -08:00
Daniel Pouzzner
e225bf80af linuxkm/linuxkm_wc_port.h: move WOLFSSL_API_PREFIX_MAPping of GetCAByAKID to wolfSSL_GetCAByAKID from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, with an additional needed early mapping in linuxkm/linuxkm_wc_port.h. 2025-12-04 09:58:52 -06:00
Daniel Pouzzner
690cce67d1 linuxkm/linuxkm_wc_port.h: add -Wattributes to suppression list while including kernel headers. 2025-12-04 09:34:22 -06:00
Daniel Pouzzner
64ebc342a1 linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_generate(), generate randomness in batches that fit in RNG_MAX_BLOCK_LEN. 2025-12-04 09:34:22 -06:00
Daniel Pouzzner
aad0f7f184 linuxkm: move definition of WOLFSSL_DEBUG_PRINTF_FN from wolfssl/wolfcrypt/logging.h to linuxkm/linuxkm_wc_port.h. 2025-12-04 09:34:22 -06:00
Daniel Pouzzner
783e583169 linuxkm/linuxkm_wc_port.h:
* add backported definition of static_assert();
* add version-gated include for asm-generic/simd.h;
* add version gate for crypto/internal/simd.h.
2025-12-04 09:34:22 -06:00
Josh Holtrop
10a12b76e6 Rust wrapper: support more wolfcrypt build configurations 2025-12-04 09:09:04 -05:00
Sean Parkinson
bff29a8535 ARM32/Thumb2 ASM SHA-256: provide small code size option
WOLFSSL_ARMASM_SHA256_SMALL for Thumb2 and ARM32 using base instructions
compiles implementations that are smaller but slower.
2025-12-04 16:44:37 +10:00
Sean Parkinson
2b726ebf0b Merge pull request #9386 from sebastian-carpenter/oss-fuzz-fix-442261624
fixed oss-fuzz warnings
2025-12-04 15:28:18 +10:00
Masaki Iwai
42990f7eec Merge branch 'master' into doc 2025-12-04 13:38:25 +09:00
David Garske
0aa789a289 Merge pull request #9458 from LinuxJedi/doc_fixes
Fix issues with the API documentation
2025-12-03 09:23:23 -08:00
David Garske
45b7fb9e39 Merge pull request #9489 from julek-wolfssl/zd/20860
Fix AKID CA lookup
2025-12-03 08:16:51 -08:00
Andrew Hutchings
2376e484d8 Fix return values 2025-12-03 15:21:11 +00:00
Andrew Hutchings
590a02e541 Fix Doxygen parameters 2025-12-03 15:15:32 +00:00
Andrew Hutchings
c4e9ca4eca Fix some errors in the doc edits 2025-12-03 14:56:52 +00:00
Juliusz Sosinowicz
22eedeea86 fixup! tests: add unit coverage for GetCAByAKID 2025-12-03 13:26:12 +01:00
Juliusz Sosinowicz
32c6f8f2a0 Fix prefix errors 2025-12-03 11:36:39 +01:00
Juliusz Sosinowicz
995e63f6e1 Fix AKID CA lookup
The `authorityCertIssuer` field refers to the Issuer field of the CA being looked up and not its Subject field.
2025-12-03 10:47:40 +01:00
Juliusz Sosinowicz
7b82224462 tests: add unit coverage for GetCAByAKID 2025-12-03 10:47:40 +01:00
Masaki I.
0c9a5620d7 add ending newline 2025-12-03 13:39:09 +09:00
Masaki I.
65d844dba2 [ja] update docs 2 2025-12-03 13:22:16 +09:00
Sean Parkinson
697bc47d8e AES-GCM, 4-bit table, Big Endian: fast impl of GMULT
Add fast implementation GMULT for big-endian platforms like PowerPC and
PowerPC64.
Speeds up AES-GCM.
2025-12-03 11:22:49 +10:00
Daniel Pouzzner
3062d15240 Merge pull request #9485 from philljj/bsdkm_cleanup
bsdkm: return cleanup.
2025-12-02 16:47:26 -06:00
David Garske
628c1e5225 Fix g++ compiler implicit cast warnings 2025-12-02 10:54:16 -08:00
David Garske
6deef7c14a QAT fix to properly handle a finish with no update 2025-12-02 09:57:12 -08:00
David Garske
6d55b42cf6 Merge pull request #9483 from josepho0918/mqx
Enhance MQX platform support and integration
2025-12-02 07:58:49 -08:00
David Garske
dd40417fca Merge pull request #9479 from josepho0918/aes-cbc-mmcau
Prefer ARMASM over MMCAU for AES CBC when both enabled
2025-12-02 07:58:17 -08:00
Josh Holtrop
08f2b36678 Add several library configurations from os-check.yml to the Rust wrapper CI build 2025-12-02 10:52:05 -05:00
Daniel Pouzzner
bc615a26e9 Merge pull request #9478 from sameehj/fix-tegra
linuxkm: Fix spinlock initialization on Tegra kernels for __SPIN_LOCK…
2025-12-02 09:24:00 -06:00
David Garske
2f1be0f0d4 Merge pull request #9486 from julek-wolfssl/hostap-sha-cert-update
Update sha384 and sha512 certs
2025-12-02 06:55:35 -08:00
Juliusz Sosinowicz
c63df82f0d Update sha384 and sha512 certs
- Print errors in logs on failure
2025-12-02 10:46:43 +01:00
Masaki Iwai
801d9bfa3d Merge branch 'master' into doc 2025-12-02 14:14:01 +09:00
David Garske
8741805e9d Merge pull request #9476 from embhorn/zd20515
Fix Coverity dead code report
2025-12-01 13:59:21 -08:00
David Garske
a2f46cd9b0 Merge pull request #9470 from lealem47/MLKEM_PUB_HASH_E
ML-KEM: Add check for Pubkey hash mismatch on decoding the dk
2025-12-01 12:49:48 -08:00
jordan
cd99aa2f0e bsdkm: return cleanup. 2025-12-01 09:43:15 -06:00
Sameeh Jubran
9a699c04ea linuxkm: Fix spinlock initialization on Tegra kernels for __SPIN_LOCK_UNLOCKED macro incompatibility
Tegra vendor kernels (L4T / NVIDIA Yocto BSP) fail to compile the
wolfSSL Linux kernel module due to the use of the legacy assignment form
of the spinlock initializer:

    m->lock = __SPIN_LOCK_UNLOCKED(m);

On Tegra, __SPIN_LOCK_UNLOCKED() expands to a braced-struct initializer
that is *not* valid as an assignment expression, causing:

    error: expected expression before '{' token

This patch applies a Tegra-specific workaround by replacing the
assignment with the stable kernel API:

    spin_lock_init(&m->lock);

This is guarded behind CONFIG_ARCH_TEGRA so that non-Tegra platforms
retain the current initialization behavior until further validation is
completed.

This fix restores successful kernel module builds on NVIDIA Tegra-based
Yocto images without modifying behavior on other architectures.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2025-11-27 10:08:55 +02:00
Joseph Chen
10efcd9787 Enhance MQX platform support and integration 2025-11-27 10:03:04 +08:00
Sean Parkinson
93944d289f Merge pull request #9482 from anhu/move_the_sigalg_check
Need to move sigalg check down because it does not consider hybrids.
2025-11-27 09:42:18 +10:00
Sean Parkinson
e30e9b7e09 Merge pull request #9473 from holtrop/rust-cargo-clippy
Rust wrapper: enable cargo clippy and fix several clippy warnings
2025-11-27 09:18:51 +10:00
Sean Parkinson
6c8b9054a0 Merge pull request #9443 from holtrop/report-rsa_pss_pss-sig-algo
TLSv1.3 certificate verify: report rsa_pss_pss_* signature algorithm when supported
2025-11-27 09:12:58 +10:00
Sean Parkinson
6a5e29e21d Merge pull request #9477 from douzzer/20251125-linuxkm-arm-fips-tweaks
20251125-linuxkm-arm-fips-tweaks
2025-11-27 09:03:36 +10:00
Anthony Hu
a02b61a9db Merge pull request #9475 from douzzer/20251125-aes-arm-fixes
20251125-aes-arm-fixes
2025-11-26 14:11:23 -05:00
Anthony Hu
a765bbdb79 Need to move sigalg check down because it does not consider hybrids. 2025-11-26 13:31:21 -05:00
Josh Holtrop
36418aca76 Set useRsaPss flag in both SSL and CTX structures 2025-11-26 10:30:38 -05:00
Joseph Chen
26206821ff Prefer ARMASM over MMCAU for AES CBC when both enabled 2025-11-26 16:05:05 +08:00
Daniel Pouzzner
be1f916028 wolfcrypt/src/aes.c: in the WOLFSSL_ARMASM && GCM_SMALL && !__aarch64__ static C implementation of GCM_gmult_len(), rename to GCM_gmult_len_armasm_C() (incompatible with other implementations);
wolfcrypt/src/aes.c: move FREESCALE_MMCAU implementations later (minimum precedence) for wc_AesEncrypt(), wc_AesDecrypt(), wc_AesSetKeyLocal(), wc_AesSetKey(), and wc_AesSetKeyDirect() (fixes ZD#20862).
2025-11-25 23:01:05 -06:00
Daniel Pouzzner
f5543f6b95 wolfcrypt/test/test.c: in wolfcrypt_test_main(), install myFipsCb if applicable, and save failed wolfCrypt retvals to args.return_code to assure error exit. fixes FIPS integrity failure message with wolfEntropy. 2025-11-25 20:21:37 -06:00
Daniel Pouzzner
4fda0883a4 globally rename WC_PIE_RELOC_TABLES to WC_SYM_RELOC_TABLES;
globally replace defined(__PIE__) with defined(WC_CONTAINERIZE_THIS) to decouple containerization from -fPIE;

configure.ac:
* add --enable-kernel-reloc-tables as an alias for --enable-linuxkm-pie;
* always activate ENABLED_ENTROPY_MEMUSE_DEFAULT when KERNEL_MODE_DEFAULTS and not RDSEED/RDRAND, regardless of FIPS presence/version;

linuxkm/Kbuild:
* add -DWC_CONTAINERIZE_THIS to PIE_FLAGS;
* add support for NO_PIE_FLAG, which inhibits -fPIE on ENABLED_LINUXKM_PIE builds, and adds -DWC_NO_PIE_FLAG to PIE_FLAGS;

linuxkm/linuxkm_wc_port.h: add setup for WC_LINUXKM_WOLFENTROPY_IN_GLUE_LAYER;

linuxkm/module_hooks.c: add wc_linuxkm_GenerateSeed_wolfEntropy().
2025-11-25 18:01:25 -06:00
David Garske
0aaa31c438 Merge pull request #9459 from JacobBarthelmeh/async
fix small stack define and warnings for g++ build with async
2025-11-25 14:22:24 -08:00
David Garske
6fc99ac6d8 Merge pull request #9431 from Pushyanth-Infineon/psoc6_aes_support
Enable hardware acceleration for AES on PSoC6.
2025-11-25 13:31:23 -08:00
Eric Blankenhorn
6de31e95fc Fix Coverity dead code report 2025-11-25 13:53:36 -06:00
Josh Holtrop
bfce171836 Rust wrapper: enable cargo clippy and fix several clippy warnings 2025-11-25 08:22:02 -05:00
Sean Parkinson
0afbc1ef08 Merge pull request #9471 from douzzer/20251124-memory_test-wolfSSL_Atomic_Ptr_CompareExchange
20251124-memory_test-wolfSSL_Atomic_Ptr_CompareExchange
2025-11-25 19:22:22 +10:00
JacobBarthelmeh
a83fb4fc42 revert 6bda10a forcing small stack with async 2025-11-25 00:43:04 -07:00
Daniel Pouzzner
e459b21744 wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: add volatile attribute to wolfSSL_Atomic_Uint_CompareExchange() first arg, for pedantic accuracy;
wolfssl/internal.h and src/ssl.c: add volatile attribute to WOLFSSL_CTX.privateKeyPKey pointer, for pedantic accuracy;

wolfcrypt/test/test.c: in memory_test(), use compatible pointers for all operands in the wolfSSL_Atomic_Ptr_CompareExchange() test, to avoid undefined behavior.
2025-11-24 18:21:09 -06:00
Lealem Amedie
eace02115b Address review feedback 2025-11-24 16:57:52 -07:00
Sean Parkinson
ea0793f0af Merge pull request #9428 from dgarske/qat_v5.8.4
Migrate wolfAsyncCrypt repo into wolfSSL proper
2025-11-25 09:33:31 +10:00
Sean Parkinson
7c8d7dff5e Merge pull request #9348 from effbiae/ExportEccTempKey
Refactor: Extract ExportEccTempKey, DhSetKey, and other helper functions from SendServerKeyExchange
2025-11-25 09:31:20 +10:00
Sean Parkinson
ed7ace504f Merge pull request #9434 from embhorn/zd20802
Clarify return value of wc_RsaSSL_Verify/Inline
2025-11-25 09:28:26 +10:00
Sean Parkinson
9c467a916a Merge pull request #9437 from rlm2002/coverity
20251114 Coverity change
2025-11-25 09:26:17 +10:00
Sean Parkinson
86789f92c0 Merge pull request #9446 from dgarske/stm32_castwarn
Fix stm32.c type warnings
2025-11-25 09:22:58 +10:00
Sean Parkinson
76fec60754 Merge pull request #9448 from anhu/p7_unknownExt
unknown extension support in wc_PKCS7_EcdsaVerify
2025-11-25 09:21:47 +10:00
Sean Parkinson
c6ecafced2 Merge pull request #9451 from kaleb-himes/ESV-DRBG-Decouple
Esv drbg decouple
2025-11-25 09:19:52 +10:00
Sean Parkinson
89f27ceb19 Merge pull request #9453 from holtrop/rust-wc-random-additions
Rust wrapper: add HAVE_HASHDRBG RNG functions
2025-11-25 09:18:12 +10:00
Sean Parkinson
eac5c29fdb Merge pull request #9455 from holtrop/rust-wc-init-cleanup
Rust wrapper: wrap wolfCrypt_Init() and wolfCrypt_Cleanup()
2025-11-25 09:17:23 +10:00
David Garske
4ccad17a39 Merge pull request #9465 from SparkiDev/aesgcm_small_armasm
AES-GCM small ARM asm: add back implementation
2025-11-24 15:06:49 -08:00
David Garske
0786aa2585 Merge pull request #9464 from SparkiDev/sp_384_sub_fix
SP Thumb2/ARM32: P-384 sub not needed for small builds
2025-11-24 15:05:43 -08:00
Sean Parkinson
d49c76945a Merge pull request #9468 from josepho0918/mmcau
Correct SHA256 final endianness on MMCAU platforms
2025-11-25 08:38:21 +10:00
Josh Holtrop
d766b82bac Remove conditional and just assign boolean result 2025-11-24 15:55:32 -05:00
Lealem Amedie
f5cb791e39 ML-KEM: Add check for Pubkey hash mismatch on decoding the dk 2025-11-24 10:22:40 -07:00
Joseph Chen
7752df3340 Correct SHA256 final endianness on MMCAU platforms 2025-11-24 16:48:35 +08:00
Sean Parkinson
ba47f7f333 AES-GCM small ARM asm: add back implementation
Implementation of GCM mult with length for ARM asm and small GCM was
added to armv8-aes.c but got lost when code pulled back to aes.c.
2025-11-24 11:08:18 +10:00
Sean Parkinson
46c704f51f SP Thumb2/ARM32: P-384 sub not needed for small builds
Don't have an implementation of sp_384_sub when building for small code
size.
2025-11-24 10:45:36 +10:00
JacobBarthelmeh
c5fb83f52d fix warnings for g++ build with async 2025-11-21 14:38:40 -07:00
Andrew Hutchings
026fa2dd4e Fix issues with the API documentation 2025-11-21 17:43:55 +00:00
Anthony Hu
cf8b729bae Initialize test variables; avoid false warnings. 2025-11-21 11:59:07 -05:00
Josh Holtrop
09e223baf3 Rust wrapper: wrap wolfCrypt_Init() and wolfCrypt_Cleanup() 2025-11-21 08:48:22 -05:00
Josh Holtrop
15b55ef279 Rust wrapper: add HAVE_HASHDRBG RNG functions 2025-11-21 08:31:27 -05:00
Sean Parkinson
23c5678797 RSA decrypt: don't write past buffer end on error
When the decrypted data is bigger than the buffer, the one extra bytes
was being written to.
2025-11-21 12:12:14 +10:00
David Garske
59f4fa5686 Merge pull request #9452 from JacobBarthelmeh/release
prepare for release 5.8.4
2025-11-20 13:05:19 -08:00
JacobBarthelmeh
91f3d90f82 Update version .rc files too 2025-11-20 13:10:38 -07:00
JacobBarthelmeh
ab98c150c6 prepare for release 5.8.4 2025-11-20 10:57:50 -07:00
kaleb-himes
176801a21b Include new header in the template file also 2025-11-20 09:40:18 -07:00
kaleb-himes
eeb2b09b23 Address linuxkm builds and the new header 2025-11-20 09:38:13 -07:00
kaleb-himes
4da42ffae9 Fix typo in header include (capital E) 2025-11-20 09:38:13 -07:00
kaleb-himes
301a4a554b Add header to make install set 2025-11-20 09:38:13 -07:00
kaleb-himes
dc6fa0ad4e De-couple ESV from DRBG 2025-11-20 09:38:13 -07:00
Josh Holtrop
80d3037332 Use more uppercase U's 2025-11-20 08:34:54 -05:00
Josh Holtrop
bb8673070a Use uppercase U 2025-11-19 23:52:21 -05:00
Josh Holtrop
2c4b6f46b7 Add scripts/rsapss.test to test RSA-PSS signature algorithm negotiation 2025-11-19 23:05:31 -05:00
JacobBarthelmeh
b6adf12f83 Merge pull request #9438 from douzzer/20251113-linuxkm-aarch64-fips-tweaks
20251113-linuxkm-aarch64-fips-tweaks
2025-11-19 17:42:45 -07:00
Daniel Pouzzner
bea6bcbba9 Merge pull request #9450 from JacobBarthelmeh/xilinx
adjust test case to account for AES-GCM key size support with Xilinx …
2025-11-19 18:14:10 -06:00
Daniel Pouzzner
30487ad236 linuxkm/: fixes for ARMv7, and miscellaneous fixes for Makefile and FIPS logic. 2025-11-19 17:21:29 -06:00
Daniel Pouzzner
06d3d6d3df linuxkm/Kbuild and linuxkm/module_hooks.c: refactor wc_linuxkm_pie_reloc_tab to include ground truth segment tag from ELF metadata.
tweaks for ARM32: recognize R_ARM_* relocations, and add -fno-unwind-tables to PIE_FLAGS.

linuxkm/linuxkm_wc_port.h:
* __PIE__: don't declare static pmd_to_page() unless USE_SPLIT_PMD_PTLOCKS.
* add wc_lkm_refcount_to_int() helper with -Wnested-externs suppressed.

wolfcrypt/src/fe_operations.c: in fe_frombytes() and fe_sq2(), use explicit XMEMSET()s to initialize working vars, rather than implicit, to avoid implicit (unshimmable) memset() calls.

wolfcrypt/src/ge_operations.c: fix gate on _wc_curve25519_dummy() to require CURVED25519_ASM.
2025-11-19 17:21:29 -06:00
JacobBarthelmeh
23a6edcc89 adjust test case to account for AES-GCM key size support with Xilinx afalg 2025-11-19 23:00:13 +00:00
JacobBarthelmeh
96dde5b4a8 Merge pull request #9392 from philljj/bsdkm
bsdkm: initial wolfcrypt FreeBSD kernel module support.
2025-11-19 15:25:21 -07:00
Anthony Hu
668602016c Allow user to prevent wc_PKCS7_EcdsaVerify from erroring out due to extentions we do not know about 2025-11-19 14:36:04 -05:00
Josh Holtrop
268b81c29e TLSv1.3 certificate verify: report rsa_pss_pss_* signature algorithm when supported 2025-11-19 09:47:05 -05:00
JacobBarthelmeh
8d357de6d8 Merge pull request #9444 from dgarske/macros_explicit
Fix issue with poorly written macros
2025-11-18 17:28:12 -07:00
David Garske
64c03fa9ee Fix stm32.c type warnings 2025-11-18 14:33:11 -08:00
David Garske
658ea305d1 Fix issue with poorly written macros 2025-11-18 14:15:22 -08:00
JacobBarthelmeh
10c5baec1a Merge pull request #9442 from SparkiDev/lms_192_8bit_checksum
LMS - check sum fix for SHA-256-192
2025-11-18 14:57:21 -07:00
sebastian-carpenter
7fdd177233 fixed oss-fuzz warnings 2025-11-18 13:28:51 -07:00
jordan
631a28fccc bsdkm: better with-bsd-export-syms description in configure.ac. 2025-11-18 12:59:51 -06:00
jordan
0458fba394 bsdkm: add atomic_fcmpset_ptr. 2025-11-18 10:12:28 -06:00
jordan
551f90414c bsdkm: review cleanup. 2025-11-18 09:02:45 -06:00
Sean Parkinson
da0e4f59ec LMS - check sum fix for SHA-256-192
Only 8 bits needed of checksum whem doing 192-bit hashes with Winternitz
of 1 (9 for 256-bit hashes).
Cleanup code around checksum.
2025-11-18 21:20:02 +10:00
jordan
28e4fe3b6c bsdkm: initial wolfcrypt FreeBSD kernel module support. 2025-11-18 01:28:08 -06:00
Daniel Pouzzner
46a7719e2d Merge pull request #9441 from gojimmypi/pr-arduino-examples
Update Arduino workflow with parameterized matrix
2025-11-17 17:58:13 -06:00
JacobBarthelmeh
8e38e3bb5e Merge pull request #9433 from holtrop/rust-conditional-compilation
Rust wrapper: enable conditional compilation based on C library build options
2025-11-17 15:03:17 -07:00
JacobBarthelmeh
35374a16fe Merge pull request #9436 from douzzer/20251114-WOLFSSL_BLIND_PRIVATE_KEY-thread-safety
20251114-WOLFSSL_BLIND_PRIVATE_KEY-thread-safety
2025-11-17 15:01:13 -07:00
JacobBarthelmeh
2be7482210 Merge pull request #9439 from SparkiDev/mlkem_derive_secret_fix
ML-KEM: derive secret fix
2025-11-17 10:29:56 -07:00
gojimmypi
d2c0901e80 Update Arduino workflow with parameterized matrix 2025-11-17 08:41:28 -08:00
Sean Parkinson
074a3dbcc1 ML-KEM: derive secret fix
Fixes for deriving secret for ML-KEM.
2025-11-17 10:01:19 +10:00
Kamatham Pushyanth
9bc259ae6f Enable hardware acceleration for AES on PSoC6.
- Implemented AES ECB, CBC, CFB, and GCM modes with hardware acceleration.
- Ensured proper mutex locking for concurrent access to hardware resources during
- Adjusted the aes.h header to include PSoC6 specific definitions and structures.
- Updated README for PSoC6 port.
2025-11-16 00:12:09 +05:30
Daniel Pouzzner
c29abccc9f src/internal.c: peer review: refactor wolfssl_priv_der_unblind() and wolfssl_priv_der_unblind_free() to use AllocDer() and FreeDer(). 2025-11-14 18:13:44 -06:00
Daniel Pouzzner
dee0658e8a fix races around WOLFSSL_CTX.{privateKey,privateKeyMask,altPrivateKey,altPrivateKeyMask} in WOLFSSL_BLIND_PRIVATE_KEY code paths:
* rename wolfssl_priv_der_unblind() to wolfssl_priv_der_blind_toggle(),
* add wolfssl_priv_der_unblind() that allocates a temp copy,
* add wolfssl_priv_der_unblind_free(),
* in wolfssl_priv_der_blind_toggle(), make mask a const arg;

restore const attribute to ctx arg to wolfSSL_CTX_get0_privatekey(), and add explanatory comment.
2025-11-14 18:13:43 -06:00
David Garske
5c421a152d Merge pull request #9429 from JacobBarthelmeh/certs
renew example certificates
2025-11-14 16:02:55 -08:00
JacobBarthelmeh
a68da8d2d5 update pksc7 decode test for new ca-cert.pem size 2025-11-14 14:53:48 -07:00
JacobBarthelmeh
3f441ef1a5 update tests after certificate renewal 2025-11-14 14:45:37 -07:00
JacobBarthelmeh
6c74098be5 run renewcerts.sh, gencertbuf.pl, and create_ocsp_test_blobs.py 2025-11-14 14:45:37 -07:00
JacobBarthelmeh
d18b251f54 Merge pull request #9420 from wolfSSL/TLS13-cipher-suite-fix
Fix TLS 1.3 cipher suite when TLS 1.2 ciphers precede TLS 1.3 ciphers
2025-11-14 16:42:05 -05:00
David Garske
46a2234c61 Merge pull request #9425 from JacobBarthelmeh/pkcs7_stream
with decode enveloped data track total encrypted content size
2025-11-14 12:59:09 -08:00
JacobBarthelmeh
30baf0a2e0 Merge pull request #9435 from dgarske/hmac_zerolen
Improve wc_HmacUpdate to return early if input length == 0
2025-11-14 15:49:04 -05:00
Ruby Martin
59800d8bb7 additional index checks, handle when j is 0 or 1 2025-11-14 12:19:58 -07:00
David Garske
a071426bc8 Migrate wolfAsyncCrypt repo into wolfSSL proper 2025-11-14 09:43:59 -08:00
David Garske
4e1b719236 Improve wc_HmacUpdate to return early if input length == 0. Fixes QAT issue with HKDF test. 2025-11-14 09:40:56 -08:00
Eric Blankenhorn
fda674a48a Clarify return value of wc_RsaSSL_Verify/Inline 2025-11-14 11:06:26 -06:00
jackctj117
0767cb84bf Removed trailing white space 2025-11-14 09:03:51 -07:00
Josh Holtrop
c61ac22e89 Rust wrapper: enable conditional compilation based on C library build options 2025-11-14 10:44:25 -05:00
Josh Holtrop
dd3b9260f9 Rust wrapper: merge wolfssl-sys crate into wolfssl crate 2025-11-14 10:44:06 -05:00
philljj
50c5028c5a Merge pull request #9432 from douzzer/20251114-atomic-default-c
20251114-atomic-default-c
2025-11-14 10:34:24 -05:00
Daniel Pouzzner
135bb66352 wolfssl/wolfcrypt/wc_port.h and wolfcrypt/src/wc_port.c: use stdatomic.h implementation as C default when available, as before, for proper type annotation in objects. 2025-11-14 07:54:14 -06:00
Sean Parkinson
10a60fc41b Merge pull request #9427 from douzzer/20251113-ZD20815
20251113-ZD20815
2025-11-14 11:50:16 +10:00
jackctj117
5e2fd78113 Suppress unused parameter warning 2025-11-13 18:32:00 -07:00
Daniel Pouzzner
7916db78e8 wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: change precedence of atomic implementations, and don't use the stdatomic.h in C++ builds (not compatible);
fix the name of the wolfSSL_Atomic_Ptr_CompareExchange() implementation in the _MSC_VER code path.
2025-11-13 17:28:19 -06:00
Daniel Pouzzner
c430cc75ea src/ssl.c and wolfssl/ssl.h: fix signature on wolfSSL_CTX_get0_privatekey() -- ctx is not const;
wolfcrypt/src/wc_port.c and wolfssl/wolfcrypt/wc_port.h: tweak gates on atomic implementations to maximize availability within currently supported targets;

fix some whitespace.
2025-11-13 17:11:52 -06:00
Daniel Pouzzner
26ba6344f2 add wolfSSL_Atomic_Ptr_CompareExchange(); mitigate race on ctx->privateKeyPKey in wolfSSL_CTX_get0_privatekey(). 2025-11-13 16:25:49 -06:00
JacobBarthelmeh
c63ca04228 convert to type int for return value 2025-11-13 12:17:04 -07:00
JacobBarthelmeh
d06221c16e with decode enveloped data track total encrypted content size 2025-11-13 12:08:46 -07:00
jackctj117
29c2f15a8f Add #ifdef guards to cipher suite checks 2025-11-13 10:06:07 -07:00
David Garske
6ff57b8045 Merge pull request #9419 from rlm2002/coverity
Uninitialized variable fix
2025-11-13 08:58:00 -08:00
David Garske
4f3586fe58 Merge pull request #9421 from SparkiDev/mlkem_to_bytes_fix
ML-KEM to bytes C: not reducing all values
2025-11-13 08:57:31 -08:00
David Garske
082943649b Merge pull request #9422 from SparkiDev/ecc_sign_hash_inlen_check
ECC sign hash: only allow up to max digest size
2025-11-13 08:55:53 -08:00
effbiae
de0d3e610d refactor to ExportEccTempKey, DhSetKey and others 2025-11-13 14:49:26 +11:00
Sean Parkinson
6c30186168 ECC sign hash: only allow up to max digest size
Validate that the hash passed in is of an appropriate length - not
greater than the maximum digest size.
2025-11-13 11:53:51 +10:00
Sean Parkinson
b272f784ec ML-KEM to bytes C: not reducing all values
Call to mlkem_csubq_c was only called on first array.
Fixed to do it for all.
2025-11-13 10:42:07 +10:00
David Garske
5a8411a1ad Merge pull request #9418 from SparkiDev/tls13_ks_dup_check_fix
TLS 1.3 duplicate KeyShare entry fix
2025-11-12 16:09:11 -08:00
David Garske
f53191bae2 Merge pull request #9416 from julek-wolfssl/priv-key-blinding
Fix errors when blinding private keys
2025-11-12 16:09:03 -08:00
jackctj117
c56ea55f89 Fix TLS 1.3 cipher suite selection when TLS 1.2 ciphers precede TLS 1.3 ciphers 2025-11-12 17:03:06 -07:00
Ruby Martin
b2336c57ce initialize ctype variable 2025-11-12 16:48:52 -07:00
Sean Parkinson
1ec18949bc TLS 1.3 duplicate KeyShare entry fix
Fix comparison to be greater than or equal in case count is incremented
after maxing out.
2025-11-13 08:23:19 +10:00
David Garske
e78752f3b2 Merge pull request #9407 from holtrop/rust-heap-devid-cleanup
Rust wrapper: support optional heap and dev_id parameters
2025-11-12 13:50:45 -08:00
David Garske
7cfffd5bbc Merge pull request #9308 from kareem-wolfssl/zd20603
Add IPv6 support to wolfSSL_BIO_new_accept and wolfIO_TcpBind.
2025-11-12 11:09:17 -08:00
Josh Holtrop
40c471e20d Rust wrapper: fix cmac documentation 2025-11-12 13:41:08 -05:00
David Garske
92fffa166b Merge pull request #9413 from JacobBarthelmeh/lic
update to GPLv3 exception list, add Fetchmail and OpenVPN
2025-11-12 10:12:29 -08:00
David Garske
3fe534e3a2 Merge pull request #9403 from gojimmypi/pr-lms-unary-fix
Fix LMS C4146 unary minus warning in MSVC, new param check
2025-11-12 08:40:33 -08:00
Juliusz Sosinowicz
32911dc6b8 Add blinding to CI 2025-11-12 17:12:35 +01:00
Juliusz Sosinowicz
4b7c052ee9 test_wolfSSL_inject: don't call accept on completed handshake 2025-11-12 17:12:22 +01:00
Juliusz Sosinowicz
d1c321abdc Don't override errors when blinding the priv key 2025-11-12 17:12:22 +01:00
Josh Holtrop
df99227dc8 Rust wrapper: use _ex APIs for heap and dev_id variants 2025-11-12 09:50:20 -05:00
gojimmypi
ca920edbd0 Fix LMS C4146 unary minus warning in MSVC, new param check 2025-11-11 19:26:52 -08:00
Kareem
fbb7ae2257 Add NULL check to wolfSSL_BIO_new_accept. 2025-11-11 16:20:09 -07:00
Kareem
3296e6a1f0 Merge remote-tracking branch 'upstream/master' into zd20603 2025-11-11 16:15:22 -07:00
David Garske
6914f08f5e Merge pull request #9391 from holtrop/check-dup-extensions-fix
Check for duplicate extensions in client hello when HAVE_TLS_EXTENSIONS is not set - fix #9377
2025-11-11 14:05:14 -08:00
Josh Holtrop
798b16dcef Address more code review feedback for PR 9391 2025-11-11 15:36:28 -05:00
Josh Holtrop
32b00fd10b Address code review feedback for PR 9391 2025-11-11 14:06:44 -05:00
David Garske
4c273a6f3f Merge pull request #9404 from cconlon/jniNoQuicEch
Fixes for "--enable-jni --enable-all" with WOLFSSL_TLS13_MIDDLEBOX_COMPAT
2025-11-11 09:42:38 -08:00
David Garske
e323fb9675 Merge pull request #9410 from SparkiDev/multi_arch_opt
Workflow: multiple architectures with different -O levels
2025-11-11 09:42:21 -08:00
David Garske
2db1c7a522 Merge pull request #9395 from SparkiDev/tls12_cv_sig_check
TLS 1.2 CertificateVerify: validate sig alg matches peer key
2025-11-11 09:18:11 -08:00
JacobBarthelmeh
4da365214a Merge pull request #9412 from SparkiDev/regression_fixes_21
Regression testing fixes
2025-11-11 09:32:43 -07:00
Sean Parkinson
d84564217c Regression testing fixes
Fix #ifdef protection for AES tests.
2025-11-11 21:46:04 +10:00
Sean Parkinson
702f6ce94f Workflow: multiple architectures with different -O levels
Test configurations with different optimization levels: -O2, -O3, -O1,
-O0, -Os, -Ofast
2025-11-11 17:50:48 +10:00
Sean Parkinson
f54ca0d481 TLS 1.2 CertificateVerify: req sig alg to have been in CR
The signature algorithm specified in CertificateVerify must have been in
the CertificateRequest. Add check.

The cipher suite test cases, when client auth and RSA are built-in and
use the default client certificate and use the *-ECDSA-* cipher
suites, no longer work. The client certificate must be ECC when the
cipher suite has ECDSA. Don't run them for that build.
2025-11-11 13:20:46 +10:00
David Garske
967f520c28 Merge pull request #9408 from anhu/stateful_integ_deprecate
Deprecate LMS and XMSS integrations.
2025-11-10 15:17:51 -08:00
JacobBarthelmeh
0fa2274a16 Merge pull request #9406 from SparkiDev/sp_label_noinline
SP label noinline: function inlined even when asked not to
2025-11-10 14:52:14 -07:00
Anthony Hu
0771bc42d6 Deprecate LMS and XMSS integrations. 2025-11-10 15:13:06 -05:00
Josh Holtrop
4102f8272e Rust wrapper: support optional heap and dev_id parameters 2025-11-10 13:53:51 -05:00
David Garske
2c47675194 Merge pull request #9333 from gojimmypi/pr-msvc-random
Conditional wolfcrypt-only wc_RNG_GenerateBlock for MSVC
2025-11-10 08:33:54 -08:00
Josh Holtrop
3af60ff85d Check for duplicate extensions in client hello when HAVE_TLS_EXTENSIONS is not set - fix #9377 2025-11-10 10:06:07 -05:00
Sean Parkinson
b7ade58c52 SP label noinline: function inlined even when asked not to
The label L_521_mont_reduce_9_nomask is therefore appearing more than
once in the compiled code.
Adding '%=' to the end of the label ensure it has a unique number
appended to it even when inlined.
2025-11-10 20:05:41 +10:00
Daniel Pouzzner
9c1526c90d Merge pull request #9401 from cconlon/jniPublicMp
Add WOLFSSL_PUBLIC_MP to --enable-jni for wolfJCE RSA KeyFactory support
2025-11-08 11:07:54 -06:00
Daniel Pouzzner
f977004dca Merge pull request #9400 from cconlon/ocspStaplingTls13MultiMktemp
Use portable mktemp syntax in ocsp-stapling_tls13multi.test
2025-11-08 11:07:28 -06:00
Daniel Pouzzner
9e9a7392d4 Merge pull request #9373 from julek-wolfssl/WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY
Add missing WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY guards
2025-11-08 11:04:43 -06:00
Daniel Pouzzner
ea4311666e Merge pull request #9367 from julek-wolfssl/wolfDTLS_accept_stateless-early-data
wolfDTLS_accept_stateless: Fix handling for early data
2025-11-08 11:04:19 -06:00
Daniel Pouzzner
8b3eaa0eff Merge pull request #9370 from gojimmypi/pr-watcom-update
Update and pin Watcom to 2025-11-03-Build release
2025-11-08 09:31:22 -06:00
Chris Conlon
fdec53c4c9 skip test_tls13_hrr_different_cs() test when WOLFSSL_TLS13_MIDDLEBOX_COMPAT is defined 2025-11-07 17:09:30 -07:00
Chris Conlon
0cf3728ca0 update "--enable-jni --enable-all" combo to exclude QUIC and ECH, not compatible with WOLFSSL_TLS13_MIDDLEBOX_COMPAT 2025-11-07 16:50:41 -07:00
David Garske
b45217db00 Merge pull request #9402 from anhu/stsafe_doc
Correction about how to get interface files.
2025-11-07 13:59:45 -08:00
Anthony Hu
22ab16df97 Correction about how to get interface files. 2025-11-07 16:53:30 -05:00
Chris Conlon
88373d8cb5 add WOLFSSL_PUBLIC_MP to --enable-jni for wolfJCE RSA KeyFactory support 2025-11-07 14:14:51 -07:00
JacobBarthelmeh
4f4826ae92 Merge pull request #9385 from anhu/not_len
Use suites->hashSigAlgoSz when calling TLSX_SignatureAlgorithms_MapPss
2025-11-07 13:49:30 -07:00
gojimmypi
8654599e61 Conditional wolfcrypt-only wc_RNG_GenerateBlock for MSVC 2025-11-07 11:08:44 -08:00
JacobBarthelmeh
0d49df7735 update to GPLv3 exception list, add Fetchmail and OpenVPN 2025-11-07 12:06:29 -07:00
JacobBarthelmeh
4c5bc5f8fe Merge pull request #9387 from SparkiDev/tls12_cr_order
TLS 1.2: client message order check
2025-11-07 10:00:39 -07:00
JacobBarthelmeh
222f6084f8 Merge pull request #9399 from douzzer/20251106-linuxkm-PIE-inline-thunks
20251106-linuxkm-PIE-inline-thunks
2025-11-07 08:33:53 -07:00
Sean Parkinson
58bd6a8d94 TLS 1.2 CertificateVerify: validate sig alg matches peer key
Don't proceed with parsing CertificateVerify message in TLS 1.2 if the
signature algorithm doesn't match the peer's key (key from client
certificate).
2025-11-07 13:26:26 +10:00
JacobBarthelmeh
a96b35c0ff Merge pull request #9398 from toddouska/master
Add GPLv2 exception list to LICENSING
2025-11-06 17:19:59 -07:00
Chris Conlon
f208716b80 use portable mktemp syntax in scripts/ocsp-stapling_tls13multi.test for macOS compatibility 2025-11-06 16:54:23 -07:00
Daniel Pouzzner
53a20f4928 linuxkm/Kbuild: when ENABLED_LINUXKM_PIE, use inline thunks on all objects, not just PIE objects, to resolve false-positive "unpatched thunk" warnings on some kernels/configs. also cleans up flag setup more generally. 2025-11-06 17:37:07 -06:00
Sean Parkinson
f376c8d910 Merge pull request #9388 from lealem47/scan_build
Various fixes for nightly tests
2025-11-07 09:30:08 +10:00
Sean Parkinson
3416a0f70e Merge pull request #9393 from rlm2002/zd20756
Integer overflow and dead code removal
2025-11-07 09:27:05 +10:00
Todd Ouska
e02de78507 Add GPLv2 exception list to LICENSING 2025-11-06 15:18:57 -08:00
Sean Parkinson
98d84eb435 Merge pull request #9396 from julek-wolfssl/fil-c-674
Updates the Fil-C version to 0.674
2025-11-07 08:39:38 +10:00
JacobBarthelmeh
ca51fda3bb Merge pull request #9372 from SparkiDev/curve25519_no_lshift_neg_val
Curve25519: lshift of a negative value is undefined in C
2025-11-06 15:22:38 -07:00
Lealem Amedie
15ecc2e4da Update Rowley settings to define WOLFSSL_NO_SOCK 2025-11-06 15:11:49 -07:00
Ruby Martin
ec60d88f82 remove deadcode else statement when computing kid_type 2025-11-06 15:04:37 -07:00
Ruby Martin
9b2f7a371f remove duplicate keylen check (deadcode)
wrap if statement in macro guard
2025-11-06 15:04:37 -07:00
Ruby Martin
78f2e65da6 add cast to int64_t 2025-11-06 14:58:37 -07:00
Lealem Amedie
2b8f83fd8d Fixes for getrandom detection 2025-11-06 14:16:38 -07:00
Lealem Amedie
d3de6305e8 Exit wolfcrypt test if wolfCrypt_Init fails 2025-11-06 10:24:44 -07:00
Lealem Amedie
eecf82362e Check for getrandom declaration 2025-11-06 10:24:20 -07:00
Juliusz Sosinowicz
bd2cc5ba5c fixup! DTLS: Introduce custom I/O callbacks API and structure 2025-11-06 18:07:18 +01:00
Juliusz Sosinowicz
c2377fd266 DTLS: Clear userSet when peer is set in EmbedReceiveFrom
This allows us to differentiate between the user explicitly setting a peer and wolfio setting it. When wolfio sets the peer, we want to be able to update the peer address while in stateless parsing (governed by the `newPeer` variable).
2025-11-06 17:13:45 +01:00
Juliusz Sosinowicz
975033c64f DTLS: Introduce returnOnGoodCh option for early ClientHello processing return 2025-11-06 17:13:45 +01:00
Juliusz Sosinowicz
6e826583a3 DTLS: Add tests for custom I/O callbacks and stateless handling with wolfio 2025-11-06 17:13:45 +01:00
Juliusz Sosinowicz
0d7fe2f0a4 DTLS: Introduce custom I/O callbacks API and structure 2025-11-06 17:13:45 +01:00
Juliusz Sosinowicz
3ebc0c5f99 Update logs 2025-11-06 16:39:48 +01:00
Juliusz Sosinowicz
ed970e7cd8 Add missing WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY guards 2025-11-06 16:35:11 +01:00
Juliusz Sosinowicz
0355a31192 Updates the Fil-C version to 0.674 2025-11-06 13:48:32 +01:00
Lealem Amedie
08db159c5d Fixes for minor scan-build warnings 2025-11-05 21:27:06 -07:00
lealem47
9780137962 Merge pull request #9394 from JacobBarthelmeh/caam
avoid warning when building without user_settings.h and options.h
2025-11-05 17:24:19 -07:00
Sean Parkinson
3ec882cd66 Merge pull request #9380 from julek-wolfssl/ip-addr-check
Improve domain and IP address matching in certificate verification
2025-11-06 09:49:07 +10:00
Sean Parkinson
aba0246550 Merge pull request #9389 from holtrop/rust-wc-pbkdf2
Rust wrapper: add PBKDF2 and PKCS #12 PBKDF wrappers
2025-11-06 09:46:04 +10:00
Sean Parkinson
b0a7f5938c Merge pull request #9379 from holtrop/rust-wc-ed448
Rust wrapper: add wolfssl::wolfcrypt::ed448 module
2025-11-06 09:38:32 +10:00
JacobBarthelmeh
8077551ba8 avoid warning when building without user_settings.h and options.h for QNX CAAM 2025-11-05 16:03:09 -07:00
Sean Parkinson
aa0b37a7e5 Merge pull request #9384 from night1rider/crypto-callback-return-fix
Reset Return to Success if fallback to software Copy Callbacks Sha
2025-11-06 08:50:00 +10:00
Sean Parkinson
fe69a7cf5a Merge pull request #9390 from kaleb-himes/test-code-bug-fix
Addressing a bug in the test logic
2025-11-06 08:49:15 +10:00
Sean Parkinson
97e9fa09bd Merge pull request #9330 from rizlik/dtls13_want_write_fix
Dtls13: Fix handshake hangs on WANT_WRITE I/O error
2025-11-06 08:31:29 +10:00
Daniel Pouzzner
3d99090bcb Merge pull request #9374 from philljj/spelling_cleanup
wolfcrypt test: tiny spelling correction.
2025-11-05 13:44:44 -06:00
kaleb-himes
b379de4119 Addressing a bug in the test logic 2025-11-05 10:28:19 -07:00
philljj
d73af7ab77 Merge pull request #9383 from douzzer/20251104-linuxkm-Kbuild-EXPORT_SYMBOL
20251104-linuxkm-Kbuild-EXPORT_SYMBOL
2025-11-05 11:08:49 -06:00
Josh Holtrop
797194f85b Rust wrapper: add PBKDF2 and PKCS #12 PBKDF wrappers 2025-11-05 09:25:52 -05:00
Sean Parkinson
958fa1af60 TLS 1.2: client message order check
Error when client receives CertificateRequest out of order: not after
Certificate and not after ServerKeyExchange if being sent.
2025-11-05 10:00:11 +10:00
Anthony Hu
6e583a01f1 Use suites->hashSigAlgoSz instead of len in call to TLSX_SignatureAlgorithms_MapPss 2025-11-04 15:36:33 -05:00
night1rider
572776e685 Reset return value to success when copy callback requests to use software function instead 2025-11-04 13:25:16 -07:00
Daniel Pouzzner
6885573d3d linuxkm/Kbuild: add helper variable EXPORT_SYMBOL to facilitate export attribute control. 2025-11-04 14:00:58 -06:00
philljj
9fdcd2e72a Merge pull request #9382 from douzzer/20251104-WC_MUTEX_OPS_INLINE
20251104-WC_MUTEX_OPS_INLINE
2025-11-04 13:00:08 -06:00
Josh Holtrop
7f0e575ed7 Rust wrapper: fix ed448 documentation issues from code review 2025-11-04 13:49:06 -05:00
Daniel Pouzzner
54dc060579 implement WC_MUTEX_OPS_INLINE and WC_RWLOCK_OPS_INLINE gates. 2025-11-04 12:01:58 -06:00
philljj
4b93e3ecf7 Merge pull request #9381 from douzzer/20251104-fixes
20251104-fixes
2025-11-04 11:41:23 -06:00
Juliusz Sosinowicz
f95cb4e9bf Improve domain and IP address matching in certificate verification
- Distinguish between domain and IP address checks.
- Update curl action to test with httpd server
2025-11-04 18:36:29 +01:00
Daniel Pouzzner
abec842c59 wolfcrypt/src/asn.c: in wc_Ed25519PublicKeyToDer(), when old FIPS, cast "key" arg to wc_ed25519_export_public(). 2025-11-04 09:38:50 -06:00
Daniel Pouzzner
656fe3da7c linuxkm/{module_hooks.c,linuxkm_wc_port.h}: in wc_lkm_LockMutex(), when interruptible, check for signals, and add __must_check attribute. 2025-11-04 09:37:37 -06:00
Josh Holtrop
b82cccce21 Rust wrapper: add wolfssl::wolfcrypt::ed448 module 2025-11-04 08:34:46 -05:00
Daniel Pouzzner
d47108c97f Merge pull request #9368 from holtrop/rust-wc-ed25519
Rust wrapper: add wolfssl::wolfcrypt::ed25519 module
2025-11-03 22:40:43 -06:00
Sean Parkinson
e4d47fb5c7 Curve25519/448: lshift of negative is undefined in C
Change all left shifts to be of unsigned values.
In some cases the values were negative.

Changed 128-bit variable implementation of Curve25519. (generated)
Changed Ed25519 C implementation.
Changed Curve448 C implementation. (generated)
Changed Ed448 C implementation. (generated)
2025-11-04 10:40:23 +10:00
philljj
e0eac95fc9 Merge pull request #9375 from douzzer/20251103-linuxkm-Makefile-bash-workaround
20251103-linuxkm-Makefile-bash-workaround
2025-11-03 18:13:45 -06:00
gojimmypi
0714c535f1 Update and pin Watcom to 2025-11-03-Build release 2025-11-03 10:42:18 -08:00
Daniel Pouzzner
a43e416f66 linuxkm/Makefile: work around bash pecularity in libwolfssl.ko recipe ( [[ -f foo ]] is true even if foo is a symbolic link). 2025-11-03 12:00:40 -06:00
jordan
720b8e117c wolfcrypt test: tiny spelling correction. 2025-11-03 10:06:47 -06:00
philljj
9a4fa0df2c Merge pull request #9369 from douzzer/20251027-linuxkm-aarch64-fips
20251027-linuxkm-aarch64-fips
2025-11-03 09:45:16 -06:00
Marco Oliverio
33be31aeea test: dtls: add description for WANT_WRITE tests 2025-11-03 13:43:33 +01:00
Marco Oliverio
bb284247b3 test_dtls: change approach in want_write hs testing 2025-11-03 13:43:33 +01:00
Marco Oliverio
412a78261d test_dtls: increase coverage for non-blocking I/O 2025-11-03 13:43:33 +01:00
Marco Oliverio
6855325bf8 test: memio: simulate_want_write: block client on is_client == true 2025-11-03 13:43:33 +01:00
Marco Oliverio
0127571238 dtls13: advance buffer index on error 2025-11-03 13:43:33 +01:00
Marco Oliverio
17a08b9e36 test_dtls: return WANT_WRITE in DTLSv1.3 CH parsing 2025-11-03 13:43:33 +01:00
Sean Parkinson
574067e204 Curve25519: lshift of a negative value is undefined in C
Change all left shifts to be of unsigned values.
In some cases the values were negative.

Added macros to make the code easier to be consistent.
2025-11-03 22:08:52 +10:00
Masaki I.
87c4646e97 [ja] update docs 2025-11-02 19:07:26 +09:00
Daniel Pouzzner
5922b5def5 Merge pull request #9363 from julek-wolfssl/refactor-zero-return
Improve TLS 1.3 early data handling.
2025-10-31 17:39:11 -05:00
Daniel Pouzzner
78ff20569e linuxkm:
globally rename+unify:
* HAVE_LINUXKM_PIE_SUPPORT and USE_WOLFSSL_LINUXKM_PIE_REDIRECT_TABLE under gate WC_PIE_RELOC_TABLES
* WC_LKM_INDIRECT_SYM_BY_FUNC_ONLY as WC_PIE_INDIRECT_SYM_BY_FUNC_ONLY
* WC_LKM_INDIRECT_SYM_BY_DIRECT_TABLE_READ as WC_PIE_INDIRECT_SYM_BY_DIRECT_TABLE_READ
* WC_LKM_INDIRECT_SYM() as WC_PIE_INDIRECT_SYM;

linuxkm/linuxkm_wc_port.h:
* implement pointer-caching inline wolfssl_linuxkm_get_pie_redirect_table_local() for the WC_PIE_INDIRECT_SYM_BY_FUNC_ONLY path;
* for FIPS_VERSION3_GE(6,0,0), add wolfCrypt_FIPS_*_ro_sanity pointers to struct wolfssl_linuxkm_pie_redirect_table, and corresponding ad hoc prototypes;

linuxkm/Makefile and linuxkm/module_hooks.c: move wc_linuxkm_pie_reloc_tab into the wolfCrypt PIE container;

linuxkm/module_hooks.c and linuxkm/linuxkm_wc_port.h: harmonize the types of __wc_{text,rodata}_{start,end} with wolfCrypt_FIPS_{first,last,ro_start,ro_end} to allow drop-in use of the all-inclusive ELF fenceposts, activated by WC_USE_PIE_FENCEPOSTS_FOR_FIPS.
2025-10-31 16:03:51 -05:00
Josh Holtrop
7cbcd0b00d Rust wrapper: add wolfssl::wolfcrypt::ed25519 module 2025-10-31 11:03:15 -04:00
David Garske
b6cfdcb758 Merge pull request #9366 from douzzer/20251030-linuxkm-amd64-vec-op-sunrise
20251030-linuxkm-amd64-vec-op-sunrise
2025-10-31 07:32:41 -07:00
David Garske
f07cd264fe Merge pull request #9365 from douzzer/20251030-wc_linuxkm_normalize_relocation-straddle-math
20251030-wc_linuxkm_normalize_relocation-straddle-math
2025-10-31 07:31:50 -07:00
Daniel Pouzzner
9273c00566 Merge pull request #9364 from dgarske/silabs_ecb
Fixed issue with AES ECB offloading to hardware to use full size
2025-10-30 23:55:31 -05:00
Daniel Pouzzner
643cbe127d Merge pull request #9354 from rlm2002/coverity
20251027 Coverity fixes
2025-10-30 23:54:18 -05:00
Daniel Pouzzner
7085421dd0 Merge pull request #9340 from julek-wolfssl/tls13-hrr-cs-change
Validate cipher suite after HelloRetryRequest
2025-10-30 23:46:50 -05:00
Daniel Pouzzner
299257eae9 Merge pull request #9360 from SparkiDev/aarch64_sha256_vreg_fix
Aarch64 ASM: missing push and pop of vector regs
2025-10-30 23:46:11 -05:00
Daniel Pouzzner
bac055dc14 Merge pull request #9357 from holtrop/rust-wc-srtp-kdf
Rust wrapper: add SRTP/SRTCP KDF functions to kdf module
2025-10-30 23:45:48 -05:00
Daniel Pouzzner
a2b3af095d Merge pull request #9339 from effbiae/EcMakeKey
refactor to EcMakeKey
2025-10-30 23:45:22 -05:00
Daniel Pouzzner
9c031608ef Merge pull request #9349 from effbiae/EcExportHsKey
refactor to EcExportHsKey
2025-10-30 23:44:58 -05:00
Daniel Pouzzner
f1f2423f3c linuxkm/x86_vector_register_glue.c: remove static assert on kernel >= 5.4.0 -- current implementation is unaffected by the noted bugs on < 5.4.0. 2025-10-30 18:08:54 -05:00
Daniel Pouzzner
5425894127 linuxkm/module_hooks.c: in wc_linuxkm_normalize_relocation(), when the
relocation straddles the buffer at end, return the exact offset of the next
   relocation, rather than blindly backing up sizeof reloc_buf - 1, otherwise
   byte(s) in a relocation immediately preceding will be denormalized.
2025-10-30 17:38:10 -05:00
David Garske
c5ae76e40d Fixed issue with AES ECB offloading to hardware to use full size, not
just block
2025-10-29 15:52:33 -07:00
Juliusz Sosinowicz
3209d264b8 Improve TLS 1.3 early data handling.
Introduce `clientInEarlyData` to only return when in `wolfSSL_read_early_data`. This makes sure that other API don't return `ZERO_RETURN` when not in `wolfSSL_read_early_data`. Chose `APP_DATA_READY` as it won't result in a false positive return from `wolfSSL_read_early_data`.
2025-10-29 19:04:36 +01:00
David Garske
d45678472d Merge pull request #9361 from douzzer/20251029-NullPointerArithm-fixes
20251029-NullPointerArithm-fixes
2025-10-29 09:12:40 -07:00
Daniel Pouzzner
d260493642 src/internal.c: in HashOutput(), check for null output pointer;
examples/pem/pem.c: in main(), add missing check that ret == 0 in _DER_TO_PEM code path.
2025-10-29 10:04:24 -05:00
Juliusz Sosinowicz
7b7f9a4fe0 dtls: Check PSK ciphersuite against local list 2025-10-29 13:14:50 +01:00
Juliusz Sosinowicz
c14b1a0504 Validate cipher suite after HelloRetryRequest
- Add validation to ensure the cipher suite in the ServerHello matches the one specified in the HelloRetryRequest.
- test_TLSX_CA_NAMES_bad_extension: use the same ciphersuite in HRR and SH
2025-10-29 13:14:50 +01:00
David Garske
df79b1062f Merge pull request #9359 from douzzer/20251028-fixes
20251028 fixes
2025-10-28 16:57:43 -07:00
Sean Parkinson
d7807d39e0 Aarch64 ASM: missing push and pop of vector regs
Generated code wasn't pushing and poping vector registers when they were
64-bit.
Generation code fixed and SHA-256 ASM code fixed.
2025-10-29 09:15:32 +10:00
Daniel Pouzzner
8c60b7b250 src/internal.c and tests/api.c: fix clang-analyzer-core.NullPointerArithms. 2025-10-28 16:42:14 -05:00
Daniel Pouzzner
9b90ea83eb src/x509.c: in wolfSSL_X509_get_ext_by_OBJ() and wolfSSL_X509_load_cert_crl_file(), add local protection from null derefs (fixes -Wnull-dereferences);
wolfcrypt/src/chacha.c and wolfssl/wolfcrypt/chacha.h: implement USE_ARM_CHACHA_SPEEDUP gate;

wolfcrypt/src/kdf.c: in wc_SSH_KDF(), add early return if _HashInit() fails (fixes _HashFree() of uninited _hash);

wolfcrypt/src/sha256.c: initialize sha256->W in ARMASM variant of wc_InitSha256_ex(), and pass sha256->heap to XMALLOC/XFREE consistently.
2025-10-28 16:42:14 -05:00
Daniel Pouzzner
097cd576ff linuxkm/module_hooks.c: in wc_linuxkm_GenerateSeed_IntelRD(), log when RDSEED support is missing, and add verbose logging for generation failures. 2025-10-28 16:42:14 -05:00
Ruby Martin
e546d319c1 Fix Coverity INTEGER_OVERFLOW in sp_to_unsigned_bin, avoid unsigned underflow 2025-10-28 11:12:19 -06:00
Ruby Martin
7aec2a8280 separate BAD_FUNC_ARG error from ASN_NO_PEM_HEADER 2025-10-28 10:01:10 -06:00
David Garske
1d64a4ed8f Merge pull request #9352 from holtrop/rust-wc-cmac
Rust wrapper: add wolfssl::wolfcrypt::cmac module
2025-10-28 08:58:06 -07:00
David Garske
a4be322fd6 Merge pull request #9356 from SparkiDev/sp_asm_add_sub_p384_arm
SP ASM ARM32/Thumb2: inline asm for add and subs
2025-10-28 08:55:54 -07:00
effbiae
1c8e7885b4 refactor to EcMakeKey 2025-10-28 08:46:47 -07:00
Josh Holtrop
bc72ac375e Rust wrapper: fix minor typo in srtcp_kdf_label example 2025-10-28 11:43:06 -04:00
Josh Holtrop
ef92114347 Rust wrapper: cmac: consume CMAC in finalize() 2025-10-28 08:41:28 -04:00
Josh Holtrop
bfa04ca5be Rust wrapper: cmac: fix "success" typo 2025-10-28 08:32:12 -04:00
Josh Holtrop
2e281ae2c6 Rust wrapper: add SRTP/SRTCP KDF functions to kdf module 2025-10-28 07:34:11 -04:00
Sean Parkinson
50521699af SP ASM ARM32/Thumb2: inline asm for add and subs
Implement add, sub, double and triple in assembly for P384.
2025-10-28 17:49:40 +10:00
effbiae
993ecad16a refactor to EcExportHsKey 2025-10-28 16:01:39 +11:00
Daniel Pouzzner
85bfc49711 Merge pull request #9355 from SparkiDev/aes_arm_asm_fix
AES ARM ASM: user data loaded 1 reg at a time
2025-10-27 23:06:17 -05:00
Sean Parkinson
d883a950d2 ML-KEM SHA-3: fix r
Constant r wasn't being loaded into register in all assembly functions
that use it - it just got lucky most of the time.
2025-10-28 12:04:12 +10:00
Sean Parkinson
070923a373 AES ARM ASM: user data loaded 1 reg at a time
User key may not be aligned and need to use instructions that don't
require alignment. Change to use ldr instead of ldp or ldrd.
2025-10-28 11:03:58 +10:00
David Garske
e6af5bcd4f Merge pull request #9353 from embhorn/gh9347
Build errors in memtest config and sniffer
2025-10-27 13:15:00 -07:00
JacobBarthelmeh
a1d000cede Merge pull request #9343 from dgarske/silabs_aesdirect
Fixed issue with SiLibs AES Direct (required by DTLS v1.3)
2025-10-27 13:04:12 -06:00
David Garske
76abc43812 Put unused fix in correct location. 2025-10-27 10:25:31 -07:00
David Garske
c825d0b34c Merge pull request #9345 from JacobBarthelmeh/devid
fix for passing devId from WOLFSSL_CTX down to hash operation
2025-10-27 08:47:51 -07:00
Eric Blankenhorn
7ef560c188 Fix build error with memtest and memorylog 2025-10-27 10:47:13 -05:00
David Garske
594a3bc963 Merge pull request #9350 from SparkiDev/split_ssl_sk
Stack API: Pull out implementation into separate file
2025-10-27 08:46:43 -07:00
David Garske
4669aaeaed Merge pull request #9342 from julek-wolfssl/filc
Adds fil-c workflow for testing
2025-10-27 08:46:31 -07:00
David Garske
7bbe15936d Merge pull request #9290 from effbiae/make-pre-master-secret
refactor to Make(Dhe)PSKPreMasterSecret
2025-10-27 08:39:17 -07:00
Eric Blankenhorn
2f2d5b37fd Fix undeclared var use in sniffer 2025-10-27 10:33:25 -05:00
Josh Holtrop
a6cb6170b6 Rust wrapper: add wolfssl::wolfcrypt::cmac module 2025-10-27 10:41:26 -04:00
Sean Parkinson
91a526c218 fixup 2025-10-27 18:02:49 +10:00
Sean Parkinson
093cc04076 Stack API: Pull out implementation into separate file
General stack APIs pulled out into ssl_sk.c.
Other simple APIs also pulled out into ssl_sk.c.
wolfSSL_lh_retrieve also pulled out into ssl_sk.c.

Added tests of public APIs that weren't already tested.
2025-10-27 17:08:41 +10:00
David Garske
d54f5e7c6a Merge pull request #9346 from douzzer/20251025-fix-clang-tidy-all-crypto-no-sha-1
20251025-fix-clang-tidy-all-crypto-no-sha-1
2025-10-25 08:46:31 -07:00
Daniel Pouzzner
c9cc701097 src/internal.c: suppress clang-analyzer-deadcode.DeadStores in ImportPeerECCKey() introduced by 4964a1760a. 2025-10-25 08:55:23 -05:00
JacobBarthelmeh
1a779b3f73 fix for passing devId from WOLFSSL_CTX down to hash operation 2025-10-24 16:39:25 -06:00
David Garske
7524552b1a Merge pull request #9344 from douzzer/20251024-fixes
20251024-fixes
2025-10-24 14:45:44 -07:00
Daniel Pouzzner
c145b7ee81 wolfcrypt/src/aes.c: define GCM_GMULT_LEN() when WOLFSSL_ARMASM, and fix gating on wolfCrypt_FIPS_AES_sanity (always gate in for FIPS v7+);
wolfcrypt/src/port/af_alg/afalg_aes.c: check for null key arg;

configure.ac: rename BUILD_FIPS_CURRENT to BUILD_FIPS_V2_PLUS (no functional change), and remove unused ARMASM_DIST_SOURCES set up code added in #9332;

src/include.am:
* set up $(ARMASM_SHA256_C), and use it to properly include wolfcrypt/src/sha256.c alongside armasm when appropriate;
* fix gating on Curved25519 armasm (BUILD_FIPS_V6_PLUS, not BUILD_FIPS_V6);

tests/api/test_aes.c and wolfcrypt/test/test.c: gate out incompatible coverage for WOLFSSL_AFALG and WOLFSSL_KCAPI (test_wc_AesCbcEncryptDecrypt_MultiBlocks(), test_wc_AesCtrSetKey*(), test_wc_AesCtrEncrypt*(), test_wc_AesGcmEncryptDecrypt_Sizes()).
2025-10-24 15:08:56 -05:00
David Garske
d62b1068d2 Fixed issue with SiLibs AES Direct (required by DTLS v1.3). ZD 20695 2025-10-24 11:58:56 -07:00
Juliusz Sosinowicz
1ed1b83aa5 Adds fil-c workflow for testing 2025-10-24 20:14:57 +02:00
JacobBarthelmeh
a28e107722 Merge pull request #9336 from holtrop/rust-wc-kdf-prf
Rust wrapper: add wolfssl::wolfcrypt::kdf, wolfssl::wolfcrypt::prf
2025-10-24 09:27:56 -06:00
JacobBarthelmeh
62deeedb52 Merge pull request #9335 from cconlon/jniAesCts
Define HAVE_CTS for JNI build, used by JCE AES/CTS/NoPadding
2025-10-24 09:20:02 -06:00
David Garske
4282ad38ec Merge pull request #9300 from effbiae/ImportPeerECCKey
refactor to ImportPeerECCKey
2025-10-24 08:17:54 -07:00
David Garske
c354202f11 Merge pull request #9341 from holtrop/rust-dh-test-fix
Rust wrapper: fix intermittent test_dh failure
2025-10-24 08:17:35 -07:00
Josh Holtrop
2127365559 Rust wrapper: fix intermittent test_dh failure 2025-10-24 09:05:19 -04:00
effbiae
f087b1300c refactor to MakePSKPreMasterSecret 2025-10-24 12:03:16 +11:00
David Garske
67c2d80470 Merge pull request #9337 from douzzer/20251023-FIPS-autotools-fix
20251023-FIPS-autotools-fix
2025-10-23 15:44:53 -07:00
Daniel Pouzzner
6ff47a7a4c src/include.am: fix gate flub, !BUILD_FIPS_V6 -> !BUILD_FIPS_V6_PLUS, around sp-asm files (covered earlier for FIPS). 2025-10-23 16:57:39 -05:00
Josh Holtrop
61a277c262 Rust wrapper: Use core::ptr instead of std::ptr 2025-10-23 16:30:03 -04:00
Josh Holtrop
b75be94f0d Rust wrapper: use SHA256::DIGEST_SIZE instead of WC_SHA256_DIGEST_SIZE 2025-10-23 16:24:09 -04:00
Josh Holtrop
5b8115ed8f Rust wrapper: add wolfssl::wolfcrypt::kdf, wolfssl::wolfcrypt::prf 2025-10-23 16:05:07 -04:00
JacobBarthelmeh
33b08ed136 Merge pull request #9328 from holtrop/rust-wc-hmac
Rust wrapper: add wolfssl::wolfcrypt::hmac module
2025-10-23 14:02:11 -06:00
Chris Conlon
3e85b572f3 define HAVE_CTS for --enable-jni build, used by JCE AES/CTS/NoPadding mode 2025-10-23 12:46:59 -06:00
JacobBarthelmeh
985a090adc Merge pull request #9334 from julek-wolfssl/wolfSSL_PEM_X509_X509_CRL_X509_PKEY_read_bio-len
x509: make sure pem buffer will be large enough to hold pem header
2025-10-23 09:36:46 -06:00
JacobBarthelmeh
7f5d02c36b Merge pull request #9317 from SparkiDev/benchmark_asym_cc
Benchmark: add cycle counts for asym ops
2025-10-23 09:31:30 -06:00
David Garske
f376512692 Merge pull request #9332 from douzzer/20251022-FIPS-armasm-autotools-fixup
20251022-FIPS-armasm-autotools-fixup
2025-10-23 07:45:32 -07:00
Josh Holtrop
27212312f1 Rust wrapper: Remove unnecessary double casts in hmac 2025-10-23 09:46:05 -04:00
Josh Holtrop
df4a2120c2 Rust wrapper: add wolfssl::wolfcrypt::hkdf module 2025-10-23 09:41:12 -04:00
Josh Holtrop
b801396d52 Rust wrapper: HMAC::get_hmac_size does not need mut ref 2025-10-23 09:32:37 -04:00
Juliusz Sosinowicz
36b64fb5ae x509: make sure pem buffer will be large enough to hold pem header
Found with Fil-C compiler
2025-10-23 13:28:07 +02:00
Daniel Pouzzner
3bd5a30a77 .wolfssl_known_macro_extras: snip out a couple no-longer-needed extras. 2025-10-22 22:54:51 -05:00
Daniel Pouzzner
b1f2ff73ed wolfcrypt/src/sha256.c: in wc_Sha256HashBlock(), use ByteReverseWords() rather than a series of ByteReverseWord32() to get WOLFSSL_USE_ALIGN. 2025-10-22 22:54:20 -05:00
Daniel Pouzzner
be301f93da fixes for autotools config around armasm AES/SHA refactor in #9284: in configure.ac, add BUILD_FIPS_V5_PLUS and BUILD_FIPS_V6_PLUS conditionals, and fix BUILD_FIPS_V6 conditional to match v6 only;
in src/include.am, add LEGACY_ARMASM_foo and NEW_ARMASM_foo helper variables, restore pre-PR9284 armasm clauses, and add or update several FIPS gates as needed;

add empty wolfcrypt/src/port/arm/{armv8-aes.c,armv8-sha256.c,armv8-sha512.c} to mollify autotools, and in wolfcrypt/src/include.am, restore them to EXTRA_DIST if FIPS v5 or v6.
2025-10-22 22:52:24 -05:00
Sean Parkinson
dc45a6f340 Benchmark: add cycle counts for asym ops
Added million of cycles per op information.
Getting cycle count for Aarch64 now too.
2025-10-23 08:43:05 +10:00
JacobBarthelmeh
4daab8a813 Merge pull request #9284 from SparkiDev/aarch64_asm_gen
Aarch64 asm: convert to generated
2025-10-22 11:10:27 -06:00
JacobBarthelmeh
520d9501af Merge pull request #9322 from SparkiDev/crldist_reason_fix
X.509 cert: crl distribution point reasons is IMPLICIT
2025-10-22 09:33:08 -06:00
JacobBarthelmeh
d60e4ddbd1 Merge pull request #9329 from SparkiDev/regression_fixes_20
Regression testing fixes
2025-10-22 09:12:58 -06:00
JacobBarthelmeh
58e37067ef Merge pull request #9315 from SparkiDev/aes_cfb_ofb_improv
AES: Improve CFB and OFB and add tests
2025-10-22 09:06:46 -06:00
Sean Parkinson
821dc5cb13 Regression testing fixes
Adding protection to tests that use RSA and ECC.
2025-10-22 18:33:44 +10:00
Sean Parkinson
8533bc803b AES: Improve CFB and OFB and add tests
Improve performance of CFB and OFB.
Only have one implementation that is used by OFB encrypt and decrypt.

Update AES testing in unit.test.

Update benchmarking of CFB and OFb to include decrypt.
2025-10-22 12:19:56 +10:00
effbiae
4964a1760a refactor to ImportPeerECCKey 2025-10-22 13:03:55 +11:00
Josh Holtrop
ce610db4e8 Rust wrapper: add wolfssl::wolfcrypt::hmac module 2025-10-21 16:59:32 -04:00
philljj
7e6c86a6c3 Merge pull request #9326 from douzzer/20251021-KDF-FIPS-gate-tweaks
20251021-KDF-FIPS-gate-tweaks
2025-10-21 12:49:21 -05:00
David Garske
9c3a0e3a67 Merge pull request #9324 from douzzer/20251020-coverity-WC_SAFE_foo
20251020-coverity-WC_SAFE_foo
2025-10-21 09:41:25 -07:00
JacobBarthelmeh
936e350c63 Merge pull request #9325 from LinuxJedi/zp-fixes
Fix things found with ZeroPath
2025-10-21 10:19:01 -06:00
Brett Nicholas
1134d246f7 Merge pull request #9309 from night1rider/CryptoCbCopy
Add crypto callback support for copy/free operations (SHA-256)
2025-10-21 09:45:18 -06:00
Daniel Pouzzner
b07bc74a71 wolfcrypt/test/test.c: skip nist_sp80056c_kdf_test() and nist_sp800108_cmac() on FIPS <7.0.0. 2025-10-21 10:38:55 -05:00
JacobBarthelmeh
818d1e37eb Merge pull request #9321 from anhu/no_conv_ems
Prevent a conversion warning
2025-10-21 09:38:00 -06:00
David Garske
c1339abc05 Merge pull request #9323 from philljj/fix_coverity_onestep
KDF onestep: hashOutSz err check.
2025-10-21 08:23:05 -07:00
David Garske
6f9ca6cb52 Merge pull request #9294 from LinuxJedi/benchmark-ram
Benchmark memory tracking
2025-10-21 08:15:28 -07:00
David Garske
0eb7ad0ead Merge pull request #9320 from holtrop/rust-wc-sha
Rust wrapper: add wolfssl::wolfcrypt::sha module
2025-10-21 08:15:01 -07:00
Andrew Hutchings
90e0857d2d Validate LinuxKM I/O lengths
Reject negative lengths and normalize to size_t before calling kernel_sendmsg/kernel_recvmsg so the kernel transport can’t be tricked into huge or wrapped iov_len values.
2025-10-21 14:40:36 +01:00
Andrew Hutchings
259670055a Bound buffered HTTP body size
Clamp per-chunk and aggregated HTTP response sizes before allocating in wolfIO_HttpProcessResponseBuf so untrusted Content-Length or chunk headers can’t overflow the arithmetic or force giant buffers.
2025-10-21 14:13:41 +01:00
Andrew Hutchings
be1428d108 Validate AF_ALG RSA inputs
Require the ciphertext length to match the RSA modulus before copying into the AF_ALG Xilinx stack buffer, preventing oversized inputs from overflowing the aligned scratch space.
2025-10-21 13:57:36 +01:00
Andrew Hutchings
11d2f4894e Guard ProcessKeyShare against truncated key shares
Add bounds check before reading named_group so malformed TLS 1.3 key share data cannot read past the supplied buffer.
2025-10-21 13:40:00 +01:00
Andrew Hutchings
8b4f816ae7 BioReceiveInternal: allow NULL write BIO
Some callers, such as the OCSP request context, only supply a read BIO. Guard the write-BIO pending check so a read error or EOF does not dereference NULL.
2025-10-21 13:12:52 +01:00
Andrew Hutchings
e6ca4d15e2 MicriumReceiveFrom: tighten peer validation
Reject DTLS datagrams when the stored peer is missing, the address length changes, or the address bytes differ. The old check required both the length and byte comparisons to fail, letting spoofed peers through when only one mismatch occurred.
2025-10-21 13:10:04 +01:00
Sean Parkinson
9c1462a9ec Aarch64 asm: convert to generated
Algorithms now generated:
  SHA-256
  SHA-512
  ChaCha20
  Poly1305
  AES-ECB
  AES-CBC
  AES-CTR
  AES-GCM + streaming
  AES-XTS
  AES SetKey

ARM32 asm algorithms generated now too:
  SHA-256
  SHA-512
  ChaCha20
  AES-ECB
  AES-CBC
  AES-CTR
  AES-GCM
  AES-XTS
  AES SetKey

Removed use of ARM specific implementations of algorithms. (armv8-aes.c)
2025-10-21 17:03:39 +10:00
Daniel Pouzzner
ca552cc345 src/internal.c: work around false positive "C4701: potentially uninitialized local variable" in GrowOutputBuffer(). 2025-10-20 23:54:15 -05:00
Daniel Pouzzner
279238ce63 wolfssl/wolfcrypt/types.h:
* fix WC_MIN_SINT_OF().
* add outer cast back to target type in WC_MAX_UINT_OF() and WC_MAX_SINT_OF().
* rename WC_SAFE_SUM_*_NO_WUR to WC_SAFE_SUM_*_CLIP().
* remove clipping assignments from failure paths in WC_WUR_INT() variants.
* add WC_SAFE_SUB_UNSIGNED_CLIP(), WC_SAFE_SUB_UNSIGNED(), WC_SAFE_SUB_SIGNED_CLIP(), and WC_SAFE_SUB_SIGNED().
* add Coverity-specific annotations in WC_SAFE_*() to suppress false-positive overflow warnings.

wolfcrypt/test/test.c:
* implement macro_test().
* fix stray uint32_t's in crypto_ecc_verify() and crypto_ecc_sign() arg lists.

wolfssl/wolfcrypt/ext_xmss.h: fix stray uint32_t.
2025-10-20 23:27:09 -05:00
jordan
c1032a8cb6 KDF onestep: hashOutSz err check. 2025-10-20 22:05:41 -05:00
Sean Parkinson
5adf392d56 Merge pull request #9281 from effbiae/tlsx-with-ech
refactor to TLSX_ChangeSNIBegin/End
2025-10-21 10:58:33 +10:00
Sean Parkinson
3f9e2e5baa X.509 cert: crl distribution point reasons is IMPLICIT
The reasons field is IMPLICIT meaning that the value is directly under
the context-specific tag. That is context-specific tag is not
constructed.
2025-10-21 09:30:45 +10:00
Andrew Hutchings
00c936c29e Only change WC_BENCH_MAX_LINE_LEN when we need to 2025-10-20 18:58:16 +01:00
night1rider
f1faefed91 Added callbacks for copy and free to SHA, 224, 384, 512, and SHA3. Also split macros for FREE and COPY Callbacks, and add configure.ac option. 2025-10-20 11:09:35 -06:00
Anthony Hu
26ba17b48e Prevent a conversion warning 2025-10-20 12:20:59 -04:00
David Garske
d86575c766 Merge pull request #9312 from night1rider/FixCallbackRngInit
Refactor wc_rng_new to use wc_rng_new_ex, and to use WC_USE_DEVID as the devId if set at compile time
2025-10-20 09:19:17 -07:00
night1rider
0dca3bc24d Setup to be opt-in for copy callback, and also added a outline for a free callback 2025-10-20 10:07:24 -06:00
night1rider
4d6418f31a Add crypto callback support for copy operations (SHA-256) 2025-10-20 10:06:30 -06:00
David Garske
7fa53c8c71 Merge pull request #9289 from philljj/cmac_kdf
cmac kdf: add NIST SP 800-108, and NIST SP 800-56C two-step.
2025-10-20 08:33:30 -07:00
night1rider
bd4099d2d7 Update test.c tests to use global devId instead of INVALID_DEVID 2025-10-20 09:16:23 -06:00
night1rider
28c78b5c0c Use global devId for RNG initialization in tests: mlkem_test, dilithium_test, xmss_test, lms_test 2025-10-20 09:16:23 -06:00
night1rider
fba8cab200 Refactor wc_rng_new to use wc_rng_new_ex, and to use WC_USE_DEVID as the devId if set at compile time 2025-10-20 09:16:23 -06:00
jordan
525c212d1c cmac kdf: add NIST SP 800-108, and NIST SP 800-56C two-step. 2025-10-20 08:20:23 -05:00
Josh Holtrop
987bf2fe2e Rust wrapper: fix test_ecc sig_to_rs() check 2025-10-20 09:09:53 -04:00
Josh Holtrop
714abfa1c0 Rust wrapper: add wolfssl::wolfcrypt::sha module 2025-10-20 08:44:07 -04:00
philljj
aba9ee4015 Merge pull request #9319 from douzzer/20251018-linuxkm-gdwarf-4-g1
20251018-linuxkm-gdwarf-4-g1
2025-10-18 14:35:46 -05:00
Daniel Pouzzner
9881c95c46 linuxkm/Kbuild: refactor RENAME_PIE_TEXT_AND_DATA_SECTIONS to automatically derive the list of all ELF sections to rename, rather than enumerating them staticly in the objcopy recipe (motivated by changes expected in kernel 6.19). 2025-10-18 12:07:35 -05:00
Daniel Pouzzner
a36dd35e59 linuxkm: rename FIPS container segments from foo.wolfcrypt to foo_wolfcrypt to avoid getting rearranged by kernel scripts/module.lds klp/kpatch clauses expected in kernel 6.19. 2025-10-18 03:23:38 -05:00
Daniel Pouzzner
2bbc3a0ae2 wolfcrypt/test/test.c: fixes for --disable-sha256, --disable-hmac, --disable-rng, and FIPS gating on RSA-PSS. 2025-10-18 02:05:55 -05:00
Daniel Pouzzner
08f5c3e8b9 configure.ac: in linuxkm setup, use -g1 explicitly unless --enable-debug, whereupon use -g3. also, add -gdwarf-4 to AM_CCASFLAGS. 2025-10-18 01:56:48 -05:00
Andrew Hutchings
d87ca70048 Fix mixed declaration / code 2025-10-18 06:18:29 +01:00
Andrew Hutchings
01dc28ad31 Seperate AES alloc / dealloc phases 2025-10-18 06:13:40 +01:00
Andrew Hutchings
65bb68b6c0 Move heap/stack tracking to before init phase
Start tracking during the setup of the algo, so we can capture the
memory usage of the algo init functions.
2025-10-18 06:13:36 +01:00
Andrew Hutchings
036c66c777 Benchmark memory tracking
This adds heap and stack tracking to wolfCrypt bench so that it is
possible to see RAM usage. It also adds support for stack tracking in
microcontrollers (tested on STM32).
2025-10-18 06:09:01 +01:00
philljj
c091c8b7ba Merge pull request #9318 from douzzer/20251017-linuxkm-signal-handling-tweaks
20251017-linuxkm-signal-handling-tweaks
2025-10-17 21:17:20 -05:00
Daniel Pouzzner
69f236be0a linuxkm/linuxkm_wc_port.h: suppress -Wformat-nonliteral while including kernel headers (needed for kernel <=4.9). 2025-10-17 19:31:17 -05:00
Daniel Pouzzner
6a0be6a7f7 configure.ac: remove -g0 from, and always add -DHAVE_REPRODUCIBLE_BUILD to, reproducible-build AM_CFLAGS, and always add -gdwarf-4 to AM_CFLAGS when ENABLED_LINUXKM;
.github/workflows/linuxkm.yml: restore as-was, but change from oldconfig to olddefconfig.
2025-10-17 18:24:32 -05:00
Daniel Pouzzner
d2f819a2f6 linuxkm/module_hooks.c and linuxkm/lkcapi_glue.c: check retval from WC_SIG_IGNORE_BEGIN(). 2025-10-17 18:23:25 -05:00
David Garske
d475985062 Merge pull request #9306 from holtrop/rust-wc-dh
Rust wrapper: add wolfssl::wolfcrypt::dh module
2025-10-17 15:41:58 -07:00
Daniel Pouzzner
e142a9629f linuxkm/linuxkm_wc_port.h and linuxkm/module_hooks.c: tweak gating for verifyCore and my_kallsyms_lookup_name, and use the latter to reach verifyCore on old FIPS. also tweak the In-core integrity hash check failure." message to supply module-update-fips-hash instructions. 2025-10-17 17:12:37 -05:00
Daniel Pouzzner
354c576c96 .github/workflows/linuxkm.yml: comment out --enable-linuxkm-pie config, pending resolution of "dwarf_get_units failed" on Azure kernel 6.14 image. 2025-10-17 15:00:04 -05:00
Daniel Pouzzner
7a43732daa linuxkm/linuxkm_wc_port.h, wolfssl/wolfcrypt/types.h, linuxkm/module_hooks.c, linuxkm/lkcapi_glue.c:
* add WC_SIG_IGNORE_BEGIN(), WC_SIG_IGNORE_END(), wc_linuxkm_sig_ignore_begin(), wc_linuxkm_sig_ignore_end();
* move WC_CHECK_FOR_INTR_SIGNALS() and WC_RELAX_LONG_LOOP() definitions outside the BUILDING_WOLFSSL gate;
* refactor linuxkm_lkcapi_registering_now as a wolfSSL_Atomic_Int and use it as a mutex for linuxkm_lkcapi_register() and linuxkm_lkcapi_unregister();
* add WC_SIG_IGNORE_BEGIN()...WC_SIG_IGNORE_END() wrappers around all relevant critical spans in linuxkm glue.
2025-10-17 14:58:21 -05:00
Josh Holtrop
4faa21a74a Rust wrapper: Fix DH::FFDHE_* constant values 2025-10-17 14:46:15 -04:00
Josh Holtrop
8e7f77db76 Rust wrapper: add wolfssl::wolfcrypt::dh module 2025-10-17 14:46:15 -04:00
lealem47
5280bfb89a Merge pull request #9297 from douzzer/20251011-more-fips-optest-tweaks
20251011-more-fips-optest-tweaks
2025-10-17 12:44:25 -06:00
David Garske
f492abfe9e Merge pull request #9314 from SparkiDev/silabs_no_hash_raw
SHA-2: No hash raw
2025-10-17 10:19:01 -07:00
effbiae
8969e5f36a refactor to TLSX_EchChangeSNI 2025-10-17 13:51:42 +11:00
Daniel Pouzzner
9cf08afbbb fixes for --disable-tls. 2025-10-16 18:50:06 -05:00
Daniel Pouzzner
f508b44f0f configure.ac: in setup for cryptonly, don't set enable_tls13=no or enable_tlsv12=no -- they're needed for crypto-layer KDFs. 2025-10-16 18:50:06 -05:00
Daniel Pouzzner
b924e9a905 linuxkm/module_hooks.c: add sanity check for compiled-in verifyCore, and fix linuxkm_op_test_1() call to use argc==3 arg list. 2025-10-16 18:50:06 -05:00
Daniel Pouzzner
5ee42402ae wolfssl/wolfcrypt/types.h: fix whitespace around WC_SAFE_SUM_*(). 2025-10-16 18:50:06 -05:00
Daniel Pouzzner
6fb547a1ae linuxkm/module_hooks.c: purge fipsMode override (fipsEntry() takes care of this), and add explicit fipsCastStatus[] reset code. 2025-10-16 18:50:06 -05:00
Daniel Pouzzner
e8d9f91868 linuxkm/module_hooks.c and linuxkm/linuxkm_wc_port.h: finish implementation of
FIPS_OPTEST glue code, including /sys/module/libwolfssl/FIPS_optest_run_code
(FIPS_optest_trig_handler(), plus my_kallsyms_lookup_name() helper).
2025-10-16 18:50:05 -05:00
Daniel Pouzzner
581e86c178 wolfcrypt/test/test.c: fix error-path uninitialized access defect in ecc_test_buffers(). 2025-10-16 18:50:05 -05:00
Zackery
0d588b446c Merge pull request #9313 from douzzer/20251016-Wnull-dereference
20251016-Wnull-dereference
2025-10-16 17:47:23 -06:00
Sean Parkinson
d0909991fb SHA-2: No hash raw
Implementation of FinalRaw for SE050 was not usable - TLS_hmac did not
produce valid results.
Removed implementations and defining WOLFSSL_NO_HASH_RAW to compile to
not require FinalRaw APIs.
2025-10-17 07:46:50 +10:00
Daniel Pouzzner
0c4feb0aa6 wolfcrypt/src/asn.c: revert earlier changes in EncodeName(), and add local S390-specific pragma to inhibit false-positive -Wnull-dereference. 2025-10-16 16:10:54 -05:00
Daniel Pouzzner
d6aa157187 fixes for OPENSSL_COEXIST covering OPENSSL_COMPATIBLE_DEFAULTS and WOLFSSL_WPAS:
* src/ssl.c:wolfSSL_CTX_new_ex()
* src/x509.c:wolfSSL_X509_PUBKEY_set()
2025-10-16 15:10:16 -05:00
Daniel Pouzzner
6ee660841b fixes/workarounds for -Wnull-dereferences, some true positive, some false
positive:
* src/pk.c:wolfSSL_RSA_meth_new()
* tests/api.c:test_wolfSSL_PKCS7_certs()
* tests/api.c:test_wolfSSL_X509V3_EXT_get()
* wolfcrypt/src/asn.c:EncodeName()
* wolfcrypt/src/pkcs12.c:wc_i2d_PKCS12()
* wolfcrypt/src/port/af_alg/afalg_aes.c
2025-10-16 15:10:16 -05:00
David Garske
0727bae09e Merge pull request #9310 from SparkiDev/lms_cast_16bit
LMS: Cast constants before shifting left
2025-10-16 12:16:05 -07:00
David Garske
a22d239bfd Merge pull request #9301 from effbiae/set_srp_username
refactor wolfSSL_CTX_set_srp_username
2025-10-16 11:32:24 -07:00
David Garske
d88ab84b9f Merge pull request #9311 from SparkiDev/regression_fixes_19
Regression testing
2025-10-16 10:56:27 -07:00
Daniel Pouzzner
058686b829 Merge pull request #9305 from dgarske/bench_rsapub
Fix for benchmark with key gen and "out" not being allocated
2025-10-16 12:23:23 -05:00
Sean Parkinson
c111c5bacc Regression testing
x509.c: realloc may fail and therefore need to store result in a
temporary so the old pointer is not lost.

tls.c: free the name if it is not pushed on to the stack of peer CA
names. Failure to push can be from memory allocation failure.

aes.c: Don't compile XTS decrypt functions without HAVE_AES_DECRYPT.

Fix tests to have better pre-processor protection.
2025-10-16 12:13:32 +10:00
Sean Parkinson
36c953dd8f LMS: Cast constants before shifting left
Compiling for 16-bit results in some constants type being too small for
shift amount without cast.
2025-10-16 09:24:48 +10:00
Kareem
88a55cdb71 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20603 2025-10-15 15:48:16 -07:00
Kareem
8d41d1ca65 Add IPv6 support to wolfSSL_BIO_new_accept and wolfIO_TcpBind. 2025-10-15 15:47:22 -07:00
lealem47
832e23a5f7 Merge pull request #9307 from douzzer/20251015-linuxkm-fixes
20251015-linuxkm-fixes
2025-10-15 16:26:00 -06:00
Daniel Pouzzner
3746164d60 linuxkm/linuxkm_wc_port.h: don't include wolfssl/wolfcrypt/memory.h (unneeded and out of order). 2025-10-15 17:06:31 -05:00
Zackery
790808b172 Merge pull request #9303 from dgarske/silabs_series2
Support for detecting SILABS ERF32 Series 2 ECDSA support for P384/P521
2025-10-15 12:46:44 -06:00
David Garske
0c4f5879d8 Fix for benchmark with key gen and "out" not being allocated because of typo between WOLFSSL_RSA_VERIFY_INLINE and WOLFSSL_RSA_VERIFY_ONLY.
Reproduced with: `./configure --enable-keygen CFLAGS="-DWOLFSSL_RSA_VERIFY_INLINE" --disable-examples && make && ./wolfcrypt/benchmark/benchmark -rsa`
2025-10-15 11:25:49 -07:00
Daniel Pouzzner
250e19a682 Merge pull request #9299 from dgarske/bench_rsasz
Fix for improper sizing on `bench_rsa_helper`
2025-10-15 11:55:48 -05:00
Eric Blankenhorn
f9b666dd8a Merge pull request #9298 from douzzer/20251014-WC_SAFE_SUM
20251014-WC_SAFE_SUM
2025-10-15 11:44:04 -05:00
David Garske
53bbf7f2d7 Merge pull request #9302 from effbiae/wc_FreeRng
wc_FreeRng called multiple times in wolfSSL_CTX_set_srp_password
2025-10-15 08:48:17 -07:00
David Garske
91bf738025 Support for detecting SILABS ERF32 Series 2 ECDSA support for P384/P521 2025-10-15 08:33:37 -07:00
effbiae
1de2ad48bd wc_FreeRng called multiple times in wolfSSL_CTX_set_srp_password 2025-10-15 17:43:53 +11:00
effbiae
cadea76e43 refactor wolfSSL_CTX_set_srp_username 2025-10-15 17:15:07 +11:00
Daniel Pouzzner
c771167127 add WC_ prefixes to MAX_UINT_OF() and friends, to avoid collision with wolfSentry macros. 2025-10-14 19:16:21 -05:00
Daniel Pouzzner
21a66ec36b wolfssl/wolfcrypt/types.h: add missing static attribute to WC_WUR_INT(). 2025-10-14 19:10:15 -05:00
David Garske
75097f3e09 Fix for improper sizing on bench_rsa_helper 2025-10-14 16:41:27 -07:00
Daniel Pouzzner
1602ed2f3a wolfcrypt/src/asn.c: rearrange check for null cname in EncodeName() to fix false positive -Wnull-dereference.
src/internal.c: suppress -Wnull-dereference locally in ProcessPeerCertParse() to fix false positive.
2025-10-14 18:27:02 -05:00
Daniel Pouzzner
7c7040da24 src/internal.c: fix -Wnull-dereference in LoadCertByIssuer(). 2025-10-14 17:38:12 -05:00
Daniel Pouzzner
204eb96d2f src/ssl.c: fix overflow/overrun defect in wolfSSL_writev(). 2025-10-14 16:29:15 -05:00
Daniel Pouzzner
014f55fe10 wolfssl/wolfcrypt/types.h: add WC_WUR_INT(), MAX_UINT_OF(), MAX_SINT_OF(), MIN_SINT_OF(), WC_SAFE_SUM_UNSIGNED(), and WC_SAFE_SUM_SIGNED(). 2025-10-14 16:28:32 -05:00
David Garske
3534fad3ee Merge pull request #9295 from rizlik/shutdown_nonblocking_fix
wolfSSL_shutdown: handle non-blocking I/O
2025-10-14 12:50:57 -07:00
Marco Oliverio
4280b52bff test: increase coverage for multiple wolfSSL_shutdown test 2025-10-14 10:05:11 +02:00
Marco Oliverio
4b7a2b677b wolfSSL_shutdown: fix non-blocking retry after WANT_WRITE.
1. Send buffered message in case SendAlert_ex returned WANT_WRITE.
2. If pending messages are sent successfully return SHUTDOWN_NOT_DONE as
   current API behavior.
3. Propagate WANT_READ error for ProcessReply if waiting for other peer
   shutdown (when invoking wolfSSL_shutdown for the second time)
2025-10-14 10:05:11 +02:00
Sean Parkinson
77dcbb5603 Merge pull request #9293 from dgpighin/docstrings_update
Some updates to the docstrings
2025-10-14 16:14:15 +10:00
Daniel Pouzzner
b2c105d5f7 Merge pull request #9292 from embhorn/zd20626
Fix GCC warnings
2025-10-13 23:17:13 -05:00
Daniel Pouzzner
6fbd101f7d Merge pull request #9153 from effbiae/wc-small-stack
Small stack compress -- 3000line reduction
2025-10-13 23:12:01 -05:00
David Garske
e877fa747d Merge pull request #9185 from Pushyanth-Infineon/psoc6_sha1_sha2_sha3_support
Enable hardware acceleration for SHA1, SHA384 and SHA3 algorithms on PSoC6
2025-10-13 13:29:52 -07:00
Eric Blankenhorn
dd22fa3243 Fix from testing 2025-10-13 15:27:01 -05:00
Eric Blankenhorn
f3428295f6 Clarify use of static ciphers in readme files (#9283)
embhorn : Clarify use of static ciphers in readme files
2025-10-13 11:38:11 -07:00
David Garske
4f0836eb73 Merge pull request #9291 from JacobBarthelmeh/csharp
Fixes for Ed25519 raw key import with C# wrapper
2025-10-13 11:35:44 -07:00
David Garske
9872207702 Merge pull request #9285 from SparkiDev/sp_small_stack_macros
SP: macros for variables that may be allocated
2025-10-13 11:12:24 -07:00
Eric Blankenhorn
e67b85724e Fix from testing 2025-10-13 12:57:47 -05:00
Eric Blankenhorn
bae25afa40 Fix from testing 2025-10-13 12:42:01 -05:00
Eric Blankenhorn
adc9146035 Fix from testing 2025-10-13 12:33:40 -05:00
Eric Blankenhorn
83336e3436 Fix from testing 2025-10-13 12:15:39 -05:00
Marco Oliverio
6b0e24eed2 test_memio: support WANT_WRITE simulation 2025-10-13 16:27:55 +02:00
David Garske
610d8e5366 Merge pull request #9275 from SparkiDev/xtensa_ct_x25519
Xtensa: mitigate potential non-CT assembly output
2025-10-13 07:13:53 -07:00
effbiae
f4b8f844b2 indent {.*;} macro args 2025-10-13 14:04:06 +11:00
Sean Parkinson
fac53abc14 SP: macros for variables that may be allocated
Add macros to make the code simpler around allocating from dynamic
memory when WOLFSSL_SP_SMALL_STACK is defined.
Change over to using macros where it makes sense.
2025-10-13 11:48:07 +10:00
Sean Parkinson
c161cbd9f3 Xtensa: mitigate potential non-CT assembly output
Compilers for Xtensa have been seen to produce non-constant time code.
Force small code size builds for X25519, Ed25519, X448 and Ed448.
2025-10-13 10:24:01 +10:00
Dario Pighin
a61d79d154 Some updates to the docstrings 2025-10-11 16:43:05 +02:00
effbiae
b5c5854064 fix for cppcheck defect in src/ssl.c 2025-10-11 11:40:30 +11:00
effbiae
6bda10abd0 define WOLFSSL_SMALL_STACK in tests and benchmark for ASYNC 2025-10-11 11:40:30 +11:00
effbiae
3921362250 WC_VAR macros 2025-10-11 11:40:30 +11:00
effbiae
75a6621c63 hand edits for small stack compress 2025-10-11 11:40:30 +11:00
effbiae
7a3db09ddd automated small stack compress 2025-10-11 11:40:30 +11:00
Kamatham Pushyanth
b2c5eb51d8 Enable hardware acceleration for SHA algorithms on PSoC6.
- Introduced conditional compilation for PSoC6 crypto support across SHA1, SHA2, SHA3 implementations.
- Ensured proper mutex locking for concurrent access to hardware resources during hash operations.
- Added public key creation functionality if only private key is provided in ECDSA verify function (psoc6_ecc_verify_hash_ex).
- Updated ECC parameter size handling to fix incorrect endianness conversions in psoc6_ecc_verify_hash_ex().
- Added README for PSOC6 port.
2025-10-11 05:23:40 +05:30
Eric Blankenhorn
e47be2163a Fix buffer warnings in x509 2025-10-10 15:33:53 -05:00
Eric Blankenhorn
f713cdb5e0 Fix evp const warning and pk buffer warning 2025-10-10 15:14:56 -05:00
JacobBarthelmeh
9debdda1fa fix for C# wrapper Ed25519 import raw key and fix Curve25519 private key decode 2025-10-10 12:32:14 -06:00
JacobBarthelmeh
a081a033fd add C# raw public Ed25519 key export/import test 2025-10-10 12:29:05 -06:00
David Garske
e4b7f66927 Merge pull request #9286 from holtrop/rust-wc-ecc
Rust wrapper: add wolfssl::wolfcrypt::ecc module
2025-10-10 10:26:47 -07:00
David Garske
8a6297d42b Merge pull request #9267 from julek-wolfssl/dtls-stricter-ordering
Add message order sanity checks
2025-10-10 10:26:34 -07:00
Eric Blankenhorn
aa56c40d30 Fix / suppress GCC warnings 2025-10-10 11:56:03 -05:00
David Garske
f8c2e9c000 Merge pull request #9134 from JacobBarthelmeh/csharp
update mono build README instructions
2025-10-10 09:21:07 -07:00
Josh Holtrop
dbc1ecc376 Rust wrapper: remove a couple mut ptr casts 2025-10-10 11:07:19 -04:00
David Garske
d9f8e15fff Merge pull request #9288 from mattia-moffa/20251010-python-new-oid-sum
Disable WOLFSSL_OLD_OID_SUM on Python builds
2025-10-10 08:05:17 -07:00
David Garske
46281a2c17 Merge pull request #9287 from douzzer/20251009-more-WOLFSSL_API_PREFIX_MAP
20251009-more-WOLFSSL_API_PREFIX_MAP
2025-10-10 08:05:05 -07:00
Josh Holtrop
a986b03f53 Rust wrapper: Address code review feedback for ECC 2025-10-10 06:56:46 -04:00
Juliusz Sosinowicz
42238c57b7 Improve documentation and add comments to test_memio buffer utilities 2025-10-10 11:52:47 +02:00
JacobBarthelmeh
7502cbaa3e remove trailing white space in mono.yml 2025-10-10 00:50:46 -06:00
Mattia Moffa
490f20d8f8 Disable WOLFSSL_OLD_OID_SUM on Python builds 2025-10-10 01:25:03 +02:00
David Garske
9633248b49 Merge pull request #9276 from SparkiDev/kapi_ecc_init
KCAPI ECC: initialize mp_ints
2025-10-09 15:40:04 -07:00
Daniel Pouzzner
f767bd2851 .github/workflows/symbol-prefixes.yml: add PQC, --enable-acert, and --with-sys-crypto-policy to configuration;
wolfssl/ssl.h: make sure WOLFSSL_NO_TLS12 is defined in the TLS layer when NO_TLS.
2025-10-09 17:33:14 -05:00
Daniel Pouzzner
d1ba8eb9d0 configure.ac: don't add PQC to --enable-all-crypto -- not ready yet.
.github/workflows/symbol-prefixes.yml: count and report total_public_symbols, and use a better pattern to classify refs as defs.
2025-10-09 16:36:14 -05:00
Daniel Pouzzner
f1d014aecd add .github/workflows/symbol-prefixes.yml.
configure.ac:
* add ML-KEM, ML-DSA, XMSS, and LMS to --enable-all-crypto when !ENABLED_FIPS.
* swap order of --enable-kyber and --enable-mlkem handler code to put mlkem first.
* add --enable-mldsa hander code.
* remove setup code that was adding -DWOLFSSL_NO_TLS12 and -DNO_OLD_TLS to
  AM_CFLAGS when ENABLED_CRYPTONLY -- NO_OLD_TLS is already defined earlier for
  when ENABLED_CRYPTONLY, and WOLFSSL_NO_TLS12 breaks wc_PRF_TLS(), which is
  inside-the-FIPS-boundary crypto.

linuxkm/linuxkm_wc_port.h:
* adopt the WC_SANITIZE_DISABLE and WC_SANITIZE_ENABLE setup code from
  settings.h (where it didn't belong).
* fix FIPS remapping of wc_InitMutex&friends to InitMutex&friends -- inhibit
  when WOLFSSL_API_PREFIX_MAP.

wolfcrypt/src/ge_operations.c: add _wc_curve25519_dummy() to fix visibility of
curve25519().

wolfcrypt/src/poly1305.c: fix visibility of several unprefixed helper routines.

wolfcrypt/test/test.c: fix gating on tls12_kdf_test() and prf_test() (both
  require !WOLFSSL_NO_TLS12).

wolfssl/internal.h, wolfssl/wolfio.h: add several WOLFSSL_API_PREFIX_MAPs.

wolfssl/wolfcrypt/ge_operations.h: fix visibility of several internal asm
  functions.

wolfssl/wolfcrypt/settings.h: in WOLFSSL_LINUXKM setup, add gates to avoid redef
  warnings for various settings, and remove the setup for
  WC_SANITIZE_{DISABLE,ENABLE} (moved to linuxkm_wc_port.h as noted above).

wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_API_PREFIX_MAPs for InitMutex() and
  friends.
2025-10-09 15:34:08 -05:00
David Garske
f070ae1024 Merge pull request #9237 from gojimmypi/pr-max-error-sz
Detect if WOLFSSL_MAX_ERROR_SZ is too small
2025-10-09 13:09:51 -07:00
Josh Holtrop
883da3dd35 Rust wrapper: add wolfssl::wolfcrypt::ecc module 2025-10-09 14:58:07 -04:00
Juliusz Sosinowicz
5efdc6b7b6 Make mutual auth side check more robust 2025-10-09 20:23:56 +02:00
gojimmypi
ed506a5e4d Detect if WOLFSSL_MAX_ERROR_SZ is too small 2025-10-09 09:48:10 -07:00
Juliusz Sosinowicz
bd9f7b5b87 Clarify return values in wolfSSL_mutual_auth documentation 2025-10-09 00:57:08 +02:00
David Garske
3f460b40bc Merge pull request #9258 from kareem-wolfssl/zd19563_4
Fix potential memory leak in wolfSSL_X509_verify_cert.
2025-10-08 13:59:58 -07:00
David Garske
29e2f21fff Merge pull request #9224 from kareem-wolfssl/zd20527
Fix swapped WOLFSSL_SILABS_SHA384/SHA512 defines in sha512.c.
2025-10-08 13:19:05 -07:00
David Garske
db4d2af935 Merge pull request #9257 from kareem-wolfssl/zd20595
Fix running tests in FIPS mode with hash DRBG disabled.
2025-10-08 12:57:46 -07:00
Kaleb Himes
38df498db0 Merge pull request #9282 from douzzer/20250926-fips-optest-tweaks
20250926-fips-optest-tweaks
2025-10-08 13:19:27 -06:00
Daniel Pouzzner
f4d929593f add WOLFSSL_API_PREFIX_MAP -- when defined, exported symbols otherwise missing wc_ or wolfSSL_ prefixes are remapped with the appropriate prefix;
define WOLFSSL_API_PREFIX_MAP in WOLFSSL_LINUXKM setup in settings.h;

fix gates on WOLFSSL_HAVE_PRF and WOLFSSL_NO_CT_OPS setup in settings.h;

linuxkm/: add support for FIPS_OPTEST.
2025-10-08 13:15:56 -05:00
David Garske
7c64292851 Merge pull request #9277 from danielinux/pkcs11-aes-ctr
Added support for AES-CTR in PKCS11 driver
2025-10-08 08:32:57 -07:00
Juliusz Sosinowicz
8233d0d8a2 test_memio_move_message: add docs 2025-10-08 16:20:39 +02:00
Juliusz Sosinowicz
13f8f66281 Add docs 2025-10-08 13:43:35 +02:00
Juliusz Sosinowicz
b32c1aa15c fixup! Add message order sanity checks 2025-10-08 13:33:09 +02:00
Juliusz Sosinowicz
10365d6082 Allow clearing group messages flag 2025-10-08 11:11:03 +02:00
Juliusz Sosinowicz
6fbbdf9324 Add message order sanity checks
Reorganize test_dtls tests to use TEST_DECL_GROUP
Reorganize test_tls tests to use TEST_DECL_GROUP
2025-10-08 11:11:03 +02:00
Kaleb Himes
4dbf96b7bc Merge pull request #9280 from douzzer/20251007-linuxkm-fortify-source-sunrise
20251007-linuxkm-fortify-source-sunrise
2025-10-07 17:31:45 -06:00
JacobBarthelmeh
459a4be339 add SNI support by default to user_settings.h with C# wrapper 2025-10-07 16:43:30 -06:00
JacobBarthelmeh
b179f0d267 copy over library since mono CI build is having trouble finding it 2025-10-07 16:38:18 -06:00
JacobBarthelmeh
f5898d5f5d no need to run make check with wolfSSL build, this test is checking C# wrapper tests 2025-10-07 16:31:43 -06:00
JacobBarthelmeh
33030c2862 fix for macro guard in dtls test case 2025-10-07 16:27:18 -06:00
JacobBarthelmeh
5c4801fca1 update mono build README instructions and add test case 2025-10-07 15:51:02 -06:00
David Garske
a3af514b65 Merge pull request #8927 from JacobBarthelmeh/usersettings
Fix for user_settings.h build with configure.ac and HAVE_CURVE25519
2025-10-07 14:41:29 -07:00
David Garske
9d72337a25 Merge pull request #9273 from holtrop/rust-wc-rsa
Rust wrapper: add wolfssl::wolfcrypt::rsa module
2025-10-07 14:39:11 -07:00
Kareem
b564138490 Merge remote-tracking branch 'upstream/master' into zd19563_4 2025-10-07 14:23:45 -07:00
Kareem
233e574f32 Merge remote-tracking branch 'upstream/master' into zd20595 2025-10-07 14:23:21 -07:00
Kareem
8fbc39ea6c Merge branch 'master' into zd20527 2025-10-07 14:22:55 -07:00
Kareem
14e1d2eec3 Merge branch 'master' into zd20527 2025-10-07 14:22:08 -07:00
Kareem
931384a117 Merge branch 'master' into zd20595 2025-10-07 14:21:46 -07:00
David Garske
1d67e5551b Merge pull request #9279 from julek-wolfssl/testsuite_test-ready
testsuite_test: reset `ready` in between uses
2025-10-07 13:26:59 -07:00
Josh Holtrop
4fba5f8679 Rust wrapper: add license comments to Rust source files 2025-10-07 16:02:36 -04:00
Josh Holtrop
cf9014dce5 Rust wrapper: document more directories in README.md 2025-10-07 15:59:54 -04:00
Daniel Pouzzner
e4f0acdc1d linuxkm/linuxkm_wc_port.h: disable CONFIG_FORTIFY_SOURCE module-wide on kernels <5.18 (shim conflicts), and add WC_FORCE_LINUXKM_FORTIFY_SOURCE for future use. 2025-10-07 12:49:54 -05:00
David Garske
b75af93a05 Merge pull request #9278 from JacobBarthelmeh/pkcs7_stream
coverity warnings on test case, CID 549270 and 549271
2025-10-07 10:19:01 -07:00
JacobBarthelmeh
2445af9308 compile both fe_operations.c and low_mem version and rely on macro defines to choose which code gets compiled 2025-10-07 10:42:08 -06:00
Juliusz Sosinowicz
5069d977ed testsuite_test: reset ready in between uses
This should fix the constant intermittent failures in GH CI.
2025-10-07 18:30:36 +02:00
David Garske
b3031d25ca Merge pull request #9255 from SparkiDev/tls13_cookie_hash
TLS 1.3 Cookie Hash: use stronger hash if no SHA-256
2025-10-07 08:51:26 -07:00
JacobBarthelmeh
1237a5468f coverity warnings on test case, CID 549270 and 549271 2025-10-07 09:35:37 -06:00
David Garske
d9b52d832c Merge pull request #9259 from julek-wolfssl/dtls13-timeout
Reset DTLS 1.3 timeout
2025-10-07 07:57:17 -07:00
Daniele Lacamera
ea300985e0 Added support for AES-CTR in PKCS11 driver 2025-10-07 13:03:24 +02:00
Sean Parkinson
abfcb7122c KCAPI ECC: initialize mp_ints
Was not initializing mp_ints and it is needed now.
2025-10-07 20:59:27 +10:00
Sean Parkinson
9d546acd03 Merge pull request #9200 from effbiae/build-msg-or-hash-output
refactor to BuildMsgOrHashOutput()
2025-10-07 08:20:20 +10:00
David Garske
92a47829fa Merge pull request #8674 from JacobBarthelmeh/pkcs7_stream
Fix to advance past multiple recipients
2025-10-06 11:27:03 -07:00
Josh Holtrop
ab5d9ad1b8 Rust wrapper: add wolfssl::wolfcrypt::rsa module 2025-10-06 14:10:53 -04:00
David Garske
d4242fa026 Merge pull request #9272 from julek-wolfssl/cov-20251006
Handle coverity reported errors
2025-10-06 10:57:20 -07:00
JacobBarthelmeh
68eb8b70d1 Merge pull request #9271 from rizlik/cryptocb_sha512_family_fix
cryptocb: sha512_family: try specific digest length hashtype first
2025-10-06 11:38:57 -06:00
Daniel Pouzzner
f854795c02 Merge pull request #9263 from holtrop/rsa-const-pointers
RSA API: use const pointers and clean up some comments
2025-10-06 11:55:04 -05:00
JacobBarthelmeh
7128932eff avoid attempt of key decode and free buffer if incorrect recipient found 2025-10-06 10:48:59 -06:00
David Garske
dcafe9adf2 Add STM32H5 PKA support. 2025-10-06 18:38:09 +02:00
David Garske
fe7b6f1651 Add missing TimeNowInMilliseconds for FreeRTOS 2025-10-06 18:38:09 +02:00
David Garske
c349001d94 Move the STM32 hash options into STM32_HASH. Fix for realloc. Improve docs for hcom_uart. Fix issue with detecting RTC and incorrectly setting NO_ASN_TIME. 2025-10-06 18:38:09 +02:00
David Garske
ee77094dd6 Fixes to get STM32N6 hash and GMAC working 2025-10-06 18:38:09 +02:00
Juliusz Sosinowicz
f6be6c8b6d Add timeout assertions to DTLS test 2025-10-06 18:23:16 +02:00
Juliusz Sosinowicz
cd0d986016 Reset DTLS 1.3 timeout 2025-10-06 18:23:16 +02:00
David Garske
874633da38 Merge pull request #9270 from effbiae/sm3-free-x2
double free -- should be o_hash
2025-10-06 08:41:30 -07:00
Juliusz Sosinowicz
32e24e8199 Suppress Coverity deadcode warning in test_ocsp_tls_cert_cb 2025-10-06 16:26:45 +02:00
Juliusz Sosinowicz
a9ad5181e6 tls13: remove dead code in SetupOcspResp csr assignment 2025-10-06 16:21:47 +02:00
Juliusz Sosinowicz
303401b047 Refactor certificate status handling to use word32 2025-10-06 16:19:54 +02:00
Marco Oliverio
fc348da28f fix: escape error code operands 2025-10-06 14:47:13 +02:00
Marco Oliverio
9cbc3f97e5 cryptocb: sha512_family: try specific digest length hashtype first
If the cryptocb provider supports specific SHA512/224 and SHA512/256
hashtype, this commit allows to:

1. avoid a copy
2. do not touch the output buffer outside of the cryptocb handler

2 might be important for cryptocb provider that needs special handling
of memory buffer (DMA, memory mapping).
2025-10-06 11:42:23 +02:00
effbiae
a53f0cd3fa double free -- should be o_hash 2025-10-05 19:13:50 +11:00
Kaleb Himes
99c983d44f Merge pull request #9269 from douzzer/20251002-linuxkm-fencepost-and-fortify-tweaks
20251002-linuxkm-fencepost-and-fortify-tweaks
2025-10-03 17:01:45 -06:00
JacobBarthelmeh
fca3028395 advance index past recipent set in non stream case too 2025-10-03 15:55:35 -06:00
Daniel Pouzzner
781c9bb990 Merge pull request #9268 from dgarske/cryptocb_only
Remove the `NO_WRITE_TEMP_FILES` test.c logic added in #9194
2025-10-03 16:39:59 -05:00
Daniel Pouzzner
46fd3d60f9 linuxkm/Kbuild: activate linker script with backward-compatible construct (tests good on 4.4);
linuxkm/linuxkm_wc_port.h: completely inhibit CONFIG_FORTIFY_SOURCE across the module when HAVE_LINUXKM_PIE_SUPPORT, for fidget-free backward compat;

linuxkm/module_hooks.c:
* add startup-time sanity check on fenceposts,
* enhance DEBUG_LINUXKM_PIE_SUPPORT with coverage for WOLFSSL_TEXT_SEGMENT_CANONICALIZER on the entire text segment,
* compute and report a hash on the stabilized text segment,
* fix wc_linuxkm_normalize_relocations() to allow span end == __wc_text_end, and
* add numerous verbose pr_err()s when DEBUG_LINUXKM_PIE_SUPPORT.
2025-10-03 15:07:56 -05:00
JacobBarthelmeh
4e92920a7f cast variable to word32 for compare 2025-10-03 13:51:15 -06:00
JacobBarthelmeh
12cfca4060 account for no AES build and add err trace macro 2025-10-03 13:51:15 -06:00
JacobBarthelmeh
328f505702 add pkcs7 test with multiple recipients 2025-10-03 13:51:15 -06:00
JacobBarthelmeh
7a5e97e30e adjustment for recipient index advancement 2025-10-03 13:51:15 -06:00
JacobBarthelmeh
6987304f42 Fix to advance past multiple recipients 2025-10-03 13:51:15 -06:00
David Garske
d2be867b51 Remove the NO_WRITE_TEMP_FILES test.c logic added in #9194 2025-10-03 10:40:11 -07:00
David Garske
ac23b48283 Merge pull request #9144 from julek-wolfssl/ocsp-callbacks
tls ocsp: support lazy cert loading with ocsp stapling
2025-10-03 09:47:55 -07:00
Juliusz Sosinowicz
f9063c406b Enables dynamic TLS cert loading with OCSP
Exposes dynamic TLS certificate loading and OCSP stapling to allow applications to load certs lazily.

The server no longer needs to load the CA to staple OCSP responses.

Adds a certificate setup callback (WOLFSSL_CERT_SETUP_CB)
Adds an OCSP status callback to load OCSP responses directly
Adds `wc_NewOCSP`, `wc_FreeOCSP`, and `wc_CheckCertOcspResponse`
Don't call verify twice on the same error
Send correct alert on status response error
2025-10-03 13:08:11 +02:00
effbiae
2adae90a5d refactor to BuildMsgOrHashOutput 2025-10-03 11:41:57 +10:00
Sean Parkinson
ea4554c941 Merge pull request #9234 from effbiae/TLSX_WriteWithEch
restore inner server name in TLSX_WriteWithEch
2025-10-03 09:20:40 +10:00
Sean Parkinson
d8d3a7a22d Merge pull request #9190 from colmenero/hmacCopy-sm3-issue-9187
Add SM3 in wolfSSL_HmacCopy
2025-10-03 09:10:03 +10:00
Sean Parkinson
e14cc3a34e TLS 1.3 Cookie Hash: use stronger hash if no SHA-256
Order of preference, based on algorithms compiled in, to use with HMAC
for TLS 1.3 cookie:
  1. SHA-256
  2. SHA-384
  3. SHA-512
  4. SM3

Make code compile and unittest pass when SHA-256 not compiled in.
Certificates used for testing require SHA-256 so handshake testing
fails.
2025-10-03 08:28:02 +10:00
Daniel Pouzzner
5804ba759a Merge pull request #9194 from dgarske/cryptocb_only_test
Fixes for crypto callback only (no filesystem and keygen)
2025-10-02 16:52:31 -05:00
David Garske
5501111e77 Merge pull request #9265 from douzzer/20251002-misc-clang-tidy-and-fips-fixes
20251002-misc-clang-tidy-and-fips-fixes
2025-10-02 14:38:14 -07:00
Daniel Pouzzner
408e6f79f9 tests/api/test_dtls.c: add missing ExpectIntEQ() around wolfSSL_connect() in test_dtls_bogus_finished_epoch_zero();
wolfcrypt/test/test.c: fix gate for wc_DhGeneratePublic() test in dh_ffdhe_test() to properly exclude 5.3.0.
2025-10-02 14:38:05 -05:00
Josh Holtrop
c36c39af0a RSA API: use const pointers and clean up some comments 2025-10-02 15:28:43 -04:00
David Garske
db6a4dfedb Merge pull request #9238 from effbiae/X509PrintSubjAltName
refactor X509PrintSubjAltName
2025-10-02 11:53:22 -07:00
David Garske
6de0b93a08 Merge pull request #9262 from julek-wolfssl/ascon-h-comment
ascon.h: Correct the placement of the AsconAEAD API comment
2025-10-02 11:11:01 -07:00
David Garske
6430a123fd Merge pull request #9264 from gojimmypi/pr-espressif-workflow
Update Espressif workflow to pin latest to ESP-IDF v5.5
2025-10-02 11:05:15 -07:00
gojimmypi
b4b9bee950 Update workflow to pin latest to ESP-IDF v5.5 2025-10-02 10:25:25 -07:00
David Garske
36ce93d409 Merge pull request #9225 from gojimmypi/pr-espidf-v6-sha-fix
Add fix for SHA HW on ESP-IDF v6
2025-10-02 09:50:46 -07:00
Juliusz Sosinowicz
31db2b9e08 ascon.h: Correct the placement of the AsconAEAD API comment 2025-10-02 10:22:16 +02:00
effbiae
c3c7b11cfc refactor X509PrintSubjAltName 2025-10-02 15:36:36 +10:00
Kareem
abaf57d049 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20595 2025-10-01 15:53:57 -07:00
Kareem
d53beb0f9d Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd19563_4 2025-10-01 15:53:35 -07:00
Kaleb Himes
018af47f49 Merge pull request #9260 from douzzer/20251001-wc_DhGeneratePublic-ungate
20251001-wc_DhGeneratePublic-ungate
2025-10-01 14:38:39 -06:00
Kareem
992dfecc11 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd19563_4 2025-10-01 11:15:46 -07:00
Daniel Pouzzner
2ca9f66579 wolfcrypt/test/test.c: add FIPS gate around wc_DhGeneratePublic() test in dh_ffdhe_test(). 2025-10-01 10:23:49 -05:00
Daniel Pouzzner
477d7fae54 remove WOLFSSL_DH_GEN_PUB, WOLFSSL_NO_DH_GEN_PUB, and WOLFSSL_DH_EXTRA gating re wc_DhGeneratePublic(), consistent with recent FIPS changes. 2025-10-01 09:38:27 -05:00
Daniel Pouzzner
56524a3169 Merge pull request #9226 from philljj/tiny_curl_config
curl: document tiny-curl config a bit more.
2025-09-30 20:45:15 -05:00
Daniel Pouzzner
b3a5c96c56 Merge pull request #9205 from gasbytes/issue-9188
Prevent replaying ClientHello messages when Finished message are epoch 0
2025-09-30 20:44:09 -05:00
Daniel Pouzzner
88075664dc Merge pull request #9252 from bigbrett/kdf-cryptocb
HKDF cryptocb
2025-09-30 20:37:11 -05:00
Daniel Pouzzner
d5750ac7ca Merge pull request #9250 from gasbytes/issue-9247
Added check in TLX_Parse to check if KeyShare extension is present SupportedGroups must be present too (and viceversa)
2025-09-30 20:36:50 -05:00
Daniel Pouzzner
c893191577 Merge pull request #9253 from julek-wolfssl/gh/9245
DTLS SRTP should also do a cookie exchange since it uses UDP
2025-09-30 20:36:27 -05:00
Daniel Pouzzner
55a19da4c6 Merge pull request #9178 from SparkiDev/ed448_no_large_code
Ed448: No large code option with fast code
2025-09-30 20:36:10 -05:00
Daniel Pouzzner
234ba7780a Merge pull request #9148 from SparkiDev/ct_volatile
Mark variables as volatile
2025-09-30 20:35:52 -05:00
Daniel Pouzzner
b4ee8869c8 Merge pull request #9246 from julek-wolfssl/gh/9240
Abort connection if we are about to send the same CH
2025-09-30 20:35:32 -05:00
Daniel Pouzzner
1932c5a96d Merge pull request #9196 from kareem-wolfssl/zd20038_3
Fix building and running tests and examples with coding/PEM support disabled.
2025-09-30 20:34:46 -05:00
Daniel Pouzzner
2172a4dea9 Merge pull request #9248 from holtrop/rust-wc-aes
Rust wrapper: Add aes module
2025-09-30 20:34:25 -05:00
Daniel Pouzzner
4a176d175a Merge pull request #9137 from kareem-wolfssl/gh8354
Fix documentation typo for wc_ed25519_export_public.
2025-09-30 20:34:06 -05:00
Daniel Pouzzner
c7cd3b6c6d Merge pull request #8543 from JacobBarthelmeh/fsl_caam
handle unsupported fsl algo
2025-09-30 20:33:34 -05:00
Daniel Pouzzner
42d2b81231 Merge pull request #9209 from mattia-moffa/20250910-certauth-clienthello
Add support for certificate_authorities extension in ClientHello
2025-09-30 20:33:16 -05:00
Daniel Pouzzner
f869daafa2 Merge pull request #9037 from night1rider/issue-9009-cmake-options
Updating configure/Cmake to track Apple options for resulting wolfssl.pc file that is generated
2025-09-30 20:32:52 -05:00
Kareem
0efc8118d3 Fix potential memory leak in wolfSSL_X509_verify_cert. 2025-09-30 17:39:33 -07:00
Kareem
a3a08e81a9 Fix running tests in FIPS mode with hash DRBG disabled. 2025-09-30 16:15:21 -07:00
Daniel Pouzzner
b56cafdd25 Merge pull request #8692 from kareem-wolfssl/zd19563_verify
Update wolfSSL_X509_verify_cert to retry all certs until a valid chain is found.
2025-09-30 16:22:41 -05:00
David Garske
50f25c5849 Merge pull request #9254 from douzzer/20250929-WOLFSSL_KERNEL_MODE
20250929-WOLFSSL_KERNEL_MODE
2025-09-30 09:04:13 -07:00
Sean Parkinson
4719fd5e80 Ed448: No large code option with fast code
Make from bytes, to bytes and mod top half use for loops when no large
code.
Make generation script generate casting changes.
2025-09-30 09:38:06 +10:00
Daniel Pouzzner
7ea66aeffe refactor WOLFSSL_LINUXKM gates as generic WOLFSSL_KERNEL_MODE gates where appropriate:
rename WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS to WOLFSSL_USE_SAVE_VECTOR_REGISTERS, and wherever appropriate, replace defined(WOLFSSL_LINUXKM) with defined(WOLFSSL_USE_SAVE_VECTOR_REGISTERS).

rename WC_WANT_FLAG_DONT_USE_AESNI to WC_WANT_FLAG_DONT_USE_VECTOR_OPS.

rename lkm_printf() to wc_km_printf().

replace WOLFSSL_LINUXKM gates on kernel-incompatible includes with header-specific gates NO_STRING_H, NO_STDINT_H, NO_LIMITS_H, NO_CTYPE_H, NO_STDLIB_H

remove low level threading setup section of wolfssl/internal.h, which duplicated existing logic in wc_port.h, except for off-topic WOLFSSL_APACHE_MYNEWT TLS-layer setup, which is preserved, and a defined(__NT__) clause, which is now merged into the existing section in wc_port.h.
2025-09-29 16:59:12 -05:00
David Garske
6698cb7616 Fix for crypto callback only 2025-09-29 12:37:57 -07:00
Brett Nicholas
5121847728 add HAVE_SELFTEST protection 2025-09-29 12:00:41 -06:00
Daniel Pouzzner
1247d2b5ed Merge pull request #9249 from lealem47/wg_enable_encoding
Enable base16 & 64 encoding when wolfGuard is enabled
2025-09-29 12:49:36 -05:00
Brett Nicholas
7b67dbaa31 add FIPS protection to test.c usage of wc_HKDF_ex() 2025-09-29 11:36:18 -06:00
philljj
436a06e864 Merge pull request #9251 from douzzer/20250928-linuxkm-krealloc_node_align_noprof
20250928-linuxkm-krealloc_node_align_noprof
2025-09-29 12:16:10 -05:00
Brett Nicholas
26ed835ca1 fix HKDF test macro protection 2025-09-29 10:52:22 -06:00
Juliusz Sosinowicz
d8fd19feb8 DTLS SRTP should also do a cookie exchange since it uses UDP 2025-09-29 18:27:36 +02:00
Brett Nicholas
3c81fffedd Add HKDF cryptoCb and test 2025-09-29 10:16:01 -06:00
Reda Chouk
be02b1ea72 Added check in TLX_Parse to check if KeyShare extension is present
SupportedGroups must be present too (and viceversa).
From RFC 8446 Section 9.2.
2025-09-29 13:10:32 +02:00
Daniel Pouzzner
97c094f802 linuxkm/: accommodate API change from k[v]realloc_noprof() to k[v]realloc_node_align_noprof() expected in 6.18+ (current linux-next). 2025-09-28 11:46:17 -05:00
David Garske
eda6c184bb Merge pull request #9219 from kareem-wolfssl/zd20538
Fix building with --enable-keygen --enable-rsavfy.
2025-09-26 14:08:33 -07:00
Lealem Amedie
224dbb75d0 Enable base16 & 64 encoding when wolfGuard is enabled 2025-09-26 14:49:51 -06:00
Kareem
ef989a4241 Merge remote-tracking branch 'upstream/master' into zd19563_verify 2025-09-26 11:13:28 -07:00
Kareem
d2537a883f Always add failed certs back to cert store. 2025-09-26 11:13:19 -07:00
Kareem
b302e8edd0 Move CERT_FILETYPE definition, use it in echoserver. 2025-09-26 10:58:51 -07:00
Kareem
28aef2f4dd Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20038_3 2025-09-26 10:56:42 -07:00
Josh Holtrop
f336e8fc5a Rust wrapper: Add aes module 2025-09-26 13:18:51 -04:00
Juliusz Sosinowicz
f798a585d9 Abort connection if we are about to send the same CH 2025-09-26 12:08:53 +02:00
Sean Parkinson
b982f86d2f Merge pull request #8818 from JacobBarthelmeh/tx
fix for threadx warning and add compile test
2025-09-26 08:33:38 +10:00
Kareem
af9a06e9bf Merge remote-tracking branch 'upstream/master' into zd19563_verify 2025-09-25 10:39:11 -07:00
Kareem
3a4472f5da Merge remote-tracking branch 'upstream/master' into zd20527 2025-09-25 10:37:22 -07:00
Kareem
a3b29ed99f Merge remote-tracking branch 'upstream/master' into zd20038_3 2025-09-25 10:32:13 -07:00
Kareem
193e5205ed Fix documentation typo for wc_ed25519_export_public. 2025-09-25 10:31:18 -07:00
Kaleb Himes
cac309d0d8 Merge pull request #9244 from douzzer/20250924-configure-fips-and-linuxkm-and-rdseed-options
20250924-configure-fips-and-linuxkm-and-rdseed-options
2025-09-25 11:03:22 -06:00
JacobBarthelmeh
54a52f0482 remove sed command for -Werror and refactor threadx.yml workflow 2025-09-25 09:27:16 -06:00
JacobBarthelmeh
677eeb31e4 add netxduo compile test 2025-09-25 09:27:16 -06:00
JacobBarthelmeh
50835c14a2 fix warning of const char* passed as char* 2025-09-25 09:27:16 -06:00
JacobBarthelmeh
40b9fc35f9 handle unsupported fsl algo 2025-09-25 09:14:59 -06:00
JacobBarthelmeh
65d4e01ad6 Merge pull request #9212 from holtrop/rust-wc-random
Rust wrapper: add wolfssl::wolfcrypt::random module
2025-09-25 09:10:07 -06:00
Daniel Pouzzner
8516411ff2 configure.ac: add --enable-wolfguard, --enable-intelrdseed, --enable-fips=v5.2.3, and --enable-fips=v5.2.4;
remove obsolete/wrong linuxkm incompatible-feature tests and errors for enable_compkey/ENABLED_COMPKEY/HAVE_COMP_KEY;

tweak ENABLED_ENTROPY_MEMUSE_DEFAULT logic to check for RDRAND/RDSEED.
2025-09-24 22:39:12 -05:00
Sean Parkinson
561fead861 Merge pull request #9235 from anhu/rpi_WC_RESEED_INTERVAL
Fixing up a small documentation omission.
2025-09-25 10:48:37 +10:00
Daniel Pouzzner
b5a914b6c2 Merge pull request #9239 from SKlimaRA/SKlimaRA/zd20556
fixes zd20556.
2025-09-24 13:53:18 -05:00
Stanislav Klima
1cfafc2a52 fixes from zd20556 2025-09-24 12:03:39 +02:00
Sean Parkinson
e168714123 Merge pull request #9236 from douzzer/20250923-wc_XChaCha20Poly1305_crypt_oneshot-empty-message
20250923-wc_XChaCha20Poly1305_crypt_oneshot-empty-message
2025-09-24 11:59:12 +10:00
Sean Parkinson
ae760923e3 Merge pull request #9208 from effbiae/set-cert-type
refactor to WOLFSSL_SET_CERT_TYPE
2025-09-24 10:00:03 +10:00
Sean Parkinson
9cf91e157c Merge pull request #9218 from gojimmypi/pr-server-sm2-cert
Generate server-sm2-cert.der
2025-09-24 09:47:56 +10:00
Sean Parkinson
aa87b35964 Mark variables as volatile
Ensures compiler optimizers don't stop code from being constant time.
2025-09-24 08:47:20 +10:00
Sean Parkinson
51a7531b6a Merge pull request #9232 from LinuxJedi/fix-deb-builds
Cleanup debian build
2025-09-24 08:24:51 +10:00
Mattia Moffa
26c9908504 Use string literals in tests, fix add CA functions 2025-09-24 00:11:55 +02:00
Daniel Pouzzner
4af6eb4f2b wolfcrypt/src/chacha20_poly1305.c: in wc_XChaCha20Poly1305_crypt_oneshot(), allow empty message. 2025-09-23 17:06:22 -05:00
Anthony Hu
93955a2ba7 Fixing up a small documentation omission. 2025-09-23 15:24:50 -04:00
Kareem
0fcfade6a0 Add missing aes NULL check to SI Labs wc_AesSetKey. 2025-09-23 10:16:47 -07:00
Kaleb Himes
7084728482 Merge pull request #9230 from douzzer/20250922-linuxkm-ignore-WOLFSSL_DH_GEN_PUB
20250922-linuxkm-ignore-WOLFSSL_DH_GEN_PUB
2025-09-23 10:07:03 -06:00
gojimmypi
a4d0a777bc Generate server-sm2-cert.der 2025-09-23 08:32:21 -07:00
effbiae
a8fb94b425 restore inner server name in TLSX_WriteWithEch 2025-09-23 23:30:25 +10:00
Mattia Moffa
4535572428 Use memio in tests, fix ifdef, fix typos 2025-09-23 11:50:21 +02:00
effbiae
b20f3dac57 refactor to set_cert_type 2025-09-23 19:27:22 +10:00
Andrew Hutchings
b8df4d84e9 Cleanup debian build
* CFLAGS get pulled in anyway with configure options, or part of the
  env, we don't need to add them
* Path handling went wrong in one specific platform test run
2025-09-23 06:39:04 +01:00
Sean Parkinson
e763dcc33b Merge pull request #9228 from LinuxJedi/stm32-rtc
Fix STM32 benchmark endless loop after 1 hour
2025-09-23 12:05:52 +10:00
Sean Parkinson
e497d28ae1 Merge pull request #9223 from kareem-wolfssl/zd20543_4
Fix non constant compare of TLS 1.3 binder, check for negative dst_len in wc_XChaCha20Poly1305_crypt_oneshot.
2025-09-23 09:09:33 +10:00
Kareem
1c7fe06322 Also gate out wc_Sha512Final for SILabs. 2025-09-22 15:45:37 -07:00
Daniel Pouzzner
006fe05305 linuxkm/lkcapi_dh_glue.c: don't test for WOLFSSL_DH_GEN_PUB -- assume that wc_DhGeneratePublic() will be available when defined(WOLFSSL_DH_EXTRA), and fail at compile time if not. 2025-09-22 14:06:07 -05:00
night1rider
4dfa75fbfa Updating support/wolfssl.pc.in, CMakelist.txt, and configure.ac to track missing apple options in the resulting wolfssl.pc file by adding new PC_LIBS_PRIVATE to track options 2025-09-22 12:00:33 -06:00
Reda Chouk
e3fbb24713 Fix malformed DTLS comment syntax 2025-09-22 12:59:30 +02:00
Andrew Hutchings
504c51f354 Fix STM32 benchmark endless loop after 1 hour
If the STM32 has an RTC, this is used to time the execution of each
benchmark item. It was only multiplying hours by 24 to get seconds, so
after one hour the amount of seconds went to less than 3600. Therefore
the benchmark thought negative time elapsed and would never end.
2025-09-21 08:19:16 +01:00
JacobBarthelmeh
4ca5c315fc Merge pull request #9222 from douzzer/20250919-GetEcDiffieHellmanKea-clang-analyzer-deadcode.DeadStores
20250919-GetEcDiffieHellmanKea-clang-analyzer-deadcode.DeadStores
2025-09-19 22:01:31 -06:00
jordan
fa4312edef curl: document tiny-curl config a bit more. 2025-09-19 15:56:51 -05:00
gojimmypi
d50593834b Add fix for SHA HW on ESP-IDF v6 2025-09-19 12:04:46 -07:00
Kareem
f4d9c90827 Fix swapped WOLFSSL_SILABS_SHA384/SHA512 defines in sha512.c. 2025-09-19 11:45:22 -07:00
Kareem
7afcf20077 Fix non constant compare of TLS 1.3 binder, check for negative dst_len in wc_XChaCha20Poly1305_crypt_oneshot. 2025-09-19 11:39:46 -07:00
Daniel Pouzzner
4174f554be src/internal.c: fix clang-analyzer-deadcode.DeadStores in GetEcDiffieHellmanKea(). 2025-09-19 11:22:19 -05:00
Mattia Moffa
5efc4a7cd0 Fix tests 2025-09-19 16:45:15 +02:00
Josh Holtrop
821758a73c Rust wrapper: set rpath for unit test binaries 2025-09-19 07:48:36 -04:00
Josh Holtrop
ed46357fe1 Rust wrapper: Run unit tests in github workflow 2025-09-19 07:34:37 -04:00
Kareem
23f595586d Fix building with --enable-keygen --enable-rsavfy. 2025-09-18 16:21:08 -07:00
Sean Parkinson
b90720c6be Merge pull request #9176 from effbiae/do-server-key-exchange
refactor parts of DoServerKeyExchange()
2025-09-19 08:36:07 +10:00
JacobBarthelmeh
5d9c608ed6 Merge pull request #9195 from rlm2002/zd20508
address undefined shift behavior and overflow
2025-09-18 15:34:32 -06:00
JacobBarthelmeh
f143dbb858 Merge pull request #9217 from douzzer/20250918-25519-low-mem-gates
20250918-25519-low-mem-gates
2025-09-18 14:34:13 -06:00
JacobBarthelmeh
1f33b9910c Merge pull request #9215 from LinuxJedi/fix-ACVP_VECTOR_TESTING
Fix a test when using `ACVP_VECTOR_TESTING`
2025-09-18 11:47:02 -06:00
JacobBarthelmeh
beaf16b9e8 Merge pull request #9216 from philljj/log_mem_err_msg
ssl internal: log preMasterSecret Memory error msg.
2025-09-18 11:45:03 -06:00
Daniel Pouzzner
d15523a6df fix gating in wolfssl/wolfcrypt/fe_operations.h -- gate out load_3() and load_4() when !(CURVE25519_SMALL || ED25519_SMALL);
harmonize low-mem outer gate in wolfcrypt/src/fe_operations.c with outer gate in wolfcrypt/src/fe_low_mem.c.
2025-09-18 12:27:37 -05:00
jordan
0231f33b2e ssl internal: log preMasterSecret Memory error msg. 2025-09-18 09:26:10 -05:00
Reda Chouk
8f47b4bb08 Prevent DTLS clients from replaying ClientHello
messages when receiving bogus Finished messages in epoch 0 by
ensuring Finished messages are only ignored in encrypted epochs (1).
2025-09-18 14:41:12 +02:00
Andrew Hutchings
b7679dbe96 Fix a test when using ACVP_VECTOR_TESTING
The `ACVP_VECTOR_TESTING` blocks the clearing of the output when an auth
tag check fails. This causes a test for that scenario to fail, so don't
do that test whcn `ACVP_VECTOR_TESTING` is defined.
2025-09-18 11:37:06 +01:00
Josh Holtrop
2819e5c4cc Rust wrapper: add wolfssl::wolfcrypt::random module 2025-09-17 17:11:47 -04:00
philljj
7a0c40ee16 Merge pull request #9210 from douzzer/20250916-linuxkm-fixes
20250916-linuxkm-fixes
2025-09-17 15:50:03 -05:00
JacobBarthelmeh
05bcd82adc Merge pull request #9191 from holtrop/rust-wrapper
Create initial Rust wrapper structure
2025-09-17 14:20:34 -06:00
Daniel Pouzzner
66ee2c2ef3 linuxkm/Makefile and linuxkm/Kbuild:
* refactor .PHONY Kbuild target rename-pie-text-and-data-sections into macro RENAME_PIE_TEXT_AND_DATA_SECTIONS, and execute it conditional on module_exports.c regeneration;

* use .ONESHELL in the wrapper Makefile too, and rework the changes in bf5536d6b8 such that the recursive make is always executed, but will leave the target untouched if it was already up-to-date relative to its dependencies.

these tweaks fix the module build to restore automatic rebuild when dependencies are updated.
2025-09-17 13:10:16 -05:00
Daniel Pouzzner
7ddf263199 linuxkm/Kbuild: add support for FORCE_GLOBAL_OBJTOOL_OFF. 2025-09-17 13:10:16 -05:00
JacobBarthelmeh
72ae012ace Merge pull request #9202 from gojimmypi/pr-apple-workflow-update
Remove missing workflow strategy, run only for wolfssl owner
2025-09-17 11:44:34 -06:00
JacobBarthelmeh
b8b35e25e6 Merge pull request #9204 from gojimmypi/pr-test-order
Change test order: random_test after SHA tests
2025-09-17 10:43:30 -06:00
JacobBarthelmeh
377d238457 Merge pull request #9207 from embhorn/zd20520
Check for NO_THREAD_LS before assigning THREAD_LS_T
2025-09-17 10:38:48 -06:00
JacobBarthelmeh
5b864657b7 Merge pull request #9175 from SparkiDev/sm2_cert_vfy_fix
SM2 TLS1.3: Fix certificate verify
2025-09-17 10:16:44 -06:00
Josh Holtrop
d2c16bacb6 Rust wrapper: add include.am to include files in distribution 2025-09-17 10:44:40 -04:00
Mattia Moffa
3bdb43eb6a Add support for certificate_authorities extension in ClientHello 2025-09-17 15:33:05 +02:00
philljj
5cb2103feb Merge pull request #9206 from douzzer/20250916-linuxkm-module-update-fips-hash
20250916-linuxkm-module-update-fips-hash
2025-09-16 19:06:06 -05:00
JacobBarthelmeh
65108beee8 Merge pull request #9201 from julek-wolfssl/debian-rules
Ignore `debian/rules`
2025-09-16 17:50:57 -06:00
JacobBarthelmeh
b591b52ab2 Merge pull request #9182 from douzzer/20250910-wc_ecc_export_x963-no-PRIVATE_KEY_UNLOCK
20250910-wc_ecc_export_x963-no-PRIVATE_KEY_UNLOCK
2025-09-16 17:15:24 -06:00
Eric Blankenhorn
600058529c Check for NO_THREAD_LS before assigning THREAD_LS_T 2025-09-16 16:17:49 -05:00
Daniel Pouzzner
bf5536d6b8 linuxkm/Makefile:
* add module-update-fips-hash rule, for in-place FIPS hash update without rebuild;
* improve PIE sequence in module build rule to double-check stability of the relocation table after final rebuild;

Makefile.am: add a module-update-fips-hash passthrough target.
2025-09-16 14:38:51 -05:00
gojimmypi
152075848c Change test order: random_test after SHA tests 2025-09-16 10:48:14 -07:00
Ruby Martin
a8fca08b7e add edge case unit test where cost=22, block=8 2025-09-16 11:04:43 -06:00
Ruby Martin
86abe793d7 address undefined shift behavior and overflow 2025-09-16 11:03:21 -06:00
gojimmypi
01178b325e Remove missing strategy, run only for wolfssl owner 2025-09-16 08:50:14 -07:00
Juliusz Sosinowicz
c2a3a37c1e Ignore debian/rules 2025-09-16 16:08:01 +02:00
effbiae
7da0b54d32 refactor DoServerKeyExchange() 2025-09-16 12:02:38 +10:00
JacobBarthelmeh
d4f8c9c754 Merge pull request #9189 from julek-wolfssl/hostap-vm.yml-cache-check
Fix: Avoids hostap checkout on cache hit
2025-09-15 13:21:54 -06:00
Chris Conlon
aa8151dc4b Merge pull request #9186 from miyazakh/fsp_ra6m3_up2
Renesas RA6M3 : Minor README update
2025-09-15 10:10:50 -06:00
Kareem
989a9da65a Move CERT_FILETYPE definition. 2025-09-12 16:33:29 -07:00
Kareem
ec92f76dec Fix tests when building with PEM support disabled by using DER certs/keys. 2025-09-12 16:11:07 -07:00
Kareem
a216ea170c Add test case for --enable-coding=no. 2025-09-12 16:11:07 -07:00
Kareem
5226b1b410 Fix building with --coding=no/WOLFSSL_PEM_TO_DER undefined. 2025-09-12 16:11:07 -07:00
Josh Holtrop
167e76add4 Create initial Rust wrapper structure
Generate bindings to C library with bindgen
Add github CI workflow to build Rust wrapper
2025-09-12 15:49:56 -04:00
Juliusz Sosinowicz
98ac98db9a Fix: Avoids hostap checkout on cache hit
This change prevents the hostap repository from being cloned
unnecessarily when the cache is hit, improving workflow efficiency.
2025-09-12 17:10:13 +02:00
Luis Colmenero
b146c4e417 Add SM3 in wolfSSL_HmacCopy 2025-09-12 16:44:40 +02:00
Hideki Miyazaki
13809256ef minor update README 2025-09-12 17:54:49 +09:00
Sean Parkinson
dc421a0d4c Merge pull request #9164 from dgarske/keytoder
Add support for enabling RSA private key to DER without keygen
2025-09-12 10:36:34 +10:00
Sean Parkinson
a17b10ef10 Merge pull request #9171 from effbiae/ss-callback
refactor SessionSecret_callback*
2025-09-12 08:02:51 +10:00
JacobBarthelmeh
f5a735a184 Merge pull request #9180 from dgarske/stsafe-pad
Fix for ST-Safe issue with ECC signature R/S needing leading zero pad
2025-09-11 14:47:49 -06:00
philljj
a7cb64fcc0 Merge pull request #9184 from douzzer/20250910-linuxkm-even-more-OBJECT_FILES_NON_STANDARD
20250910-linuxkm-even-more-OBJECT_FILES_NON_STANDARD
2025-09-11 15:18:52 -05:00
Daniel Pouzzner
20d7650edf linuxkm/Kbuild: when ENABLED_LINUXKM_PIE, always set "$(WOLFCRYPT_PIE_FILES): OBJECT_FILES_NON_STANDARD := y", as before. completes reversion of 04834680d5. 2025-09-11 13:53:59 -05:00
David Garske
f0b35d18a0 Merge pull request #9174 from philljj/tiny_curl
curl: support --enable-curl=tiny option.
2025-09-11 10:39:56 -07:00
David Garske
3e63bc68d4 Add support for enabling RSA private key to DER without keygen. ( new macro WOLFSSL_KEY_TO_DER) 2025-09-11 10:29:31 -07:00
David Garske
c397a27897 Appease IAR compiler possible use of uninitialized variables 2025-09-11 10:27:01 -07:00
David Garske
88586a5a47 Fix for ST-Safe issue with ECC signature R/S parsing needing leading zero pad (ZD 20504) 2025-09-11 10:27:01 -07:00
philljj
472605fb54 Merge pull request #9183 from douzzer/20250911-linuxkm-dont-undefine-CONFIG_OBJTOOL
20250911-linuxkm-dont-undefine-CONFIG_OBJTOOL
2025-09-11 12:24:05 -05:00
Daniel Pouzzner
de50268dfd linuxkm/Kbuild: don't undefine CONFIG_OBJTOOL (breaks FIPS hash stability on some target kernels/configs);
add config-based gate on "$(WOLFCRYPT_PIE_FILES): OBJECT_FILES_NON_STANDARD := y".
2025-09-11 10:24:53 -05:00
philljj
edf3c3158c Merge pull request #9181 from douzzer/20250910-linuxkm-more-OBJECT_FILES_NON_STANDARD
20250910-linuxkm-more-OBJECT_FILES_NON_STANDARD
2025-09-10 22:03:10 -05:00
effbiae
2332347ca1 refactor SessionSecret_callback* 2025-09-11 11:54:40 +10:00
Daniel Pouzzner
2028d1f0f4 doc/dox_comments/header_files/ecc.h: add docs for wc_ecc_make_pub() and wc_ecc_make_pub_ex(), and update docs for wc_ecc_export_x963() and wc_ecc_export_x963_ex() to reflect that they export the public key, and add see-alsos to wc_ecc_make_pub. 2025-09-10 17:02:57 -05:00
Daniel Pouzzner
04834680d5 linuxkm/Kbuild: when ENABLED_LINUXKM_PIE, use "undefine CONFIG_OBJTOOL" to inhibit false-positive "unannotated intra-function call" due to inline retpolines;
linuxkm/Makefile, linuxkm/include.am, linuxkm/module_hooks.c: remove linuxkm/pie_first.c, linuxkm/pie_last.c, and references to them (replaced by fenceposts in linuxkm/wolfcrypt.lds).
2025-09-10 15:08:41 -05:00
David Garske
484f35244e Merge pull request #9179 from wolfSSL/revert-9145-zd20038_2
Revert "Fix building with --coding=no/WOLFSSL_PEM_TO_DER undefined."
2025-09-10 12:33:31 -07:00
Juliusz Sosinowicz
74c7115cc1 Revert "Fix building with --coding=no/WOLFSSL_PEM_TO_DER undefined." 2025-09-10 18:07:57 +02:00
Daniel Pouzzner
e3423d0922 Merge pull request #9163 from kaleb-himes/Batch2-WinCE
Add the updated WinCE settings for FIPS 140-3 submission
2025-09-10 09:57:59 -05:00
Daniel Pouzzner
92d504f726 Merge pull request #9161 from LinuxJedi/enhance-debian
Make Debian packaging more Debian-like
2025-09-10 09:49:43 -05:00
David Garske
ce5878fb8d Merge pull request #9162 from embhorn/zd18673
Fixes for INTIME RTOS
2025-09-10 07:44:19 -07:00
David Garske
71068a42a9 Merge pull request #9172 from douzzer/20250908-WOLFSSL_TEXT_SEGMENT_CANONICALIZER
20250908-WOLFSSL_TEXT_SEGMENT_CANONICALIZER
2025-09-10 07:44:02 -07:00
David Garske
2a1df11327 Merge pull request #9145 from kareem-wolfssl/zd20038_2
Fix building with --coding=no/WOLFSSL_PEM_TO_DER undefined.
2025-09-09 16:24:21 -07:00
Sean Parkinson
1dc40c5129 Merge pull request #9165 from effbiae/key-present
align two portions of src/internal.c prior to refactor
2025-09-10 07:44:41 +10:00
Eric Blankenhorn
2179dccb1d Fix VS proj 2025-09-09 15:36:55 -05:00
David Garske
f1ef484076 Merge pull request #9150 from miyazakh/update_fsp_v610
Update Renesas FSP version on RA6M4
2025-09-09 12:26:03 -07:00
David Garske
b3aa39ddad Merge pull request #9138 from JacobBarthelmeh/sgx
update for SGX CPU ID to follow atomics refactor
2025-09-09 12:18:51 -07:00
David Garske
5957afb8b5 Merge pull request #9158 from miyazakh/update_fsp_v610_ra6m3
Update Renesas FSP version on RA6M3 example
2025-09-09 12:18:17 -07:00
David Garske
3e3b673ea7 Merge pull request #9123 from gojimmypi/pr-espressif-certs-test
Exclude wolfssl certs_test.h from Espressif user_settings.h
2025-09-09 12:17:00 -07:00
Eric Blankenhorn
a3a21fac3c Fix Makefile 2025-09-09 11:56:10 -05:00
Eric Blankenhorn
b6bb43e9bc Fix Makefile 2025-09-09 11:39:40 -05:00
Sean Parkinson
b4f1abe0f4 SM2 TLS1.3: Fix certificate verify
Code to verify with SM2/SM3 was not able to be reached.
The check of hsType (which was ECC for both ECC and SM2/SM3) was
replaced with a check of peerSigAlgo for ecc_dsa_sa_algo which is
different for ECDSA and SM2/SM3.
2025-09-09 21:30:37 +10:00
Sean Parkinson
342c37d8a3 Merge pull request #9159 from kareem-wolfssl/zd20378
Allow the keyCertSign bit to be asserted specifically for self-signed CAs.
2025-09-09 21:01:21 +10:00
jordan
c60553da66 curl: support --enable-curl=tiny option. 2025-09-08 17:03:35 -05:00
Daniel Pouzzner
ae4b33c997 linuxkm/linuxkm_wc_port.h: when HAVE_LINUXKM_PIE_SUPPORT, map
WOLFSSL_TEXT_SEGMENT_CANONICALIZER() to wc_linuxkm_normalize_relocations(), and
  define WOLFSSL_TEXT_SEGMENT_CANONICALIZER_BUFSIZ to 8192.

linuxkm/module_hooks.c: in wc_linuxkm_normalize_relocations(), add checks for
  out-of-order offsets.
2025-09-08 16:43:34 -05:00
Eric Blankenhorn
5fd5ff89c3 Changes from customer 2025-09-08 13:20:13 -05:00
Kareem
f772aad95a Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20378 2025-09-08 10:16:14 -07:00
philljj
bdc1f890c8 Merge pull request #9168 from douzzer/20250905-linuxkm-pie-cst32
20250905-linuxkm-pie-cst32
2025-09-06 11:25:33 -05:00
Hideki Miyazaki
815f2ce9db Update Renesas FSP version on RA6M3 example 2025-09-06 19:12:24 +09:00
Andrew Hutchings
0a4ce40eb8 Make Debian packaging more Debian-like
When you do `./configure`, the options are stored in the rules file.
This then means you can use the normal Debian packaging methods.

`make deb` also now uses `dpkg-buildpackage`.
2025-09-06 06:22:54 +01:00
effbiae
8e9a04c55f align two portions of src/internal.c prior to refactor 2025-09-06 13:55:44 +10:00
gojimmypi
c22354e2f5 Exclude wolfssl certs_test.h from Espressif user_settings.h 2025-09-05 17:08:04 -07:00
Daniel Pouzzner
8a7331776a linuxkm/Kbuild: for PIE containerization, add .rodata.cst32 to the move list. 2025-09-05 17:55:24 -05:00
kaleb-himes
7c2fc506b5 Fix trailing whitespace in new user_settings.h 2025-09-05 15:36:21 -06:00
kaleb-himes
3f7ba638dd Add the updated WinCE settings for FIPS 140-3 submission
Add the missing README.md
2025-09-05 15:36:21 -06:00
Eric Blankenhorn
c1b4af2dd7 Fix parenthesis issue 2025-09-05 16:35:41 -05:00
Eric Blankenhorn
b4a82877b8 Remove *.filters file 2025-09-05 16:23:26 -05:00
Eric Blankenhorn
53ee6d3a0b Fixes for INTIME RTOS 2025-09-05 16:23:26 -05:00
David Garske
48385884c0 Merge pull request #9167 from gojimmypi/pr-fix-watcom-setld80bit
Pin Watcom compiler in workflow to 2025-09-01-Build
2025-09-05 13:33:31 -07:00
gojimmypi
5c2f90968f Pin Watcom compiler in workflow to 2025-09-01-Build 2025-09-05 12:57:58 -07:00
Kareem
8e7bcfc5c2 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20378 2025-09-04 10:16:53 -07:00
Kareem
562ee21d36 Add ALLOW_SELFSIGNED_INVALID_CERTSIGN to known macros. 2025-09-04 10:16:41 -07:00
David Garske
4d1fa1b012 Merge pull request #9160 from douzzer/20250903-PR8329-rework
20250903-PR8329-rework
2025-09-04 09:43:53 -07:00
Daniel Pouzzner
ee2e63444d wolfcrypt/src/sha512.c: don't remap ByteReverseWords64(), remove ByteReverseWords64_1() inline asm macro, and refactor Sha512FinalRaw() and wc_Sha384FinalRaw() to write directly to the output buffer when possible. 2025-09-03 22:16:15 -05:00
Sean Parkinson
5108dcd0d6 Merge pull request #9157 from rlm2002/coverity
move pathLengthSet assignment
2025-09-04 08:35:16 +10:00
lealem47
e29b65d22b Merge pull request #9140 from dgarske/sniffer_partialoverlap
Improve sniffer detection of partial overlap
2025-09-03 14:12:44 -06:00
Kareem
37fc63ca39 Allow the keyCertSign bit to be asserted specifically for self-signed CAs. 2025-09-03 11:43:15 -07:00
David Garske
095fd88cbe Merge pull request #9091 from gojimmypi/pr-arduino-testing
Improve Arduino Examples
2025-09-03 11:09:13 -07:00
Kareem
183aa7a214 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd20038_2 2025-09-02 16:17:18 -07:00
gojimmypi
0065d9a0dd Improve Arduino Examples, add workflow testing 2025-09-02 11:45:28 -07:00
philljj
f33814b377 Merge pull request #9151 from douzzer/20250830-linuxkm-fix-get_drbg
20250830-linuxkm-fix-get_drbg
2025-09-02 11:39:25 -05:00
Ruby Martin
4d5e1d0dfe move pathLegthSet assignment 2025-09-02 10:09:11 -06:00
David Garske
6dd626de0c Improve detection of partial overlap (ZD 20369) 2025-09-02 07:51:30 -07:00
Daniel Pouzzner
aa96c352d4 add !WC_SKIP_INCLUDED_C_FILES gates in indirectly compiled files in linuxkm/, to avoid false positive unknownMacro reports from cppcheck-force-source. 2025-08-30 14:15:55 -05:00
Daniel Pouzzner
f8e4feb633 wolfssl/wolfcrypt/error-crypt.h: in WC_ERR_TRACE() definition, use WOLFSSL_DEBUG_PRINTF_FN(WOLFSSL_DEBUG_PRINTF_FIRST_ARGS, not WOLFSSL_DEBUG_PRINTF(, for compatibility with WOLF_NO_VARIADIC_MACROS. 2025-08-30 12:54:22 -05:00
Daniel Pouzzner
7df8ee4081 linuxkm/linuxkm_wc_port.h: add default setup for LINUXKM_LKCAPI_REGISTER_HASH_DRBG_DEFAULT, to make visibility in random.c;
linuxkm/lkcapi_sha_glue.c: revert f7c7ac275a (get_drbg() DISABLE_VECTOR_REGISTERS() for crypto_default_rng) -- compiler/inlining bug makes it break on at least one target, so caller needs to retain responsibility;

linuxkm/x86_vector_register_glue.c: in wc_save_vector_registers_x86(), always return WC_ACCEL_INHIBIT_E if already fpu_state & WC_FPU_INHIBITED_FLAG, for safe+correct dynamics on recursive calls.
2025-08-30 12:08:57 -05:00
Hideki Miyazaki
e2fe74502f Add wolfSSL/Debug folder as include
- remove BSP_WarmStart() due to duplicate
2025-08-30 09:28:09 +09:00
Hideki Miyazaki
295a11d0f7 update Readme 2025-08-30 09:24:46 +09:00
David Garske
7ef94284cc Merge pull request #9149 from douzzer/20250829-_mlkem_decompress_5_avx2-movzwq
20250829-_mlkem_decompress_5_avx2-movzwq
2025-08-29 16:23:16 -07:00
Daniel Pouzzner
8ed1ce6a8b wolfcrypt/src/wc_mlkem_asm.S: in _mlkem_decompress_5_avx2, use movzwq, not movzxw, for portability. 2025-08-29 14:42:48 -05:00
David Garske
330d6ad5a6 Merge pull request #9083 from mgrojo/bugfix/ada-overflow-check-error-string
Ada: fix wrapping of `wolfSSL_ERR_error_string_n`
2025-08-29 11:28:16 -07:00
David Garske
24bbb38a9a Merge pull request #9120 from effbiae/print-debug
replace (f)printf with WOLFSSL_DEBUG_PRINTF
2025-08-29 11:26:44 -07:00
David Garske
c2885cf0b9 Merge pull request #9147 from douzzer/20250828-WC_SVR_FLAG_INHIBIT-recursive
20250828-WC_SVR_FLAG_INHIBIT-recursive
2025-08-29 11:25:03 -07:00
mgrojo
cdbad34284 Ada: include use of WolfSSL.Get_Error in the example 2025-08-29 09:57:04 -07:00
mgrojo
a0c8efdffe Ada: fix wrapping of wolfSSL_ERR_error_string_n
Use unchecked conversion instead of type conversion to mimic C style
conversion from int to unsigned long, avoiding the Ada overflow check that is raised when a negative value is converted to an unsigned type.
2025-08-29 09:57:04 -07:00
effbiae
44c403f4c7 replace (f)printf with WOLFSSL_DEBUG_PRINTF 2025-08-29 12:34:22 +10:00
Daniel Pouzzner
f7c7ac275a linuxkm/linuxkm_wc_port.h and linuxkm/x86_vector_register_glue.c: refactor
wc_save_vector_registers_x86() and wc_restore_vector_registers_x86() to allow
  recursive WC_SVR_FLAG_INHIBIT while already in a vector save context;

linuxkm/lkcapi_sha_glue.c: in get_drbg() and put_drbg(),
  DISABLE_VECTOR_REGISTERS()...REENABLE_VECTOR_REGISTERS() if tfm ==
  crypto_default_rng.
2025-08-28 11:02:45 -05:00
Sean Parkinson
0224ef3d2e Merge pull request #9146 from rlm2002/gh9128_MEM_ZERO
ForceZero change for WOLFSSL_CHECK_MEM_ZERO
2025-08-28 22:37:55 +10:00
JacobBarthelmeh
9774e4959f change sgx script to create options.h if none exists 2025-08-27 16:44:47 -06:00
JacobBarthelmeh
ccf8eebc5f update for cpuid atomic refactor 2025-08-27 16:44:46 -06:00
Ruby Martin
8b1422a869 add configuration for WOLFSSL_MEM_CHECK_ZERO 2025-08-27 16:12:57 -06:00
Ruby Martin
11942e774c do not abort MEM_ZERO check if TEST_ALWAYS_RUN_TO_END is defined 2025-08-27 15:04:49 -06:00
Ruby Martin
1ad8b2897a Force zero with bufferSize instead of length. add void prototype to definitions 2025-08-27 14:56:51 -06:00
Kareem
87f99ea824 Add test case for --enable-coding=no. 2025-08-27 12:02:25 -07:00
Kareem
e25bd603ed Fix building with --coding=no/WOLFSSL_PEM_TO_DER undefined. 2025-08-27 11:53:22 -07:00
David Garske
344f127e64 Merge pull request #9129 from effbiae/wolfSSL_read_ex
SSL_read_ex() ... will return 1 for success or 0 for failure
2025-08-27 07:33:29 -07:00
David Garske
dac80aad58 Merge pull request #9142 from SparkiDev/mlkem_dec5_oor_fix
ML-KEM/Kyber: fix out of bouds read
2025-08-27 07:05:29 -07:00
effbiae
934364b8e1 wolfSSL_read_ex returns {0,1} 2025-08-27 15:35:17 +10:00
Sean Parkinson
4ff6f5f10c ML-KEM/Kyber: fix out of bouds read
Decompose 5-bit values: Don't read 15 bytes when only have 10 bytes
available.
2025-08-27 14:49:24 +10:00
David Garske
c78bb1cd42 Merge pull request #9141 from gojimmypi/espressif-latest-debug
Fix workflow for latest ESP-IDF for espressif examples
2025-08-26 15:48:05 -07:00
gojimmypi
797c1d00ac Fix workflow for latest ESP-IDF for espressif examples 2025-08-26 14:38:23 -07:00
Sean Parkinson
02cba85856 Merge pull request #9135 from douzzer/20250825-linuxkm-IntelRDseed64_r-burn-buf
20250825-linuxkm-IntelRDseed64_r-burn-buf
2025-08-27 07:22:25 +10:00
David Garske
71581e321e Merge pull request #9098 from julek-wolfssl/fix-test_wolfSSL_tls_export
Fix test_wolfSSL_tls_export
2025-08-26 12:11:49 -07:00
philljj
00860baddf Merge pull request #9136 from douzzer/20250826-more-wc_linuxkm_normalize_relocations
20250826-more-wc_linuxkm_normalize_relocations
2025-08-26 14:04:14 -05:00
David Garske
1ce13fc3ee Merge pull request #9118 from SparkiDev/api_c_split_tls13
api.c: pull out TLS 1.3 specific tests
2025-08-26 09:23:56 -07:00
Daniel Pouzzner
79a75d1ef2 linuxkm/module_hooks.c: in wc_linuxkm_normalize_relocations(), allow non-text
relocations 1 byte outside the destination segment, and when
  DEBUG_LINUXKM_PIE_SUPPORT, tally the relocation counts by segment for final info
  report;

linuxkm/module_hooks.c and linuxkm/linuxkm_wc_port.h: tweak gating on
  wc_linuxkm_normalize_relocations() and related -- ifdef
  HAVE_LINUXKM_PIE_SUPPORT, not ifdef USE_WOLFSSL_LINUXKM_PIE_REDIRECT_TABLE --
  for consistency+clarity.
2025-08-26 11:07:40 -05:00
David Garske
c7d1673948 Merge pull request #9132 from anhu/dup_CKS
Properly detect duplicate CKS extensions.
2025-08-26 09:07:04 -07:00
Juliusz Sosinowicz
d26b2811e0 test_wolfSSL_tls_export_run: silence unused cmpSess warning 2025-08-26 16:40:17 +02:00
Juliusz Sosinowicz
5934c1eece Fix test_wolfSSL_tls_export
- Add TLS_EXPORT_OPT_SZ_4 to specify previous option size
- Actually pick up failures in the tests and propagate them to the top level
- Tests v4 and v5 sessions
Fixes https://github.com/wolfSSL/wolfssl/issues/9081 and https://github.com/wolfSSL/wolfssl/pull/9082
2025-08-26 11:04:54 +02:00
Daniel Pouzzner
fa61187f2e linuxkm/module_hooks.c: in IntelRDseed64_r(), burn buf after each use to protect against info leakage. 2025-08-25 21:59:32 -05:00
Sean Parkinson
115d4d88c0 api.c: pull out TLS 1.3 specific tests 2025-08-26 09:05:46 +10:00
philljj
7aab2f3b47 Merge pull request #9126 from douzzer/20250823-linuxkm-reloc-bikeshedding
20250823-linuxkm-reloc-bikeshedding
2025-08-25 16:53:36 -05:00
lealem47
1c2fb10007 Merge pull request #9124 from dgarske/sniffer_partial_overlap
Fix for sniffer partial segment overlap that can occur when a TCP win…
2025-08-25 15:15:48 -06:00
David Garske
6ae0ecc5f3 Merge pull request #9133 from AlexLanzano/log-fix
Fix value comparison typo in if statement
2025-08-25 14:09:20 -07:00
David Garske
cfee026f98 Merge pull request #9131 from embhorn/zd20429
Fix markdown in docs
2025-08-25 14:08:30 -07:00
JacobBarthelmeh
e0913c47ef Merge pull request #9039 from tamasan238/for-pr-1
Add _new/_delete API for ML-KEM/ML-DSA
2025-08-25 14:47:07 -06:00
Kareem
623c593210 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into zd19563_verify 2025-08-25 11:36:12 -07:00
Alex Lanzano
8207053636 Fix value comparison typo in if statement 2025-08-25 13:56:35 -04:00
Anthony Hu
2885df68b4 Properly detect duplicate CKS extensions. 2025-08-25 12:01:50 -04:00
Eric Blankenhorn
6ab6634efc Fix markdown in docs 2025-08-25 09:28:08 -05:00
Sean Parkinson
ffbcd4f86c Merge pull request #9125 from douzzer/20250819-linuxkm-fips-v5-wc_GenerateSeed_IntelRD
20250819-linuxkm-fips-v5-wc_GenerateSeed_IntelRD
2025-08-25 21:37:35 +10:00
Daniel Pouzzner
a67d1a84f5 configure.ac: for linuxkm with PIE, don't include enable-fpcc in enable-all-crypto (the compiler generates a weird out-of-bounds bss reference for find_hole());
linuxkm/Makefile: in recipe (awk script) for wc_linuxkm_pie_reloc_tab.c, report and error on unexpected relocation types;

linuxkm/module_hooks.c: in wc_linuxkm_normalize_relocations():
* fix bounds checking on the input,
* recognize references pointing at the first byte after the end of the segment,
* and mask out pad bytes when rendering the 32 bit addresses;

linuxkm/wolfcrypt.lds: add 4k alignment directives just before the segment end fenceposts, to make the fenceposts more inclusive.
2025-08-23 17:21:24 -05:00
Daniel Pouzzner
d9467db007 wolfssl/wolfcrypt/types.h: fix bugprone-macro-parentheses in definition of DISABLE_VECTOR_REGISTERS. 2025-08-22 23:43:36 -05:00
Daniel Pouzzner
e0383b496a linuxkm/module_hooks.c: implement wc_linuxkm_GenerateSeed_IntelRD, gated on WC_LINUXKM_RDSEED_IN_GLUE_LAYER;
add WC_GENERATE_SEED_DEFAULT, which defaults to wc_GenerateSeed if not overridden, and replace wc_GenerateSeed with WC_GENERATE_SEED_DEFAULT in various calls to wc_SetSeed_Cb();

linuxkm/linuxkm_wc_port.h: if FIPS <v6 and RDSEED, define WC_LINUXKM_RDSEED_IN_GLUE_LAYER and define WC_GENERATE_SEED_DEFAULT wc_linuxkm_GenerateSeed_IntelRD;

wolfcrypt/test/test.c: update rng_seed_test() with gating and vectors for FIPS v5 with HAVE_AMD_RDSEED or HAVE_INTEL_RDSEED;

wolfssl/wolfcrypt/types.h: add WC_HAVE_VECTOR_SPEEDUPS helper macro, and enlarge fallthrough definition coverage for DISABLE_VECTOR_REGISTERS.
2025-08-22 21:58:00 -05:00
David Garske
8dd43077fd Fix for sniffer partial segment overlap that can occur when a TCP window is full and a TCP retransmission occurs. 2025-08-22 14:29:18 -07:00
JacobBarthelmeh
6f567bbca2 Merge pull request #9122 from julek-wolfssl/hostap-fix-cert-update
Fix hostap cert update
2025-08-22 15:28:19 -06:00
JacobBarthelmeh
9575c69d3b Merge pull request #9121 from douzzer/20250819-linuxkm-pie-normalize_relocs
20250819-linuxkm-pie-normalize_relocs
2025-08-22 15:11:48 -06:00
Kareem
c2eeeafdbe Merge remote-tracking branch 'upstream/master' into zd19563_verify 2025-08-22 13:56:44 -07:00
JacobBarthelmeh
bc5b297d33 Merge pull request #9046 from kareem-wolfssl/zd20038
Allow setting the CA type when loading into cert manager and unloading specific CA types from the cert manager.
2025-08-22 14:43:46 -06:00
David Garske
1f579afc66 Merge pull request #9117 from SparkiDev/tls13_ks_fix
TLS 1.3 KeyShare: error on duplicate group
2025-08-22 12:54:54 -07:00
David Garske
0d1e9c3264 Fix whitespace issue and known macros list 2025-08-22 12:48:55 -07:00
Kareem
4a067fa1bc Don't enforce test_wolfSSL_X509_STORE_CTX_ex12 return code as it
may be skipped, modifying the return code.
2025-08-22 11:29:21 -07:00
Juliusz Sosinowicz
4043dc2dd0 Fix hostap cert update
Update the `rsa3072-*` certs to get `suite_b_192_*` tests passing
2025-08-22 17:24:49 +02:00
Daniel Pouzzner
af4e2d127f linuxkm/: implement wc_linuxkm_pie_reloc_tab and wc_linuxkm_normalize_relocations(), and integrate with updateFipsHash(). 2025-08-22 00:38:06 -05:00
Kareem
077beaecd8 Fix memory leak in unit test, fix for loop syntax. 2025-08-21 16:33:57 -07:00
Kareem
b53db94f1e x509_verify_cert: Code review feedback. 2025-08-21 15:35:29 -07:00
David Garske
7ab4c6fa14 Merge pull request #9087 from JacobBarthelmeh/dhuk
initial SAES and DHUK support
2025-08-21 14:32:20 -07:00
David Garske
da8ffd5762 Merge pull request #8463 from JacobBarthelmeh/sgx
updating the build with SGX
2025-08-21 11:06:35 -07:00
JacobBarthelmeh
42c5324962 SAES does not have GCM support, added IV option for CBC wrapping of key 2025-08-21 09:26:40 -06:00
Sean Parkinson
d66c69eaec Merge pull request #9079 from holtrop/error-getshortint-on-negative-values
Error from GetShortInt with negative INTEGER values
2025-08-21 08:35:17 +10:00
Sean Parkinson
b3366acdaf Merge pull request #9103 from rlm2002/zd20314-reduce-binary-footprint
Exclude assembly files when WOLFSSL_ARMASM_INLINE is defined
2025-08-21 08:33:39 +10:00
Sean Parkinson
b1cdf0b214 TLS 1.3 KeyShare: error on duplicate group
Don't allow a KeyShare extension from the client to have more
than one entry for any group.
2025-08-21 08:23:31 +10:00
JacobBarthelmeh
658c3d69fb use memset, fix unlock, adjust return value checks 2025-08-20 13:53:27 -06:00
JacobBarthelmeh
993099e47e Merge pull request #9114 from douzzer/20250819-debug-trace-errcodes-dist-artifacts
20250819-debug-trace-errcodes-dist-artifacts
2025-08-20 10:48:38 -06:00
David Garske
79fe6e467b Merge pull request #9112 from SparkiDev/tls13_onlyDhePskKe_fix
TLS 1.3: Fix for onlyDhePskKe
2025-08-20 06:44:08 -07:00
David Garske
596e211a97 Merge pull request #9113 from SparkiDev/tls13_certvfy_sigalg_check
TLS 1.3: CertificateVerify - check sig alg was sent
2025-08-20 06:44:03 -07:00
Josh Holtrop
d2f139c9b0 Error from GetShortInt with negative INTEGER values - Add WORD8 case 2025-08-20 09:34:19 -04:00
Ruby Martin
0e6e040039 formatting remove whitespace
format whitespace so tabs are 4 spaces

format character count to be 80 characters or less per line

remove bracket
2025-08-19 17:08:53 -06:00
Daniel Pouzzner
5f7e2389d9 wolfssl/include.am: include wolfssl/debug-trace-error-codes.h and wolfssl/debug-untrace-error-codes.h in dist archives. 2025-08-19 17:09:58 -05:00
JacobBarthelmeh
8119034555 work around for shellcheck warning 2025-08-19 14:32:34 -06:00
JacobBarthelmeh
23498c293e cpuid dummy call with sgx and fix assembly SP + SGX build 2025-08-19 14:32:33 -06:00
JacobBarthelmeh
44784729c0 touch up clean script and comment out sp-asm for now 2025-08-19 14:32:33 -06:00
JacobBarthelmeh
59ac260ae8 add option for building sgx with assembly optimizations 2025-08-19 14:32:33 -06:00
JacobBarthelmeh
9cdbc03a23 Merge pull request #9111 from douzzer/20250818-configure-linuxkm-fips-v5
20250818-configure-linuxkm-fips-v5
2025-08-19 14:31:08 -06:00
Josh Holtrop
98b6b92a76 Error from GetShortInt with negative INTEGER values 2025-08-19 12:40:48 -04:00
Sean Parkinson
2810656242 TLS 1.3: CertificateVerify - check sig alg was sent
Check that the signature algorithm used in the CertificateVerify message
was one that was sent in the SignatureAlgorithm extension.
2025-08-19 16:27:19 +10:00
Sean Parkinson
cd55fe6135 TLS 1.3: Fix for onlyDhePskKe
Make client enforce onlyDhPskKe flag.
2025-08-19 14:29:30 +10:00
Daniel Pouzzner
b9cc060340 configure.ac: tweaks for ENABLED_LINUXKM_DEFAULTS and FIPS v5. 2025-08-18 18:21:57 -05:00
JacobBarthelmeh
c089abe92f add macro to list 2025-08-18 16:47:30 -06:00
Ruby Martin
27d03fce7a additional check for ARM ASM Inline option
append thumb2 files, append inline c files with BUILD_ARMASM_INLINE

add all asm files. move curve25519 files under BUILD_CURVE25519

include remaining files
2025-08-18 15:41:43 -06:00
David Garske
f114f2cde2 Merge pull request #9093 from kareem-wolfssl/zd20372
Multiple fixes to wolfSSL_CIPHER_description to match documentation.
2025-08-18 13:43:53 -07:00
JacobBarthelmeh
fb6375551b updating unwrap/wrap with use of DHUK 2025-08-18 13:38:26 -06:00
Kareem
aa6f1b231a Fix memory leak in X509StoreRemoveCa. 2025-08-18 10:21:54 -07:00
Kareem
19b778dda0 Protect against exceeding original depth, fix overlong lines. 2025-08-18 10:21:54 -07:00
Kareem
cb985dcfa8 ECC required for newly added unit test. 2025-08-18 10:21:54 -07:00
Kareem
60c84744c8 Fix memory leak in x509_verify_cert itself, the failed certs need a pop_free call so the reference is properly decremented, as they are no longer in the X509_STORE. 2025-08-18 10:21:53 -07:00
Kareem
1e367597b6 Fix memory leak in newly added unit test. 2025-08-18 10:21:53 -07:00
Kareem
6b01053d98 Add test case for new x509_verify_cert retry functionality.
Add CA cert with the same SKI and intentionally invalid AKI as part of x509_verify_cert test case.
2025-08-18 10:21:53 -07:00
Kareem
027f0891f4 Don't fail out if X509StoreRemoveCa fails, since adding the temp CA was optional, it is possible there is no temp CA to remove. 2025-08-18 10:21:53 -07:00
Kareem
aaadb7971d Fix narrowing conversion of type in RemoveCa. 2025-08-18 10:21:53 -07:00
Kareem
7b4a50b701 Add missing XFREE for dCert. 2025-08-18 10:21:53 -07:00
Kareem
d6f603b661 Add X509StoreRemoveCa wrapper around RemoveCa
WOLFSSL_X509's calculated subject key hash is not guaranteed to match the cert's,
ie. in the case that NO_SHA is defined.  Use the same logic as AddCa,
parsing the DER cert and using the decoded cert's subject key hash.
2025-08-18 10:21:53 -07:00
Kareem
15a147d957 Remove incorrectly added NULL check, add debug logging to RemoveCA. 2025-08-18 10:21:53 -07:00
Kareem
f9eda18445 Fix missing cast and correct freeing of certs. 2025-08-18 10:21:53 -07:00
Kareem
946f20ccc7 Add type parameter to RemoveCA to avoid removing CAs of the wrong type. 2025-08-18 10:21:53 -07:00
Kareem
025dbc3454 Retry all certificates passed into wolfSSL_X509_verify_cert until a valid chain is found, rather than failing out on the first invalid chain. This allows for registering multiple certs with the same subject key, ie. alt cert chains. 2025-08-18 10:21:52 -07:00
Sean Parkinson
43f94a5d7d Merge pull request #9107 from douzzer/20250816-cpuid_get_flags_ex-optimize
20250816-cpuid_get_flags_ex-optimize
2025-08-18 22:13:44 +10:00
Sean Parkinson
0ba16a9c5b Merge pull request #9104 from kojiws/export_long_key_orig_asn
Improve original implementation on SetAsymKeyDer() and the test
2025-08-18 22:11:25 +10:00
Daniel Pouzzner
39c6c5af6f wolfcrypt/src/cpuid.c, wolfssl/wolfcrypt/cpuid.h: change cpuid_flags_t to a
regular word32, and use non-atomics for general flag checking, with a new
  implementation of cpuid_get_flags_ex() that is threadsafe by idempotency;

rename strictly-threadsafe cpuid_get_flags_ex() as cpuid_get_flags_atomic()
  (strictly accurate return value), and add cpuid_flags_atomic_t and
  WC_CPUID_ATOMIC_INITIALIZER, used only for internal manipulation of flags in
  cpuid.c where atomicity matters.
2025-08-16 13:04:28 -05:00
lealem47
b096d9b250 Merge pull request #9106 from dgarske/zd20399
Fix sniffer issue handling TLS records with multiple handshake messages to be skipped
2025-08-15 15:57:00 -06:00
David Garske
32b0bd963b Fix issue introduced in PR #9051 causing TLS records with multiple handshake messages to be skipped (ZD 20399) 2025-08-15 10:08:28 -07:00
David Garske
a98006eca9 Merge pull request #9105 from douzzer/20250815-dilithium-dilithium_expand_s-UndefinedBinaryOperatorResult
20250815-dilithium-dilithium_expand_s-UndefinedBinaryOperatorResult
2025-08-15 09:07:38 -07:00
Daniel Pouzzner
10a05ad839 wolfcrypt/src/dilithium.c: fix dilithium_expand_s() to fall through to dilithium_expand_s_c() for s1Len not implemented for USE_INTEL_SPEEDUP. 2025-08-15 09:48:55 -05:00
Juliusz Sosinowicz
ffe3d80f8d Merge pull request #9097 from douzzer/20250812-atomic-cmpxchg
20250812-atomic-cmpxchg
2025-08-15 01:14:45 +02:00
Sean Parkinson
5b1302e4df Merge pull request #9094 from dgarske/zd20369
Fix to better detect sniffer invalid spurious re-transmissions
2025-08-15 09:01:02 +10:00
Sean Parkinson
228ede7495 Merge pull request #9102 from rlm2002/zd20212
Remove dead code and check return values.
2025-08-15 08:21:38 +10:00
Daniel Pouzzner
c5bbf4c7e0 Merge pull request #9085 from effbiae/while-pending
`wolfSSL_AsyncPoll` calls refactor
2025-08-14 14:51:05 -05:00
David Garske
e00fd2fd70 Fix to better detect invalid spurious retransmission. 2025-08-14 12:19:39 -07:00
Kareem
c535e281c6 Skip unit test when using Apple native cert validation. 2025-08-14 11:34:15 -07:00
Kareem
cb3f7de3f7 Fix issues found by CI/CD tests. 2025-08-14 11:34:15 -07:00
Kareem
3bcbbd2924 Fix issue with loading PEM certs. Address code review feedback.
Add tests.
2025-08-14 11:34:15 -07:00
Kareem
a652b733e4 Fix conversion warning. 2025-08-14 11:34:15 -07:00
Kareem
ab342978d7 Fix implicit conversion warning. 2025-08-14 11:34:14 -07:00
Kareem
61ccea55ac Allow setting the CA type when loading into cert manager
and unloading specific CA types from the cert manager.
2025-08-14 11:34:14 -07:00
Kareem
cb623dc9ea Multiple fixes to wolfSSL_CIPHER_description to match documentation.
Add "any" value for TLS 1.3 cipher suites.
Fix key size comparison for enc bits.
Output AEAD as MAC if cipher suite is using it, otherwise output hash MAC.
2025-08-14 11:27:10 -07:00
Koji Takeda
0a9356e645 Improve original implementation on SetAsymKeyDer() and the test 2025-08-15 00:04:01 +09:00
Daniel Pouzzner
cefeb4cd7e atomics/cpuid_flags fixes from peer review:
wolfcrypt/src/cpuid.c: cpuid_set_flag() and cpuid_clear_flag() thread safety;

wolfcrypt/src/wc_port.c: comments re __ATOMIC_SEQ_CST and __ATOMIC_ACQUIRE;

wolfssl/wolfcrypt/wc_port.h: single overrideable definitions for WOLFSSL_ATOMIC_COERCE_[U]INT(), and comment cleanup.

also added WOLFSSL_USER_DEFINED_ATOMICS.
2025-08-14 09:33:14 -05:00
Daniel Pouzzner
bd4e723f9d add cpuid_flags_t, WC_CPUID_INITIALIZER, and cpuid_get_flags_ex();
refactor all static flag initializations to use cpuid_get_flags_ex() for race-free dynamics;

refactor cpuid_set_flags() to be race-free;

wolfssl/wolfcrypt/wc_port.h and wolfcrypt/src/wc_port.c: add
* WOLFSSL_ATOMIC_COERCE_INT()
* WOLFSSL_ATOMIC_COERCE_UINT()
* wolfSSL_Atomic_Uint
* wolfSSL_Atomic_Uint_Init()
* wolfSSL_Atomic_Int_AddFetch()
* wolfSSL_Atomic_Int_SubFetch()
* wolfSSL_Atomic_Int_CompareExchange()
* wolfSSL_Atomic_Uint_FetchAdd()
* wolfSSL_Atomic_Uint_FetchSub()
* wolfSSL_Atomic_Uint_AddFetch()
* wolfSSL_Atomic_Uint_SubFetch()
* wolfSSL_Atomic_Uint_CompareExchange()

wolfcrypt/test/test.c: add to memory_test() tests for all atomic macros and APIs;

.github/workflows/pq-all.yml: don't use -Wpedantic for CC=c++ scenario.
2025-08-14 08:44:28 -05:00
Sean Parkinson
a1dd7dae6f Merge pull request #9095 from miyazakh/add_sha512_typeproperty
Add hashtype property to wc_Sha512 structure
2025-08-14 21:43:06 +10:00
Sean Parkinson
102525c9c9 Merge pull request #9100 from dgarske/cryptocb_only
Improve some of the build cases around crypto callback only
2025-08-14 21:41:26 +10:00
Sean Parkinson
034df3d28f Merge pull request #9101 from dgarske/asm_introspection
Add assembly introspection for RISC-V and PPC32
2025-08-14 21:38:42 +10:00
Daniel Pouzzner
a64c719fd2 Merge pull request #9092 from douzzer/20250812-Base64_Decode-outLen-bounds-fix
20250812-Base64_Decode-outLen-bounds-fix

reviewed+approved by @dgarske and @SparkiDev
2025-08-13 23:15:04 -05:00
effbiae
0e3f877326 WOLFSSL_ASYNC_WHILE_PENDING refactor 2025-08-14 12:03:13 +10:00
JacobBarthelmeh
8458b5ec1d Merge pull request #9053 from rlm2002/sessionTickets
update wolfSSL_get_SessionTicket to be able to return ticket length
2025-08-13 17:19:52 -06:00
Ruby Martin
18f3f22a7e add option for WOLFSSL_ARMASM_INLINE to CMake 2025-08-13 17:05:48 -06:00
Daniel Pouzzner
7fe890d5e7 wolfcrypt/src/coding.c: clean up comment in Base64_Decode(), per peer review. 2025-08-13 18:00:36 -05:00
Daniel Pouzzner
344db9d7f7 wolfcrypt/src/coding.c: in Base64_Decode_nonCT() and Base64_Decode(), remove overly restrictive preamble check on outLen; return BUFFER_E, not BAD_FUNC_ARG, when output buffer is too short (similarly fixed in Base16_Decode());
wolfcrypt/test/test.c: add N_BYTE_TEST() and test vectors to test all input and output length scenarios.
2025-08-13 17:43:33 -05:00
Ruby Martin
dc18f404ca remove dead code in fe_operations.c 2025-08-13 16:34:14 -06:00
Ruby Martin
71c2878780 verify previously unchecked return values 2025-08-13 16:28:36 -06:00
David Garske
53c36f8529 Add assembly introspection for RISC-V and PPC32. 2025-08-13 22:30:15 +01:00
David Garske
d79ca8a746 Improve some of the build cases around crypto callback only 2025-08-13 21:58:53 +01:00
Hideki Miyazaki
b67e063535 add hashtype property to wc_Sha512 2025-08-14 05:37:40 +09:00
Daniel Pouzzner
22b221a8be Merge pull request #9099 from gojimmypi/pr-cert-test-sizeof
Change certs_test sizeof const to define for Watcom
2025-08-13 14:41:21 -05:00
gojimmypi
f279f9cd71 Change certs_test sizeof const to define for Watcom 2025-08-13 11:58:59 -07:00
Ruby Martin
a725f4d7ac update wolfSSL_get_SessionTicket() function dox comment 2025-08-13 08:29:30 -06:00
Ruby Martin
a02025d0c9 add session ticket length return check to api tests 2025-08-13 08:29:30 -06:00
Ruby Martin
31bf1b90b4 update wolfSSL_get_SessionTicket to be able to return ticket length 2025-08-13 08:29:30 -06:00
Daniel Pouzzner
8d24a30996 Merge pull request #9096 from julek-wolfssl/libssh2-tests-fix
Fix libssh2 tests
2025-08-13 08:42:24 -05:00
Juliusz Sosinowicz
c8c93d2218 Fix libssh2 tests 2025-08-13 14:44:40 +02:00
David Garske
3289b6b3da Merge pull request #9089 from douzzer/20250811-linuxkm-and-other-fixes
20250811-linuxkm-and-other-fixes
2025-08-12 11:40:36 -07:00
Daniel Pouzzner
e24f76bb1e Merge pull request #9057 from SparkiDev/mldsa_x64_asm
ML-DSA/Dilithium: Intel x64 ASM
2025-08-11 23:12:44 -05:00
Daniel Pouzzner
2d1c797b64 fixes from cppcheck-force-source: in src/bio.c:wolfSSL_BIO_vprintf() and
wolfcrypt/src/logging.c:WOLFSSL_MSG_CERT_EX(), add missing gating on
  defined(XVSNPRINTF);

in src/crl.c:CRL_Entry_new(), fix true-positive nullPointerRedundantCheck;

in src/pk.c:_DH_compute_key(), add bounds checking to ForceZero(priv).
2025-08-11 18:12:44 -05:00
Daniel Pouzzner
11d84bea86 wolfcrypt/src/rsa.c: fix improperly handled SAVE_VECTOR_REGISTERS() retval in
wc_CheckProbablePrime_ex(), and in wc_MakeRsaKey(), make sure not to
  RESTORE_VECTOR_REGISTERS() if SAVE_VECTOR_REGISTERS() failed.
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
7b077737a9 src/crl.c: fix nullPointerRedundantCheck in CRL_Entry_free(). 2025-08-11 16:14:32 -05:00
Daniel Pouzzner
29dd6cce98 wolfssl/wolfcrypt/logging.h: add WOLFSSL_MSG_CERT_LOG_EX, give
WOLFSSL_DEBUG_CERTS definitions priority when defining WOLFSSL_MSG_CERT_LOG()
  and WOLFSSL_MSG_CERT_LOG_EX, update documentation in preamble, and fix the
  WOLFSSL_ANDROID_DEBUG definition of WOLFSSL_DEBUG_PRINTF_FIRST_ARGS and the
  WOLFSSL_ESPIDF definition of WOLFSSL_DEBUG_PRINTF();

src/ssl_load.c: use WOLFSSL_MSG_CERT_LOG_EX(), not WOLFSSL_DEBUG_PRINTF(), in
  ProcessFile().
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
f4fefcbd5e configure.ac: for linuxkm, don't set ENABLED_ENTROPY_MEMUSE_DEFAULT to yes on FIPS v5-;
linuxkm/linuxkm_wc_port.h: add WC_SVR_FLAG_NONE;

wolfssl/wolfcrypt/settings.h: for WOLFSSL_LINUXKM setup for WC_RESEED_INTERVAL,
  use UINT_MAX if FIPS v5-;

wolfssl/wolfcrypt/types.h: add definitions for SAVE_NO_VECTOR_REGISTERS2, and
  map no-op SAVE_VECTOR_REGISTERS2() to it.
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
6617f2edf8 wolfcrypt/src/memory.c, wolfcrypt/src/misc.c, and wolfssl/wolfcrypt/misc.h: move
the new implementation of wc_ForceZero from wolfcrypt/src/memory.c to inline in
  wolfcrypt/src/misc.c replacing old ForceZero() implementation, and add a wrapper
  wc_ForceZero() to wolfcrypt/src/memory.c.
2025-08-11 16:14:32 -05:00
Albert Ribes
e36daf41a4 Store in extensions the full octet string (#8967)
* Store in extensions the full octet string

Store in WOLFSSL_X509_EXTENSION.value always the full contents of the
OCTET STRING of the extension, instead of different type of data
depending on the type of extension. Previously this was only done for
unknown extensions.

* Avoid local variables in 'DecodeExtKeyUsageInternal'

There is a great performance loss on configs using 'WOLFSSL_NO_MALLOC',
'WOLFSSL_STATIC_MEMORY' and 'USE_FAST_MATH' if function
'DecodeExtKeyUsageInternal' uses intermediate variables. This can be
observed running the Zephyr test 'wolfssl_test/prj-no-malloc.conf'.

Avoid using intermediate variables, and use raw pointers to the final
destination instead.

* Add missing calls to 'FreeDecodedCert'

* Return error code from 'wolfSSL_ASN1_STRING_into_old_ext_fmt'

* Fix lines larger than 80

* Allow NULL parameters for 'DecodeAuthKeyId'

* Add comment explaining build option '--enable-old-extdata-fmt'

* Test full OCTET STRING in tests/api.c

* wolfSSL_X509V3_EXT_d2i: Honor 'WOLFSSL_SMALL_STACK'

* zephyr/wolfssl_test_no_malloc: Increase test timeout

* wolfSSL_X509V3_EXT_d2i: Extract repeated code into common part

* wolfcrypt: Remove 'WOLFSSL_LOCAL' from .c files

* wolfcrypt: Change location of functions to make diff easier
2025-08-11 10:33:15 -07:00
JacobBarthelmeh
9ad7e79dfc initial SAES and DHUK support 2025-08-11 08:46:29 -06:00
Sean Parkinson
55f30adb3e Merge pull request #9077 from douzzer/20250807-wc_ForceZero-and-linuxkm-RHEL9v6
20250807-wc_ForceZero-and-linuxkm-RHEL9v6
2025-08-11 21:06:51 +10:00
Daniel Pouzzner
5a402b2254 Merge pull request #9076 from gojimmypi/pr-fence-atomics
Disallow atomics during fence & WOLFSSL_NO_ATOMIC
2025-08-08 23:46:30 -05:00
Daniel Pouzzner
260fca600a Merge pull request #8902 from gojimmypi/pr-cert-logging
Introduce WOLFSSL_DEBUG_CERTS Certificate Debug Messages
2025-08-08 23:44:03 -05:00
Daniel Pouzzner
9236b81ade Merge pull request #9078 from rlm2002/cppCheck
Changes for cppcheck=force-source errors and warnings
2025-08-08 23:29:30 -05:00
Daniel Pouzzner
46394f3da3 Merge pull request #9075 from gojimmypi/pr-small-oids
Force old OID values: WOLFSSL_OLD_OID_SUM for WC_16BIT_CPU
2025-08-08 23:29:09 -05:00
Daniel Pouzzner
db7702f66c Merge pull request #9065 from rlm2002/zd20212
Update fe_448.c from script
2025-08-08 23:28:52 -05:00
Daniel Pouzzner
b3496a04d6 Merge pull request #9073 from holtrop/fix-inconsistent-prototype-parameter-names-wolfssl
Fix inconsistent function prototype parameter names for wolfssl
2025-08-08 23:28:33 -05:00
Daniel Pouzzner
9dc4b71112 Merge pull request #9069 from holtrop/fix-inconsistent-prototype-parameter-names
Fix inconsistent function prototype parameter names for wolfcrypt
2025-08-08 23:28:10 -05:00
Daniel Pouzzner
e6c6ef64df Merge pull request #9047 from miyazakh/rz_update
Update Renesas RZ examples
2025-08-08 23:27:35 -05:00
Daniel Pouzzner
2960844c3e Merge pull request #9068 from holtrop/fix-misra-3.1-violations
Fix MISRA rule 3.1 violations
2025-08-08 23:27:04 -05:00
Ruby Martin
6070ca8499 remove nested check for ssl->options.dtls
move cidSz declaration
2025-08-08 10:46:35 -06:00
Ruby Martin
e631f2e56e add ret check before assigning row value 2025-08-08 10:40:09 -06:00
Ruby Martin
1cfbc92ce2 initialize info var 2025-08-08 10:40:09 -06:00
Ruby Martin
9e3f726b0e add null checks for function arguments that return BAD_FUNC_ARG
update function comment
2025-08-08 10:40:09 -06:00
Ruby Martin
f5a4b13391 initialize lpMsgBuf 2025-08-08 10:40:09 -06:00
Ruby Martin
35ea769c9f add null check to CRL_Entry_free() 2025-08-08 10:40:09 -06:00
Daniel Pouzzner
a821e4cfa2 wolfcrypt/src/memory.c and wolfssl/wolfcrypt/memory.h: add WOLFSSL_API void wc_ForceZero(). 2025-08-07 21:57:56 -05:00
Ruby Martin
948f90251a clear invalidPrintfArgType warnings. initialize wc_Memory* pt to null 2025-08-07 16:48:46 -06:00
Ruby Martin
cf3f7b9911 modify argument for unsigned int
adjust warning for invalidPrintfArgType
2025-08-07 16:48:46 -06:00
gojimmypi
e6ffbfb601 Disallow atomics during fence & WOLFSSL_NO_ATOMIC 2025-08-07 15:18:42 -07:00
Sean Parkinson
9470668538 Merge pull request #9074 from douzzer/20250807-redo-PR8900
20250807-redo-PR8900
2025-08-08 08:12:42 +10:00
Daniel Pouzzner
a01d4c2d5f linuxkm/module_hooks.c: suppress -Wunused-parameter when including crypto/hash.h (for RHEL 9.6). 2025-08-07 17:09:10 -05:00
Takashi Kojo
8bd4fb52c8 Merge pull request #9072 from julek-wolfssl/dtls-replay-test
Test DTLS replay protection
2025-08-08 06:26:15 +09:00
gojimmypi
256836fe6f Force WOLFSSL_OLD_OID_SUM for WC_16BIT_CPU 2025-08-07 11:23:34 -07:00
Juliusz Sosinowicz
0d532cc3f2 Test DTLS replay protection 2025-08-07 19:52:05 +02:00
Daniel Pouzzner
2dfc7eee89 wolfcrypt/src/sp_int.c: in _sp_exptmod_nct(), use 2 bit window if bits <= 21. 2025-08-07 10:26:34 -05:00
Daniel Pouzzner
40506a6ddf Revert "SP int: modular exponentiation constant time" (fixes regression in benchmark "RSA,2048,public").
This reverts commit 219509d7d9.
2025-08-07 10:14:02 -05:00
David Garske
5a8b86da5d Merge pull request #9054 from gojimmypi/pr-please-use-debug-wolfssl
Please use DEBUG_WOLFSSL not WOLFSSL_DEBUG
2025-08-07 07:42:42 -07:00
Ruby Martin
782d0b9828 remove casts 2025-08-07 08:23:38 -06:00
David Garske
b4d186004c Merge pull request #9070 from miyazakh/cb_sha224
Support sha224 cryptocb
2025-08-07 07:07:05 -07:00
Josh Holtrop
e6eac9b920 Fix inconsistent function prototype parameter names for wolfssl 2025-08-07 09:28:50 -04:00
Josh Holtrop
61f1223f1d Fix inconsistent function prototype parameter names for wolfcrypt 2025-08-07 08:02:56 -04:00
Sean Parkinson
648a057147 ML-DSA/Dilithium: Intel x64 ASM
Optimize code knowing it is for Intel x64.
Change signing to calculate one polynomial at a time so that if it isn't
valid then we fail early.
Other minor improvements.
Move the SHA-3 4 blocks at a time assembly into SHA-3 asm file.
Make constants in assembly the same length (front pad with zeros).
2025-08-07 14:01:50 +10:00
Hideki Miyazaki
07b3695b98 wc_Sha224Final also needs to call cb 2025-08-07 09:50:06 +09:00
Hideki Miyazaki
d1bf35b209 add sha224_test() call to cryptocb test 2025-08-07 08:14:26 +09:00
Hideki Miyazaki
ccdef57e8e add sha224 cryptcb 2025-08-07 07:49:53 +09:00
gojimmypi
d64ef34ef8 Introduce WOLFSSL_DEBUG_CERTS Certificate Debug Messages 2025-08-06 13:57:53 -07:00
Josh Holtrop
33d0e1e51c Fix MISRA rule 3.1 violations 2025-08-06 12:08:15 -04:00
Daniel Pouzzner
339f7efbf4 Merge pull request #9066 from holtrop/fix-misra-8.2-violations
fe_operations.h: fix MISRA rule 8.2 violations by naming function prototype parameters
2025-08-06 11:04:44 -05:00
Daniel Pouzzner
cc137e99fe Merge pull request #8900 from SparkiDev/rsa_mod_exp_nct
SP int: modular exponentiation constant time
2025-08-06 11:04:28 -05:00
Daniel Pouzzner
753a6b1083 Merge pull request #9063 from SparkiDev/sha3_xorbuf
SHA-3 C code: use xorbuf for little-endian builds
2025-08-06 11:04:10 -05:00
Daniel Pouzzner
76c4ee9ff5 Merge pull request #9056 from SparkiDev/asn_orig_decrypt_content_fix
ASN.1 original: Fix DecryptContent to check sequence len
2025-08-06 11:03:49 -05:00
Daniel Pouzzner
b8463dc5c1 Merge pull request #9062 from kareem-wolfssl/gh9059
Fix wolfSSL_i2d_PublicKey not returning SPKI format for ECC keys.
2025-08-06 11:03:28 -05:00
Daniel Pouzzner
8e5e273aca Merge pull request #9044 from JacobBarthelmeh/docs
add static memory doxygen comments for APIs
2025-08-06 11:02:57 -05:00
Daniel Pouzzner
8e77ee5c2a Merge pull request #9064 from SparkiDev/test_api_c_split_2
api.c: split out more tests into separate files
2025-08-06 10:51:25 -05:00
Daniel Pouzzner
53eedd4b38 Merge pull request #9041 from julek-wolfssl/zero-sha->buffer
Zero sha->buffer
2025-08-06 10:50:53 -05:00
David Garske
8ff0f455f8 Merge pull request #9067 from douzzer/20250805-clang-and-linuxkm-fixes
20250805-clang-and-linuxkm-fixes
2025-08-06 05:59:49 -07:00
Hideki Miyazaki
53ae865184 Addressed code review 2025-08-06 19:13:20 +09:00
Masaki Iwai
e9292e301f add _new/_delete API for ML-KEM/ML-DSA 2025-08-06 16:52:15 +09:00
Kareem
36e0e3aa53 Fix wolfSSL_i2d_PublicKey not returning SPKI format for ECC keys. 2025-08-05 17:20:47 -07:00
Daniel Pouzzner
034cbb9b97 tests/api.c: fix -Wuninitialized-const-pointer in test_wolfSSL_CertManagerAPI();
wolfcrypt/benchmark/benchmark.c:

* use WC_RELAX_LONG_LOOP() as default definition of TEST_SLEEP(), and remove WC_RELAX_LONG_LOOP() from bench_stats_sym_finish()/bench_stats_asym_finish_ex();
* when WOLFSSL_LINUXKM but !WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS., properly wrap kernel_fpu_begin...end around floating point ops.
2025-08-05 17:05:36 -05:00
Sean Parkinson
dbb75c46c9 ASN.1 original: Fix DecryptContent to check sequence len
Original ASN.1 code wasn't checking that data in a sequence didn't
exceed the length of the sequence.
In particular, the contents of the parameters and the PKCS#5 parameters.
2025-08-06 07:42:09 +10:00
Sean Parkinson
d0f8493c6a SHA-3 C code: use xorbuf for little-endian builds
Instead of loading 64-bits with alignment protection, use xorbuf which
has built in protection.
Only XOR in as much data as cached and XOR padding and rate bit directly
rather than XORing maximum amount after clearing out rest of array and
adding in padding and rate bit.
2025-08-06 07:39:53 +10:00
Sean Parkinson
219509d7d9 SP int: modular exponentiation constant time
Using a 1-bit window size for small exponentsisn't useful.
2025-08-06 07:38:37 +10:00
gojimmypi
7c9327a36b Please use DEBUG_WOLFSSL not WOLFSSL_DEBUG 2025-08-05 12:19:30 -07:00
Josh Holtrop
90d4efa1e6 fe_operations.h: fix MISRA rule 8.2 violations by naming function prototype parameters 2025-08-05 13:09:42 -04:00
David Garske
1693f72af7 Fixes for issues copilot found. 2025-08-05 07:22:04 -07:00
David Garske
649b6ede69 Merge pull request #9058 from kojiws/fix_cid_535964
Fix CID 535964
2025-08-05 07:08:59 -07:00
Sean Parkinson
b40e3d479f api.c: split out more tests into separate files
wolfCrypt PKCS7
wolfCrypt PKCS12
OpenSSL compat ASN.1
OpenSSL compat BN
OpenSSL comppat BIO
OpenSSL comppat Digest
OpenSSL comppat MAC
OpenSSL comppat Cipher
OpenSSL comppat RSA
OpenSSL comppat DH
OpenSSL comppat EC
OpenSSL comppat ECX
OpenSSL comppat DSA
2025-08-05 19:32:56 +10:00
Koji Takeda
bfb2a817e3 Fix CID 535964 2025-08-05 13:25:42 +09:00
David Garske
8e52978153 Merge pull request #9061 from gojimmypi/pr-fix-haproxy-workflow
Update HAProxy build-vtest: fix v3.1.0 and add v3.2.0
2025-08-04 19:57:15 -07:00
gojimmypi
6e795f149c Update HAProxy build-vtest: fix v3.1.0 and add v3.2,0 2025-08-04 12:38:27 -07:00
JacobBarthelmeh
c22c37df09 Merge pull request #9055 from rlm2002/zd20212
Coverity changes
2025-08-04 10:34:29 -06:00
Ruby Martin
598a3e6232 check return value of wc_DhGetNamedKeyParamSize 2025-08-01 14:56:35 -06:00
JacobBarthelmeh
040e2102a8 Merge pull request #9049 from kojiws/import_mldsa_seed_pkcs8_reapply
Reapply - Import ML-DSA's seed from PKCS8 file
2025-08-01 14:34:09 -06:00
JacobBarthelmeh
367e3e4246 fix for wolfSSL_StaticBufferSz_ex function signature 2025-08-01 10:32:41 -06:00
JacobBarthelmeh
0392ee009f Merge pull request #9033 from anhu/mlkem-hybrid-draft-names-wolfssl
Rename ML-KEM hybrids to match IETF Draft.
2025-08-01 10:21:54 -06:00
Hideki Miyazaki
8e6b13822b fix trailing whitespace, adding files to am and know macro 2025-08-01 17:36:23 +09:00
Hideki Miyazaki
a63bb12f6b Move devId from internal to public
- addressed code review by devin
2025-08-01 16:58:16 +09:00
JacobBarthelmeh
65e7f2c40f Merge pull request #9051 from lealem47/zd20288
Sniffer: Fix infinite recursion caused by an OOO appData packet
2025-07-31 14:50:36 -06:00
JacobBarthelmeh
86adcd6c8e Merge pull request #9048 from douzzer/20250730-linuxkm-tweaks
20250730-linuxkm-tweaks
2025-07-31 14:36:56 -06:00
Daniel Pouzzner
1152d612a6 wolfcrypt/benchmark/benchmark.c: smallstack refactors for bench_mlkem() and bench_dilithiumKeySign(), and globally replace stray uses of fprintf(stderr, ...) with printf(...) for portability. 2025-07-31 11:30:42 -05:00
Daniel Pouzzner
bbd606538a linuxkm/linuxkm_wc_port.h, linuxkm/x86_vector_register_glue.c, linuxkm/Kbuild:
* rename can_save_vector_registers_x86(), save_vector_registers_x86(), and restore_vector_registers_x86(), with wc_ prefix, and properly export them;
* move setup for WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS outside BUILDING_WOLFSSL gate;
* fix !BUILDING_WOLFSSL bindings for DISABLE_VECTOR_REGISTERS() to properly fall through to no-ops in !WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS configs, and properly #error if WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS but !CONFIG_X86;

.github/workflows/linuxkm.yml: --enable-linuxkm-benchmarks for additional coverage.
2025-07-31 10:37:39 -05:00
Lealem Amedie
0e8aab241d Sniffer: Fix infinte recursion caused by an OOO appData packet 2025-07-31 09:31:59 -06:00
Anthony Hu
6f66f4fda3 Use correct string in the unit tests. 2025-07-31 10:35:32 -04:00
Koji Takeda
2891815965 Fix errors on #9000 2025-07-31 16:04:22 +09:00
Koji Takeda
09deacbe8f Revert "Merge pull request #9045 from douzzer/20250730-revert-PR9000"
This reverts commit 70af2be5ab, reversing
changes made to 46347173b2.
2025-07-31 14:14:51 +09:00
Daniel Pouzzner
c353052e54 linuxkm/linuxkm_wc_port.h:
* move enum wc_svr_flags out of BUILDING_WOLFSSL guard;
* add DISABLE_VECTOR_REGISTERS() and REENABLE_VECTOR_REGISTERS() definitions for !BUILDING_WOLFSSL;
* add #include <linux/spinlock.h> to !WOLFSSL_LINUXKM_USE_MUTEXES implementation to fix compilation (and add usability) to caller code;

linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_ctx_clear(), fix error-path deallocation of locked object;

wolfcrypt/benchmark/benchmark.c:

* in FIPS v6+ builds, and FIPS linuxkm v5+, check retval from wc_AesEncryptDirect() and wc_AesDecryptDirect();
* add WC_RELAX_LONG_LOOP() in bench_stats_sym_finish() and bench_stats_asym_finish_ex();

wolfcrypt/test/test.c: fix rng_seed_test() with correct test vectors for the relevant combinations of features, and gate the test out if there are user override defines for ENTROPY_SCALE_FACTOR or SEED_BLOCK_SZ.
2025-07-30 22:15:05 -05:00
Hideki Miyazaki
9b7caac3ef Update RZ examples
- Use xSPI0 boot mode
 - Update FSP from v1.3 to v2.0.0
 - Simplify UART
 - Migrate new User Ctx
 - Update README
 - Fix SCE TLS on RA6M4
2025-07-31 11:04:06 +09:00
JacobBarthelmeh
ee4e511a01 remove trailing white spaces 2025-07-30 17:02:23 -06:00
JacobBarthelmeh
70af2be5ab Merge pull request #9045 from douzzer/20250730-revert-PR9000
20250730-revert-PR9000
2025-07-30 16:59:19 -06:00
JacobBarthelmeh
6a01122c47 add static memory doxygen comments for APIs 2025-07-30 14:50:44 -06:00
Daniel Pouzzner
26806cda7b Revert "Support importing seed of ML-DSA key"
This reverts commit a82d1a6b12.
2025-07-30 15:39:57 -05:00
Daniel Pouzzner
f6437d3072 Revert "Add test data"
This reverts commit 778dcbaafb.
2025-07-30 15:39:55 -05:00
Daniel Pouzzner
d0bf9c4b3c Revert "Disable exporting dilithium DER tests without WOLFSSL_ASN_TEMPLATE"
This reverts commit bbcdfe92e0.
2025-07-30 15:39:53 -05:00
Daniel Pouzzner
40646964b4 Revert "Follow copilot review"
This reverts commit 189ba201f3.
2025-07-30 15:39:47 -05:00
JacobBarthelmeh
46347173b2 Merge pull request #9034 from holtrop/allow-pkcs7-without-x963-kdf
Allow building with HAVE_PKCS7 set and HAVE_X963_KDF unset
2025-07-30 10:05:09 -06:00
JacobBarthelmeh
09dd519764 Merge pull request #9043 from holtrop/fix-unit-test-coverity-defect
Fix unit test coverity defect in test_wc_PKCS7_SetAESKeyWrapUnwrapCb()
2025-07-30 09:59:39 -06:00
Josh Holtrop
ccb463dd1d Fix unit test coverity defect in test_wc_PKCS7_SetAESKeyWrapUnwrapCb() 2025-07-30 10:37:28 -04:00
Juliusz Sosinowicz
42e2dd9990 Zero sha->buffer
msan reported it as an uninitialized buffer
2025-07-30 14:16:52 +02:00
JacobBarthelmeh
a1e2ba2cd3 Merge pull request #9036 from kareem-wolfssl/zd20239
Fix size used by signature context struct with WOLFSSL_NO_MALLOC.
2025-07-29 17:13:34 -06:00
Sean Parkinson
d7f85c533b Merge pull request #9038 from JacobBarthelmeh/tcp
remove QEMU test host name lookup feature
2025-07-30 08:40:39 +10:00
JacobBarthelmeh
36912c3af8 Merge pull request #9000 from kojiws/import_mldsa_seed_pkcs8
Import ML-DSA's seed from PKCS8 file
2025-07-29 16:02:36 -06:00
Kareem
f130a9d44d Alias MAX_SIG_SZ to MAX_ENCODED_SIG_SZ for backwards compatibility. 2025-07-29 13:58:35 -07:00
Josh Holtrop
df7e105fb7 Allow building with HAVE_PKCS7 set and HAVE_X963_KDF unset 2025-07-29 11:46:44 -04:00
JacobBarthelmeh
26f4c968df Merge pull request #9032 from holtrop/allow-pkcs7-without-aes-keywrap
Allow building with HAVE_PKCS7 set and HAVE_AES_KEYWRAP unset
2025-07-29 09:44:07 -06:00
JacobBarthelmeh
9aace48189 remove QEMU test host name lookup feature 2025-07-28 17:04:33 -06:00
Koji Takeda
189ba201f3 Follow copilot review 2025-07-29 07:15:32 +09:00
Josh Holtrop
26a4ea93eb Allow building with HAVE_PKCS7 set and HAVE_AES_KEYWRAP unset 2025-07-28 12:40:35 -04:00
Koji Takeda
bbcdfe92e0 Disable exporting dilithium DER tests without WOLFSSL_ASN_TEMPLATE 2025-07-28 21:46:28 +09:00
Koji Takeda
778dcbaafb Add test data 2025-07-28 21:46:28 +09:00
Koji Takeda
a82d1a6b12 Support importing seed of ML-DSA key 2025-07-28 21:46:28 +09:00
philljj
cc2f7927ec Merge pull request #9035 from douzzer/20250725-wc_linuxkm_relax_long_loop
20250725-wc_linuxkm_relax_long_loop
2025-07-26 09:22:00 -05:00
Daniel Pouzzner
b0f6829614 20250725-wc_linuxkm_relax_long_loop: improvements from peer review: fix, clarify, and extend comments, improve indentation, and snip out a stray redundant preprocessor definition. 2025-07-26 08:27:43 -05:00
Kareem
5b888f809f Fix size used by signature context struct. This matches the size used by sigCpy/sigSz when building without WOLFSSL_NO_MALLOC. 2025-07-25 15:50:38 -07:00
Daniel Pouzzner
77dccc0c32 linuxkm:
* add wc_linuxkm_check_for_intr_signals(), wc_linuxkm_relax_long_loop(),
  WC_CHECK_FOR_INTR_SIGNALS(), WC_RELAX_LONG_LOOP(), SAVE_NO_VECTOR_REGISTERS(),
  RESTORE_NO_VECTOR_REGISTERS(), and new error code INTERRUPTED_E ("Process
  interrupted");

* update the no-asm remaps in the PK implementations to use
  SAVE_NO_VECTOR_REGISTERS() and RESTORE_NO_VECTOR_REGISTERS(), so that inner
  loops in them are always covered by the new logic.
2025-07-25 15:56:48 -05:00
Anthony Hu
c7e054a7a7 Rename ML-KEM hybrids to match IETF Draft. 2025-07-25 13:27:26 -04:00
David Garske
c347f75b3c Merge pull request #9029 from holtrop/extract-kari-rid
Add wc_PKCS7_GetEnvelopedDataKariRid()
2025-07-25 09:04:11 -07:00
Josh Holtrop
804c4f20b5 Explicitly initialize some unit test variables to avoid warnings 2025-07-24 18:51:58 -04:00
Josh Holtrop
1226dedeb8 Check that we don't run out of space for the RID structure 2025-07-24 15:52:34 -04:00
Josh Holtrop
71bd9e2f6e Make unit test more resilient to earlier errors 2025-07-24 15:46:01 -04:00
Josh Holtrop
6309b241cd Fix some clang-tidy warnings in unit test 2025-07-24 15:42:55 -04:00
David Garske
a06268f705 Merge pull request #9010 from miyazakh/sce_tlsproperties_uc
Make properties related to Renesas FSP Security Module TLS hidden for FSP SM context
2025-07-24 12:35:56 -07:00
David Garske
2db1669713 Merge pull request #8988 from JacobBarthelmeh/visibility
remove WOLFSSL_API in source code when already used in header file
2025-07-24 11:00:55 -07:00
David Garske
e4a9ffd00e Merge pull request #9031 from danielinux/fix-regression-rsa-verify-only
Fix warning with WOLFSSL_RSA_VERIFY_ONLY
2025-07-24 10:29:02 -07:00
JacobBarthelmeh
c25efcee92 Merge pull request #9028 from dgarske/md5_sha1
Fixes for building with MD5 and SHA1 to support Hash `WC_HASH_TYPE_MD5_SHA`
2025-07-24 10:41:22 -06:00
Josh Holtrop
cf843c8b82 Add wc_PKCS7_GetEnvelopedDataKariRid()
Allow access to recipient ID before attempting to decrypt content.
2025-07-24 11:15:30 -04:00
Daniele Lacamera
09de113145 Fix warning with WOLFSSL_RSA_VERIFY_ONLY
PR #8830 introduces a warning when WOLFSSL_NO_CT_OPS is selected.
However, in WOLFSSL_RSA_VERIFY_ONLY mode this is enforced in
wolfssl/wolfcrypt/settings.h:4035, forcing this warning to appear when
this configuration is used.

This PR takes into account the special case, allowing WOLFSSL_NO_CT_OPS
when WOLFSSL_RSA_VERIFY_ONLY, and removing the warning.
2025-07-24 16:13:00 +02:00
philljj
6750c29e67 Merge pull request #9027 from douzzer/20250723-linuxkm-fixes-and-testing-workflow
20250723-linuxkm-fixes-and-testing-workflow
2025-07-23 22:43:51 -05:00
David Garske
6aabc73845 Merge pull request #9018 from holtrop/decode-skp
Add API to decode SymmetricKeyPackage and OneSymmetricKey CMS objects
2025-07-23 16:01:58 -07:00
David Garske
44eba446ec Merge pull request #9002 from holtrop/aes-key-wrap-callbacks
Add callback functions for custom AES key wrap/unwrap operations
2025-07-23 16:01:49 -07:00
David Garske
551ff3f1b6 Fixes for building with MD5 and SHA1 to support Hash WC_HASH_TYPE_MD5_SHA. ZD 20269. 2025-07-23 15:59:08 -07:00
David Garske
e1b3c43a2b Merge pull request #8987 from gojimmypi/pr-espressif-allocators
Add wolfSSL_GetAllocators PSRAM support for Espressif ESP32
2025-07-23 15:33:53 -07:00
Daniel Pouzzner
5e57ec5c93 linuxkm/Kbuild: if ENABLED_LINUXKM_PIE, disable KASAN and UBSAN, to avoid external references (__ubsan_handle_out_of_bounds() etc.). 2025-07-23 17:30:14 -05:00
David Garske
c261bf4452 Merge pull request #9006 from rlm2002/zd20212
Coverity fixes for Zendesk issue
2025-07-23 15:29:20 -07:00
Daniel Pouzzner
ca6a12769f linuxkm/linuxkm_wc_port.h: additional fixes for version gates;
.github/workflows/linuxkm.yml: add a second scenario with --enable-linuxkm-pie.
2025-07-23 16:57:24 -05:00
Daniel Pouzzner
b7b0ab6dbf src/tls.c: fix double free just added to TLSX_KeyShare_GenPqcKeyClient(). 2025-07-23 16:18:22 -05:00
Daniel Pouzzner
53de4a582e add .github/workflows/linuxkm.yml;
linuxkm/Makefile: add support for FORCE_NO_MODULE_SIG.
2025-07-23 14:43:33 -05:00
Daniel Pouzzner
a447a991b0 linuxkm/Kbuild: add KERNEL_EXTRA_CFLAGS_REMOVE;
linuxkm/linuxkm_wc_port.h: fix version threshold for HAVE_KVREALLOC (6.12.0, not 6.11.0), and add manual overrides.
2025-07-23 14:31:52 -05:00
Daniel Pouzzner
8d7009e9de src/tls.c: in TLSX_KeyShare_GenPqcKeyClient(), add smallstack coverage to !WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ code paths. 2025-07-23 12:02:07 -05:00
Daniel Pouzzner
5360738351 wolfssl/internal.h: don't gate in prototype for sockAddrEqual() if defined(WOLFSSL_NO_SOCK). 2025-07-23 11:17:31 -05:00
Josh Holtrop
2f2f999657 Rework to remove early function returns 2025-07-22 20:35:28 -04:00
Josh Holtrop
0d48911ae4 Update style per code review comments 2025-07-22 20:30:44 -04:00
Josh Holtrop
86d7d42eb6 Comment test ASN DER sequences 2025-07-22 20:29:44 -04:00
Josh Holtrop
7762fa9b14 Update style per code review comments 2025-07-22 20:09:55 -04:00
philljj
65126352a0 Merge pull request #9025 from douzzer/20250721-wolfssl_linuxkm_pie_redirect_table-direct
20250721-wolfssl_linuxkm_pie_redirect_table-direct
2025-07-22 18:08:11 -05:00
Hideki Miyazaki
5e77253577 Addressed code review comments 2025-07-23 07:44:30 +09:00
Daniel Pouzzner
6043274d96 linuxkm/Kbuild: revert change to base PIE_FLAGS -- we need -fno-stack-protector to avoid compiler-generated references to __stack_chk_fail. 2025-07-22 16:45:06 -05:00
David Garske
c7bc6e834e Merge pull request #8996 from lealem47/match_ipv6
Add logic to match IPv6 domain addresses
2025-07-22 13:42:15 -07:00
Josh Holtrop
13fb6b83cd Update style per code review comments 2025-07-22 16:38:13 -04:00
Josh Holtrop
27f0ef8789 Combine AES key wrap/unwrap callbacks 2025-07-22 16:34:37 -04:00
Daniel Pouzzner
c26f6ded14 linuxkm/linuxkm_wc_port.h: use more flexible logic to define WC_LKM_INDIRECT_SYM(), allowing various overrides and orthogonalizing the definitions proper, and add explanatory comments. 2025-07-22 14:40:45 -05:00
Josh Holtrop
7bcb346dd7 Remove early function returns per code review comments 2025-07-22 14:58:26 -04:00
Josh Holtrop
15c8730ef7 Use wc_ prefix for IndexSequenceOf() 2025-07-22 14:50:42 -04:00
Josh Holtrop
77bace5010 Update style per code review comments 2025-07-22 14:47:22 -04:00
gojimmypi
97c2e9f973 Add wolfSSL_GetAllocators PSRAM support for Espressif ESP32 2025-07-22 11:34:47 -07:00
David Garske
357b624ca5 Merge pull request #9024 from JacobBarthelmeh/mldsa
fix mldsa test case for buffer size and expire date
2025-07-22 11:04:41 -07:00
Ruby Martin
29288640ab add additional check so dead code can be reached 2025-07-22 10:48:06 -06:00
David Garske
b0fd0296f3 Merge pull request #9026 from JacobBarthelmeh/readme
fix changelog formatting
2025-07-22 09:34:44 -07:00
Ruby Martin
01fd36b840 set a->length to 0 if old data is not kept 2025-07-22 10:33:12 -06:00
Lealem Amedie
22b01bcda9 Remove unnecessary memset 2025-07-22 10:05:36 -06:00
JacobBarthelmeh
3759c6f1a1 fix changelog formatting 2025-07-22 09:21:26 -06:00
Ruby Martin
828b9b7024 remove mac_alg check, mac_alg is always no_mac on subsequent iterations 2025-07-22 08:49:26 -06:00
Ruby Martin
42b80878d9 str_len check includes any value less than 0 2025-07-22 08:49:26 -06:00
Ruby Martin
dc345553df wrap res assignment in else statement 2025-07-22 08:49:26 -06:00
Josh Holtrop
aa986a2b24 Update doxygen comment style per code review comments 2025-07-22 08:27:00 -04:00
Josh Holtrop
e03fc6858b Update Doxygen comment style per code review comments 2025-07-22 08:24:22 -04:00
Josh Holtrop
525f1cc39e Update style per code review comments 2025-07-22 08:19:01 -04:00
Sean Parkinson
8f00fc2594 Merge pull request #8890 from kareem-wolfssl/zd20022
Allow larger pathLen values in Basic Constraints.
2025-07-22 17:16:27 +10:00
Sean Parkinson
cd7256ae63 Merge pull request #8979 from anhu/abort_on_bad_legacy
Abort TLS connection if legacy version field  is TLS 1.3 or higher
2025-07-22 17:12:39 +10:00
Sean Parkinson
1f72866489 Merge pull request #8993 from miyazakh/tsip_tlsproperties_uc
Make properties related to TLS handshake hidden for TSIP TLS user-context structure
2025-07-22 17:05:44 +10:00
Sean Parkinson
6c847b1870 Merge pull request #9013 from ColtonWilley/fix_cryptocb_rsa_pad_inline
Set out ptr properly for RSA pad crypto cb inline
2025-07-22 16:47:06 +10:00
Sean Parkinson
21f283c143 Merge pull request #9008 from gojimmypi/pr-wolfssl_user_io
Improve WOLFSSL_USER_IO defaults
2025-07-22 16:37:59 +10:00
Sean Parkinson
7417958649 Merge pull request #9015 from philljj/fix_dual_alg_build
dual alg certs: fix dual alg certs build, and asn cleanup.
2025-07-22 16:26:41 +10:00
Sean Parkinson
95768038b9 Merge pull request #9019 from ribes96/word64_literal
wolfcrypt test: Fix build on 32 bit machines
2025-07-22 16:23:02 +10:00
Sean Parkinson
0c4c156893 Merge pull request #9020 from ribes96/oldgcc_uninitialized
Avoid bogus warning on uninitialized variables on old versions of GCC
2025-07-22 16:22:00 +10:00
Sean Parkinson
f034f09bb4 Merge pull request #9021 from ribes96/fix_noshadow_overwrite
Support CFLAGS="-Wno-shadow"
2025-07-22 16:21:07 +10:00
Sean Parkinson
f1175043f3 Merge pull request #9022 from lealem47/check_rsa_u
Check that u value isn't zero in RsaFunctionPrivate
2025-07-22 16:19:12 +10:00
Daniel Pouzzner
0495f2cc20 linuxkm/linuxkm_wc_port.h: add WC_LKM_INDIRECT_SYM() macro; on x86, use wolfssl_linuxkm_pie_redirect_table directly for indirect calls from PIE container, otherwise use wolfssl_linuxkm_get_pie_redirect_table() to avoid e.g. R_AARCH64_LD64_GOT_LO12_NC relocations;
linuxkm/Kbuild: remove -fno-stack-protector from default PIE_FLAGS.
2025-07-21 19:34:00 -05:00
JacobBarthelmeh
98c70fb77e fix mldsa test case for buffer size and expire date 2025-07-21 15:15:31 -06:00
Lealem Amedie
8df20d6966 Check that u value isn't zero in RsaFunctionPrivate 2025-07-21 10:45:43 -06:00
Lealem Amedie
b306e88d1a Guard for WOLFSSL_USER_IO case 2025-07-21 10:06:19 -06:00
Lealem Amedie
f9afdfd8e2 Don't need to initialize with {0} 2025-07-21 10:06:19 -06:00
Lealem Amedie
90bd374c16 Add logic to match IPv6 domain addresses 2025-07-21 10:06:19 -06:00
Albert Ribes
6f8e0f128a Support CFLAGS="-Wno-shadow"
Avoid appending "-Wshadow" in the end of compiler flags if the user
provided CFLAGS="-Wno-shadow"
2025-07-21 12:34:39 +02:00
Albert Ribes
b2463f167c Avoid bogus warning on uninitialized variables on old versions of GCC
gcc-4.3.3 erroneously complains that some variables may be used
uninitialized. Silence it assigning NULL on declaration, as is already
done with many other variables.
2025-07-21 10:57:50 +02:00
Albert Ribes
2e25c65129 wolfcrypt test: Fix build on 32 bit machines
Declare a 64 bit variable using W64LIT to avoid warnings on 32 bit
machines
2025-07-21 10:34:19 +02:00
Josh Holtrop
06d86af67c Add API to decode SymmetricKeyPackage and OneSymmetricKey CMS objects 2025-07-19 18:28:06 -04:00
jordan
8e46687223 dual alg certs: add missing WC_ENABLE_ASYM_KEY_IMPORT guard. 2025-07-18 09:30:17 -05:00
Hideki Miyazaki
7a03b9fea6 fix trailing whitespaces 2025-07-18 07:54:45 +09:00
Hideki Miyazaki
70587dd2d5 Addressed code review by devin 2025-07-18 07:51:04 +09:00
David Garske
decea12e22 Merge pull request #9012 from JacobBarthelmeh/release
prepare for release 5.8.2
2025-07-17 14:59:24 -07:00
jordan
e571988059 dual alg certs: fix dual alg certs build, and asn cleanup. 2025-07-17 15:15:11 -05:00
Colton Willey
f3ee192a96 Set out ptr properly for RSA pad crypto cb inline 2025-07-17 12:01:39 -07:00
JacobBarthelmeh
c34e6ab8d9 prepare for release 5.8.2 2025-07-17 10:26:19 -06:00
JacobBarthelmeh
fa1842e56d Merge pull request #9011 from douzzer/20250717-linuxkm-include-am
20250717-linuxkm-include-am
2025-07-17 08:56:40 -06:00
Daniel Pouzzner
c8a9e9ea12 linuxkm/include.am: add linuxkm/wolfcrypt.lds to EXTRA_DIST. 2025-07-17 08:40:55 -05:00
Hideki Miyazaki
ba358b8fb8 Sanity check before free 2025-07-17 18:51:57 +09:00
Hideki Miyazaki
59659ef8fb fix long line and trailing whitespaces 2025-07-17 18:26:55 +09:00
Hideki Miyazaki
cc123d7c3a Make properties related to SCE TLS hidden
- Fix RSA Crypt callback
 - Eliminate WOLFSSL_LOCAL
2025-07-17 18:16:40 +09:00
philljj
8bde512676 Merge pull request #9007 from douzzer/20250715-linuxkm-portability-fixes
20250715-linuxkm-portability-fixes
2025-07-16 21:02:55 -05:00
gojimmypi
a08b93347f Revised sockets for USE_WOLFSSL_IO, USE_WOLFSSL_IO 2025-07-16 15:18:14 -07:00
Daniel Pouzzner
8d1289c1d7 linuxkm/Kbuild: --rename-section .rodata.cst16=.rodata.wolfcrypt 2025-07-16 16:54:20 -05:00
gojimmypi
66650a95d8 Improve WOLFSSL_USER_IO defaults 2025-07-16 12:04:05 -07:00
Daniel Pouzzner
01313cc0c8 linuxkm/x86_vector_register_glue.c:
* refactor the save_vector_registers_x86() algorithm to depend directly on preempt_count(), and use local_bh_enable() and preempt_disable() directly, to mitigate glitchiness around irq_fpu_usable() and crypto_simd_usable();

* eliminate the WC_FPU_ALREADY_FLAG kludge.

* improve the error and warning messages, and add some additional checks and messages for unexpected states; add VRG_PR_ERR_X and VRG_PR_WARN_X for pr_*_once() semantics on regular builds, but unlimited messages when WOLFSSL_LINUXKM_VERBOSE_DEBUG.

linuxkm/linuxkm_wc_port.h and linuxkm/module_hooks.c:

* move the spinlock-based implementation of wc_LockMutex() from linuxkm_wc_port.h to module_hooks.c, due to numerous stuboorn direct external symbol references;

* extensively refactor the kernel header #include strategy, keeping many more superfluous headers out of __PIE__ objects, and fixing unavoidable static header functions with grafted __always_inline attributes;

* add version exceptions for RHEL 9.5.

linuxkm/Kbuild:

* on x86 with CONFIG_MITIGATION_{RETPOLINE,RETHUNK}, use inline rethunks rather than none;

* refactor check for "Error: section(s) missed by containerization." using `readelf --sections --syms`, for 100% coverage, more informative error output, and suppression of false positives on printk-related cruft;

configure.ac and linuxkm/lkcapi_sha_glue.c: use LINUXKM_LKCAPI_[DONT_]REGISTER_{SHA,HMAC}_ALL to represent --enable-linuxkm-lkcapi-register=[-]all-{sha,hmac}, which allows alg families (notably SHA1) to be masked out piecemeal;

linuxkm/lkcapi_rsa_glue.c: in linuxkm_test_pkcs1pad_driver(), mitigate unused args when LINUXKM_AKCIPHER_NO_SIGNVERIFY.
2025-07-16 13:09:03 -05:00
JacobBarthelmeh
2c90d1585a Merge pull request #8897 from anhu/compat_additions
Compatibility layer additions for X.509 extensions and RSA PSS
2025-07-15 10:52:33 -06:00
Anthony Hu
c341a9fc05 FIPS > 2 2025-07-15 07:59:20 -04:00
JacobBarthelmeh
e06f1bbf02 Merge pull request #9005 from douzzer/20250714-linuxkm-MODULE_LICENSE
20250714-linuxkm-MODULE_LICENSE
2025-07-14 17:23:22 -06:00
JacobBarthelmeh
9430c8a5a1 Merge pull request #9003 from embhorn/cov_531298
Fix blake2b_final coverity reports
2025-07-14 16:20:19 -06:00
Daniel Pouzzner
049e88b525 linuxkm/module_hooks.c: use MODULE_LICENSE("GPL"). 2025-07-14 16:30:13 -05:00
Josh Holtrop
af3296a836 wc_PKCS7_KeyWrap(): mark pointers as to const and check for NULL 2025-07-14 17:28:23 -04:00
Daniel Pouzzner
2c341a5806 Merge pull request #8990 from JacobBarthelmeh/license
updating license from GPLv2 to GPLv3

(linuxkm tweak to `MODULE_LICENSE("GPL")` to follow.)
2025-07-14 16:14:39 -05:00
JacobBarthelmeh
91321fccec Merge pull request #8992 from douzzer/20250710-WC_ASN_RUNTIME_DATE_CHECK_CONTROL
20250710-WC_ASN_RUNTIME_DATE_CHECK_CONTROL
2025-07-14 15:08:35 -06:00
Eric Blankenhorn
9c2ea12563 Fix blake2 final coverity issue 2025-07-14 15:04:15 -05:00
Josh Holtrop
429ccd5456 Add callback functions for custom AES key wrap/unwrap operations 2025-07-14 15:58:14 -04:00
Eric Blankenhorn
efdca85aec Fix blake2 final coverity issue 2025-07-14 14:53:37 -05:00
philljj
1f71e6d246 Merge pull request #8998 from douzzer/20250712-linuxkm-all-aes-sha-hmac
20250712-linuxkm-all-aes-sha-hmac
2025-07-14 14:19:09 -05:00
philljj
bbc5dc528b Merge pull request #9001 from douzzer/20250714-linuxkm-fix-page-flags-h
20250714-linuxkm-fix-page-flags-h
2025-07-14 12:59:26 -05:00
Daniel Pouzzner
80c9212dd9 linuxkm/linuxkm_wc_port.h, linuxkm/lkcapi_aes_glue.c, configure.ac: fix LKCAPI on kernel 5.4 (sunrise version for LKCAPI), and add all-aes, all-sha, all-hmac, and their negations, to --enable-linuxkm-lkcapi-register. 2025-07-14 12:39:41 -05:00
Daniel Pouzzner
ee3b459e16 linuxkm/linuxkm_wc_port.h: refactor the fix for folio_flags()/const_folio_flags() text segment spam -- inhibiting inclusion of linux/page-flags.h breaks on some kernel configs. 2025-07-14 10:27:35 -05:00
JacobBarthelmeh
99d26f0347 Merge pull request #8977 from BridgerVoss/new_settings
FREESCALE forced algorithm HAVE_ECC moved to IDE/MQX/user_settings.h
2025-07-14 09:05:56 -06:00
Hideki Miyazaki
ec252a73e2 fix whitespace and long line 2025-07-12 10:26:28 +09:00
Hideki Miyazaki
eb8a3afe38 Addressed code review comments 2025-07-12 09:49:09 +09:00
Anthony Hu
dc3209b797 Add macro to .wolfssl_known_macro_extras 2025-07-11 14:59:43 -04:00
Kareem
9fa1d2e75f Enforce WOLFSSL_MAX_PATH_LEN for ASN original as well. 2025-07-11 11:53:33 -07:00
Anthony Hu
1a0a3283a0 Add a test. 2025-07-11 14:32:47 -04:00
philljj
607d5d798b Merge pull request #8994 from douzzer/20250711-linuxkm-distro-fix
20250711-linuxkm-distro-fix
2025-07-11 13:01:51 -05:00
Daniel Pouzzner
d90394efa6 wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: add
WC_ASN_RUNTIME_DATE_CHECK_CONTROL, with accessors wc_AsnSetSkipDateCheck()
(WOLFSSL_TEST_VIS) and wc_AsnGetSkipDateCheck() (WOLFSSL_LOCAL).  use this to
permafix test_wolfSSL_CRL_duplicate_extensions() in api.c, which has an
expiring-soon handcrafted certificate in it.
2025-07-11 11:25:25 -05:00
David Garske
70bdd9f990 Merge pull request #8989 from rlm2002/zd20212
xmemset rng before test runs
2025-07-11 08:58:30 -07:00
David Garske
a36f9085c1 Fix for compat wolfSSL_RSA_sign and wolfSSL_RSA_verify to support RSA PSS with custom salt and mgf1 hash type. Adds compat API's for i2d_PrivateKey_bio , BN_ucmp and X509v3_get_ext_by_NID. ZD 20059 2025-07-11 08:51:51 -07:00
Daniel Pouzzner
0001bf7983 linuxkm/patches/: in regen-patches.sh, structure the pathnames to mollify kernel scripts/checkpatch.pl;
tweak WOLFSSL_LINUXKM_HAVE_GET_RANDOM_CALLBACKS-6v15.patch (mostly whitespace) to mollify scripts/checkpatch.pl.
2025-07-11 10:42:43 -05:00
Daniel Pouzzner
1e3966f06d linuxkm/include.am: add kernel patches to EXTRA_DIST. 2025-07-11 10:42:43 -05:00
Hideki Miyazaki
c4a178f029 Remove trailing whitespace 2025-07-11 22:12:49 +09:00
Hideki Miyazaki
e9def03585 Null check before accessing instance 2025-07-11 17:48:36 +09:00
Hideki Miyazaki
0a0b9a3c24 Make properties related to TLS handshake hidden for TSIP TLS user context structure 2025-07-11 14:25:06 +09:00
JacobBarthelmeh
388eea3cf2 Merge pull request #8976 from holtrop/decode-encrypted-key-package
Add wc_PKCS7_DecodeEncryptedKeyPackage()
2025-07-10 17:08:06 -06:00
JacobBarthelmeh
01cd91cbea removing more locations of WOLFSSL_API used with function implementations 2025-07-10 16:44:28 -06:00
Sean Parkinson
046e46a67f Merge pull request #8825 from kareem-wolfssl/zd19911
Fix parsing RPK with no parameters.
2025-07-11 08:36:55 +10:00
David Garske
8d68977e33 Merge pull request #8985 from sebastian-carpenter/GH-issue-8951
improper access of sp_int_minimal using sp_int
2025-07-10 15:21:20 -07:00
Ruby Martin
e65647faa8 xmemset rng before test runs 2025-07-10 16:17:53 -06:00
David Garske
4d4228caa1 Merge pull request #8815 from kareem-wolfssl/zd19929
Fix wolfSSL_BIO_new_connect's handling of IPV6 addresses.
2025-07-10 15:17:39 -07:00
JacobBarthelmeh
629c5b4cf6 updating license from GPLv2 to GPLv3 2025-07-10 16:11:36 -06:00
Kareem
362f0a2cfd Ensure only one of the RPK algorithm parameters are set. 2025-07-10 12:43:14 -07:00
JacobBarthelmeh
13b8a972ea remove WOLFSSL_API in source code when already used in header file for function decleration 2025-07-10 13:40:27 -06:00
Josh Holtrop
3ce8c6e4fa Remove WOLFSSL_API for wc_PKCS7_DecodeEncryptedKeyPackage() in source file 2025-07-10 15:29:31 -04:00
Josh Holtrop
f776c95e54 Remove do/while(0) loop in wc_PKCS7_DecodeEncryptedKeyPackage(); use if-else if chain 2025-07-10 15:25:57 -04:00
Kareem
f942990113 Fix building unit tests with --enable-rpk --disable-rsa.
Exact configure line used:
 ./configure --enable-kyber --enable-mlkem --enable-dilithium --enable-dtls --enable-dtls13 --enable-dtls-frag-ch --enable-debug --enable-debug-trace-errcodes \
CFLAGS="-DHAVE_RPK -DWOLFSSL_DER_LOAD -DWOLFSSL_LOGGINGENABLED_DEFAULT=1" --disable-rsa
2025-07-10 12:03:18 -07:00
Kareem
2df674bd59 Correct RPK parsing. As per RFC7250 section 3, the algorithm parameters are optional. 2025-07-10 12:03:18 -07:00
David Garske
047d1bd69f Merge pull request #8986 from kareem-wolfssl/pskYml
Fix missing comma in psk.yml
2025-07-10 11:50:08 -07:00
Kareem
bfacbf9764 Update ASN original to also allow larger pathLen values in Basic Constraints. 2025-07-10 11:47:47 -07:00
philljj
c7ff47d5ee Merge pull request #8984 from douzzer/20250710-linuxkm-crng-fixes
20250710-linuxkm-crng-fixes
2025-07-10 13:32:17 -05:00
Kareem
aa3a325add Fix missing comma in psk.yml 2025-07-10 10:52:11 -07:00
Kareem
f0459eb1cf Allow larger pathLen values in Basic Constraints. 2025-07-10 10:37:06 -07:00
Kareem
c9d451e857 Fix wolfSSL_BIO_new_connect's handling of IPV6 addresses. 2025-07-10 10:33:46 -07:00
Sebastian Carpenter
a00cfcb55f improper access of sp_int_minimal using sp_int
related thread: https://bugzilla.redhat.com/show_bug.cgi?id=2047439

also found sp_uint8 that was not updated to sp_sign_t
2025-07-10 10:42:30 -06:00
Daniel Pouzzner
b4137fe2f8 linuxkm/lkcapi_sha_glue.c: add interruptibility and additional relaxation where possible, and fix a leaked lock scenario, in get_drbg_n(), wc_linuxkm_drbg_seed(), wc_mix_pool_bytes(), and wc_crng_reseed();
wolfcrypt/src/asn.c: add a couple static attributes missed on the previous round of fixups.
2025-07-10 10:59:57 -05:00
philljj
ed6d189f1a Merge pull request #8980 from douzzer/20250706-linuxkm-fixes
20250706-linuxkm-fixes
2025-07-10 10:34:59 -05:00
Anthony Hu
4bd2835cf1 Change suggested by SparkiDev 2025-07-10 10:40:12 -04:00
Daniel Pouzzner
ae48ee408e Merge pull request #8983 from philljj/linuxkm_make_rsa_again
Linuxkm make rsa again
2025-07-10 09:29:29 -05:00
Josh Holtrop
6d51b73626 Shorten some wc_PKCS7_DecodeEncryptedKeyPackage() comment lines to less than 80 characters 2025-07-10 08:10:59 -04:00
Josh Holtrop
3f65846e67 Document BAD_FUNC_ARG return value for wc_PKCS7_DecodeEncryptedKeyPackage() 2025-07-10 08:07:32 -04:00
Sean Parkinson
783ab14afb Merge pull request #8982 from dgarske/x509_ref
Fix possible memory leak with X509 reference counter when using x509small
2025-07-10 20:37:57 +10:00
Daniel Pouzzner
f49e583721 linuxkm/Kbuild: skip "section(s) missed by containerization" test unless KERNEL_ARCH_X86;
linuxkm/linuxkm_wc_port.h: fixes for legacy kernels, particularly: when building TLS stack (!WOLFCRYPT_ONLY), use the best heap with a functioning realloc(), else use kvmalloc() and friends if available, even if kvrealloc() is unavailable.  also, provide for XMALLOC_USER and XMALLOC_OVERRIDE;

linuxkm/lkcapi_glue.c: recognize the new CONFIG_CRYPTO_SELFTESTS_FULL alongside the old CONFIG_CRYPTO_MANAGER_EXTRA_TESTS;

linuxkm/linuxkm_memory.c: restore my__show_free_areas() in case it's still needed.
2025-07-10 00:57:51 -05:00
jordan
e73fa74f14 linuxkm: misc cleanup. 2025-07-09 21:43:02 -05:00
jordan
0aacffd6a2 linuxkm rsa: retry wc_MakeRsaKey if not prime. 2025-07-09 20:55:50 -05:00
David Garske
b2143a815f Merge pull request #8965 from SparkiDev/ppc32_sha256_spe
PPC32 ARM ASM SHA-256: SPE impl, tidy up original
2025-07-09 17:00:26 -07:00
David Garske
2b07b9143b Fix issue with X509 reference counter with --enable-opensslextra=x509small or OPENSSL_EXTRA_X509_SMALL. Thank you Mohre. 2025-07-09 16:51:48 -07:00
Sean Parkinson
98adb330ef Merge pull request #8981 from dgarske/mldsa
Fix build issue with ML-DSA 44 only
2025-07-10 09:41:36 +10:00
David Garske
7ba6f836c4 Merge pull request #8972 from SparkiDev/sp_int_8_bit_fix
SP int: fix 8 bit words and sp_clamp_ct
2025-07-09 16:30:33 -07:00
David Garske
c3518e473b Merge pull request #8971 from SparkiDev/psk_build_fix
API test ASN: must not have NO_ASN defined
2025-07-09 16:30:22 -07:00
David Garske
b0a5d2fdf0 Merge pull request #8969 from SparkiDev/alpn_gcc_Os_fix
ALPN: don't use BIO
2025-07-09 16:30:12 -07:00
David Garske
cf35abccb8 Merge pull request #8963 from SparkiDev/sp_int_type_fix
CodeQL: o is larger type and could cause issues
2025-07-09 16:30:01 -07:00
David Garske
ae19c55182 Merge pull request #8966 from SparkiDev/arm32_aes_asm_fixup_bne
ARM 32-bit ASM AES: fixup 32-bit code to not use B.EQ
2025-07-09 16:29:46 -07:00
Daniel Pouzzner
01e8815762 wolfssl/wolfcrypt/settings.h: add #define WOLFSSL_NO_PUBLIC_FFDHE and #undef HAVE_PUBLIC_FFDHE to WOLFSSL_LINUXKM setup to avoid .data.rel.ro.local functions in dh.c;
linuxkm/linuxkm_wc_port.h: only use kvrealloc() on kernel >=6.11 -- the version in 5.15-6.10 is incompatible (oldsize arg).  also, restore use of kvmalloc on 4.12+, but with XREALLOC undefined, suitable for cryptonly modules; add #include <linux/sched.h> even on __PIE__ objects to make cond_sched() available;

wolfcrypt/src/asn.c: harmonize gate around definitions of BEGIN_DSA_PRIV and END_DSA_PRIV;

wolfcrypt/src/asn.c: in EccSpecifiedECDomainDecode(), work around "const char[]" types in WOLFSSL_ECC_CURVE_STATIC struct ecc_set_type on FIPS <6;

wolfcrypt/src/asn.c, wolfcrypt/src/wc_xmss.c, wolfssl/wolfcrypt/wc_lms.h: add comments to new WOLFSSL_NAMES_STATIC slots explaining where the size comes from.
2025-07-09 18:22:18 -05:00
Daniel Pouzzner
7c6afeb106 add linuxkm/wolfcrypt.lds module linker script, explicitly grouping wolfcrypt sections together;
linuxkm/Kbuild: add linker script flag, containerize several more previously-missed ELF sections, and add a test verifying no sections were missed;

linuxkm/linuxkm_memory.c: remove obsolete lkm_realloc() shim and unneeded my__show_free_areas() wrapper;

linuxkm/linuxkm_wc_port.h: add new mapping from realloc() to native kvrealloc(), and gate out a slew of headers when __PIE__ to avoid polluting wolfCrypt objects with various unneeded header-implemented functions with associated awkward symbols references;

linuxkm/lkcapi_glue.c: harmonize gate for REGISTER_ALG_OPTIONAL();

linuxkm/module_hooks.c: add "ERROR:" prefixes on pr_err()s; add wc_RunAllCast_fips() at shutdown to send confidence verification to the kernel log; remove section bounds checks now that layout is unreliable;

wolfssl/wolfcrypt/settings.h: for WOLFSSL_LINUXKM && HAVE_LINUXKM_PIE_SUPPORT, #define WOLFSSL_ECC_CURVE_STATIC and WOLFSSL_NAMES_STATIC;

wolfssl/wolfcrypt/types.h: refactor the typedef for wcchar from a pointer to a char[];

wolfcrypt/src/wc_xmss.c and wolfssl/wolfcrypt/wc_lms.h: add WOLFSSL_NAMES_STATIC code paths for struct wc_XmssString and struct wc_LmsParamsMap;

wolfcrypt/src/asn.c: add WOLFSSL_NAMES_STATIC code paths for struct CertNameData, and add static attribute to a slew of wcchars not used or declared outside asn.c.
2025-07-09 18:22:18 -05:00
Daniel Pouzzner
f733ade6a2 linuxkm/{linuxkm_wc_port.h,module_hooks.c}: add feature gates around wolfCrypt_FIPS_*_sanity() references matching those in fips_test.c. 2025-07-09 18:22:18 -05:00
David Garske
3f83ed2815 Merge pull request #8960 from ribes96/certwrite-custext
When creating a Cert from a WOLFSSL_X509, account for custom extensions
2025-07-09 16:13:07 -07:00
David Garske
3c00e26274 Merge pull request #8974 from rlm2002/coverity_fix
Coverity: Check values
2025-07-09 16:12:42 -07:00
David Garske
5d89ca6706 Fix build issue with ML-DSA 44 only. Fix --enable-mlkem=all to enable features (keygen/enc/dec) to match --enable-dilithium behavior and allow uses like: --enable-mlkem=all,512,small. Fix issue building mem track with missing PRINT_HEAP_ADDRESS (reproduced with --enable-trackmemory=verbose --enable-stacksize=verbose).
```
wolfcrypt/src/dilithium.c:6696:21: error: expected expression before '}' token
 6696 |                     }
      |
```
2025-07-09 15:06:41 -07:00
David Garske
e37082e496 Merge pull request #8978 from gojimmypi/pr-init-var
Initialize Dilithium keyTypeTemp and keySizeTemp
2025-07-09 15:03:22 -07:00
Bridger Voss
97b3364720 FREESCALE forced algs moved to IDE/MQX/user_settings.h 2025-07-09 15:04:06 -06:00
Josh Holtrop
c83a452a3c Check for NULL pkiMsg in wc_PKCS7_DecodeEncryptedKeyPackage() 2025-07-09 14:41:58 -04:00
Josh Holtrop
d2ab6edbab Add wc_PKCS7_DecodeEncryptedKeyPackage() 2025-07-09 13:38:11 -04:00
Anthony Hu
57e2ae5a21 Abort TLS connection if legacy version field indicates TLS 1.3 or higher. 2025-07-09 12:45:04 -04:00
gojimmypi
ebeb95e47b Initialize Dilithium keyTypeTemp and keySizeTemp 2025-07-09 09:13:14 -07:00
Ruby Martin
6de2557748 check buflen is less than BLAKE2B_BLOCKBYTES * 2 2025-07-09 10:00:28 -06:00
Ruby Martin
7b7c658668 add null check to wc_Des_CbcEncrypt 2025-07-09 09:59:46 -06:00
David Garske
703bd6d0ba Merge pull request #8975 from JeremiahM37/mldsa_static_mem
ML-DSA Static Memory Fix
2025-07-09 08:22:51 -07:00
David Garske
0407ea131b Merge pull request #8970 from miyazakh/qt_jenkins_encryptedKey4PBKDF1
Fix Qt nightly Jenkins failure
2025-07-09 08:04:48 -07:00
Ruby Martin
f62d0fa256 check sigAlgs.size against WOLFSSL_MAX_SIGALGO 2025-07-09 08:57:44 -06:00
Sean Parkinson
d6a72e2480 PPC32 ARM ASM SHA-256: SPE impl, tidy up original
Implement using SPE instructions that allow for 64-bit registers as a
vector of 2 32-bit values.
Tidy up original implementation to not use stack.
2025-07-09 18:34:33 +10:00
JeremiahM37
88da86e900 ML DSA Static Memory Fix 2025-07-08 17:51:42 -06:00
David Garske
f44178ca1b Merge pull request #8973 from embhorn/zd20192
Fix curl config to set HAVE_EX_DATA and HAVE_ALPN
2025-07-08 15:48:28 -07:00
Sean Parkinson
08ec3642f0 Merge pull request #8931 from julek-wolfssl/MAX_ENCODED_SIG_SZ-detected
Detect correct `MAX_ENCODED_SIG_SZ` based on max support in math lib
2025-07-08 09:38:52 +10:00
Sean Parkinson
9b92b4c902 Merge pull request #8962 from rlm2002/coverity
Coverity: Dereference after NULL check and Use after free
2025-07-08 08:30:35 +10:00
Eric Blankenhorn
0d14ec3547 Fix curl Cmake config to set HAVE_EX_DATA and HAVE_ALPN 2025-07-07 17:15:11 -05:00
Eric Blankenhorn
de00bf259d Fix curl config to set HAVE_EX_DATA and HAVE_ALPN 2025-07-07 15:00:14 -05:00
Ruby Martin
de59e9d25e change to BIO_free_all() on EXPECT_FAIL() 2025-07-07 09:17:29 -06:00
Ruby Martin
61e4142fe0 add null check for ssl before use in wc_DhGenerateKeyPair 2025-07-07 09:17:29 -06:00
Ruby Martin
65f9cdb498 free p2 before reassigning to reEncoded value 2025-07-07 09:17:29 -06:00
Juliusz Sosinowicz
51c9448aa1 Detect correct MAX_ENCODED_SIG_SZ based on max support in math lib 2025-07-07 16:42:33 +02:00
Sean Parkinson
f0041cd761 SP int: fix 8 bit words and sp_clamp_ct
Need to cast to sp_size_t as it may be bigger than the word type
sp_int_digit.
2025-07-07 18:43:29 +10:00
Sean Parkinson
e649e1047f API test ASN: must not have NO_ASN defined
Add testing of PSK only to workflows.
2025-07-07 16:24:10 +10:00
Hideki Miyazaki
ee8be22a3f Fix Qt nightly jenkins failure
PBKDF1 encrpted key
2025-07-07 15:10:41 +09:00
Sean Parkinson
70e53d1a34 ALPN: don't use BIO
Fix wolfSSL_set_alpn_protos to not use BIO.
When compiling with -Os and newer gcc, the compiler gets confused with
the void* cast in the wolfSSL_BIO_get_mem_data call.
2025-07-07 12:59:42 +10:00
Daniel Pouzzner
a40b56ccb5 Merge pull request #8964 from douzzer/20250703-linuxkm-fixes
20250703-linuxkm-fixes

Note, final commit reviewed by @SparkiDev, and earlier commit reviewed by @philljj.
2025-07-04 08:45:55 -05:00
Daniel Pouzzner
ef3a1a28d9 linuxkm/linuxkm_wc_port.h, linuxkm/module_hooks.c, and wolfcrypt/src/wc_port.c: fixes for spinlocks on CONFIG_ARM64;
wolfcrypt/src/wc_port.c: include random.h, for Entropy_Init().
2025-07-03 22:09:34 -05:00
Sean Parkinson
d1893dbdec ARM 32-bit ASM AES: fixup 32-bit code to not use B.EQ
Changes made for Green Hills Aarch64 got into the 32-bit code.
2025-07-04 11:37:06 +10:00
Daniel Pouzzner
688bc168de wolfcrypt/src/random.c: small stack refactor of noise[] in wc_Entropy_Get(). 2025-07-03 18:30:46 -05:00
David Garske
fb691fac94 Merge pull request #8947 from SparkiDev/mldsa_openssl_der
ML-DSA/Dilithium: support OpenSSL format
2025-07-03 16:10:55 -07:00
Sean Parkinson
41eef2ef71 CodeQL: o is larger type and could cause issues
Make 'o' sp_size_t as the callers are passing 0 or explicit cast to
sp_size_t
2025-07-04 09:04:39 +10:00
Daniel Pouzzner
478bfafea3 linuxkm/lkcapi_sha_glue.c:
* add wc_linuxkm_drbg_ctx.n_rngs, and in wc_linuxkm_drbg_init_tfm(), set it to max(4, nr_cpu_ids), to avoid stalling on unicore targets;

* add explanatory comments re architecture to get_drbg() and get_drbg_n();

* add opportunistic cond_sched() to get_drbg_n();

* add runtime asserts in get_drbg(), wc_linuxkm_drbg_seed(), and get_default_drbg_ctx(), checking that we have the right tfm with an allocated DRBG array;

* wc_linuxkm_drbg_startup(): return failure if registering the random_bytes handlers fails;

linuxkm/patches/6.1.73/WOLFSSL_LINUXKM_HAVE_GET_RANDOM_CALLBACKS-6v1v73.patch: fix flub.
2025-07-03 17:35:37 -05:00
David Garske
d8caa8493f Merge pull request #8959 from SparkiDev/disable_pk_algs
Testing disabling various PK algs
2025-07-03 15:20:57 -07:00
Sean Parkinson
519d1430d0 ML-DSA/Dilithium: support OpenSSL format
Support DER private key format.
2025-07-04 07:54:26 +10:00
David Garske
3fe84bf3c0 Merge pull request #8961 from douzzer/20250703-fixes-for-multi-test-reports
20250703-fixes-for-multi-test-reports
2025-07-03 11:07:46 -07:00
Albert Ribes
5615993f48 Add missing option checks 2025-07-03 19:01:50 +02:00
JacobBarthelmeh
01de7cc04b Merge pull request #8955 from anhu/signed
Explicitly declare dilithium_coeff_eta2[] as signed
2025-07-03 10:25:46 -06:00
JacobBarthelmeh
7abaa131d3 Merge pull request #8954 from dgarske/asm_introspection
Added introspection for Intel and ARM assembly speedups
2025-07-03 10:22:19 -06:00
philljj
c0837cb073 Merge pull request #8943 from douzzer/20250617-linuxkm-get_random_bytes
20250617-linuxkm-get_random_bytes
2025-07-03 11:22:08 -05:00
Albert Ribes
2ddd98927f When creating a Cert from a WOLFSSL_X509, account for custom extensions
Function 'CertFromX509' is used to convert a WOLFSSL_X509 to a Cert
structure for writing out. It didn't copy custom extensions.
2025-07-03 17:28:57 +02:00
Daniel Pouzzner
1d1a87b0a2 wolfssl/wolfcrypt/tfm.h: fix arg names in fp_to_unsigned_bin_len_ct() prototype to match tfm.c (fixes readability-inconsistent-declaration-parameter-name in clang-tidy-fips-140-3-defaults etc.). 2025-07-03 10:21:30 -05:00
Daniel Pouzzner
bdd2056645 wolfcrypt/test/test.c: fix gate in dh_test() (fixes disable-sha256). 2025-07-03 10:19:07 -05:00
Daniel Pouzzner
a1fa897572 wolfcrypt/src/dilithium.c: fix cast flubs in dilithium_encode_gamma1_19_bits() (fixes quantum-safe-wolfssl-all-gcc-latest-m32). 2025-07-03 10:17:51 -05:00
Sean Parkinson
c925ba2fe1 Testing disabling various PK algs
Fix api.c: disable test_EccSigFailure_cm and test_RsaSigFailure_cm when
the PK algorithm they use is disabled.
2025-07-03 16:38:54 +10:00
David Garske
6be8a3710d Merge pull request #8937 from miyazakh/tsip_cryptcb_ut
Fix TSIP port using crypto callback
2025-07-02 17:42:51 -07:00
Hideki Miyazaki
b60a05f45e Fix TSIP port using crypto callback
- Add unit test using cb
2025-07-03 08:23:24 +09:00
JacobBarthelmeh
c48dd28741 Merge pull request #8957 from dgarske/bench_help
Fix issue with benchmark help options and descriptions not lining up
2025-07-02 17:17:42 -06:00
David Garske
7f50cd537e Merge pull request #8956 from gojimmypi/pr-workflow-owner
Remove duplicate repository_owner check
2025-07-02 15:01:29 -07:00
David Garske
59061aebec Fix issue with benchmark help options and descriptions not lining up due to new -aead_set_key added in #8160 on April 14, 2025. 2025-07-02 14:58:11 -07:00
Daniel Pouzzner
dd69d56e33 linuxkm/linuxkm_wc_port.h: in malloc/realloc, use GFP_KERNEL if it's safe to sleep;
linuxkm/lkcapi_sha_glue.c:

* in wc_linuxkm_drbg_init_tfm(), sleep if it's safe, and observe a wc_linuxkm_drbg_init_tfm_disable_vector_registers flag;

* in wc_crng_reseed(), preemptively execute the reseed if it's safe to sleep;

* in wc_linuxkm_drbg_startup(), in LINUXKM_DRBG_GET_RANDOM_BYTES section, add reseed test sequence if defined(DEBUG_DRBG_RESEEDS).
2025-07-02 16:46:27 -05:00
gojimmypi
adc3f1b3d7 Remove duplicate repository_owner check 2025-07-02 14:32:21 -07:00
Anthony Hu
f7ea8fca67 Explicitly declare dilithium_coeff_eta2[] as signed 2025-07-02 15:50:51 -04:00
Daniel Pouzzner
0160af0a0d linuxkm/patches/: update patches to reseed the wolfCrypt DRBG array only on explicit RNDRESEEDCRNG ioctl;
linuxkm/lkcapi_sha_glue.c: add error msg in wc_linuxkm_drbg_generate() if wc_InitRng() fails, and add "libwolfssl: " prefixes in pr_info() messages.
2025-07-02 14:25:05 -05:00
Daniel Pouzzner
d2083db6de wolfssl/wolfcrypt/settings.h: in WOLFSSL_LINUXKM && LINUXKM_LKCAPI_REGISTER setup for default WC_RESEED_INTERVAL, ignore WORD64_AVAILABLE because it isn't available at this stage of inclusion. 2025-07-02 14:25:05 -05:00
Daniel Pouzzner
6275f1f7e6 linuxkm/lkcapi_rsa_glue.c: update version threshold for the v6.16 change in crypto_sig_*size() semantics, now backported to 6.15.3. 2025-07-02 14:25:05 -05:00
Daniel Pouzzner
f0662e0578 wolfssl/wolfcrypt/settings.h: remove implicit define of WOLFSSL_NO_WORD64_OPS if !WOLFSSL_SHA384 && !WOLFSSL_SHA512 && NO_AES && !WOLFSSL_SHA3 (not compatible with word64 DRBG_internal.reseedCtr). 2025-07-02 14:25:05 -05:00
Daniel Pouzzner
dc05c4c01b wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h: refactor DRBG_internal.reseedCtr as a word64 if WORD64_AVAILABLE, to accommodate max reseed count per NIST SP 800-90A Rev. 1;
wolfssl/wolfcrypt/settings.h: if WOLFSSL_LINUXKM && LINUXKM_LKCAPI_REGISTER && WORD64_AVAILABLE, set default WC_RESEED_INTERVAL to max allowed (2^48);

linuxkm/lkcapi_sha_glue.c: handle NO_LINUXKM_DRBG_GET_RANDOM_BYTES, for build-time override control of LINUXKM_DRBG_GET_RANDOM_BYTES, and handle WOLFSSL_LINUXKM_USE_GET_RANDOM_USER_KRETPROBE, for separate opt-in control of the buggy wc_get_random_bytes_user_kretprobe_enter().
2025-07-02 14:25:05 -05:00
Daniel Pouzzner
3a43109208 configure.ac: remove automatic --enable-hmac-copy, due to unit test failures when defined(WOLFSSL_HMAC_COPY_HASH), not previously detected because of broken option processing. 2025-07-02 14:25:05 -05:00
Daniel Pouzzner
b3944a73c2 linuxkm/lkcapi_sha_glue.c:
* implement interception of _get_random_bytes() and get_random_bytes_user() (implicitly intercepts /dev/random and /dev/urandom):

    * get_crypto_default_rng()
    * get_default_drbg_ctx()
    * wc__get_random_bytes()
    * wc_get_random_bytes_user()
    * wc_extract_crng_user()
    * wc_mix_pool_bytes()
    * wc_crng_reseed()
    * wc_get_random_bytes_by_kprobe()
    * wc_get_random_bytes_user_kretprobe_enter()
    * wc_get_random_bytes_user_kretprobe_exit()

    * add LINUXKM_DRBG_GET_RANDOM_BYTES sections to wc_linuxkm_drbg_startup() and wc_linuxkm_drbg_cleanup()

    * add linuxkm/patches/*/WOLFSSL_LINUXKM_HAVE_GET_RANDOM_CALLBACKS-*.patch, initially for versions:
      * 5.10.17
      * 5.10.236
      * 5.15
      * 5.17
      * 6.1.73
      * 6.12
      * 6.15

    * remove "*.patch" from .gitignore.

    * add linuxkm/patches/regen-patches.sh.

  * in wc_linuxkm_drbg_ctx_clear(), check lock count before freeing.

  * in get_drbg() and put_drbg(), use migrate_disable(), not DISABLE_VECTOR_REGISTERS().

  * in wc_linuxkm_drbg_generate(), explicitly DISABLE_VECTOR_REGISTERS() for the crypto_default_rng.

  * in wc_linuxkm_drbg_generate(), add DRBG reinitialization code to handle RNG_FAILURE_E.  This handles the situation where a DRBG was instantiated in a vector-ops-allowed context, caching a vectorized SHA256 ethod, but later used in a no-vector-ops-allowed context.

  * in wc_linuxkm_drbg_seed(), add DISABLE_VECTOR_REGISTERS() wrapper around wc_RNG_DRBG_Reseed() for crypto_default_rng.

linuxkm/x86_vector_register_glue.c:

  * add crash recovery logic to wc_linuxkm_fpu_state_assoc_unlikely()

  * in wc_linuxkm_fpu_state_assoc(), when wc_linuxkm_fpu_states is null, don't call wc_linuxkm_fpu_state_assoc_unlikely() if !assume_fpu_began.

  * in can_save_vector_registers_x86(), save_vector_registers_x86(), and restore_vector_registers_x86(), check for hard interrupt context first, to return early failure if current->pid is unusable.

  * in save_vector_registers_x86(), tweak logic around WC_FPU_INHIBITED_FLAG, adding local_bh_disable()...local_bh_enable() to provide for safe recursion.

wolfcrypt/src/random.c: optimization: in Hash_df(), for WOLFSSL_LINUXKM, don't put digest[WC_SHA256_DIGEST_SIZE] in the heap, keep it on the stack.

wolfssl/wolfcrypt/types.h: add WOLFSSL_NO_ASM no-op definitions for DISABLE_VECTOR_REGISTERS() and REENABLE_VECTOR_REGISTERS().

configure.ac:

* move --enable-linuxkm and --enable-linuxkm-defaults initial detection early, so that HMAC_COPY_DEFAULT picks it up.

* add ENABLED_ENTROPY_MEMUSE_DEFAULT, and enable it by default when ENABLED_LINUXKM_DEFAULTS.

* update linuxkm-lkcapi-register help message.

linuxkm/linuxkm_wc_port.h:

* add my_kallsyms_lookup_name().

* add preempt_count, _raw_spin_lock_irqsave, _raw_spin_trylock, _raw_spin_unlock_irqrestore, and _cond_resched, to wolfssl_linuxkm_pie_redirect_table, and add spin_unlock_irqrestore() macro to mask native inline.

* move linuxkm mutex wrappers from wolfcrypt/src/wc_port.c to linuxkm_wc_port.h, make them inlines, and add new default spinlock-based implementation, with old method now gated on WOLFSSL_LINUXKM_USE_MUTEXES.

* change malloc() and realloc() wrappers from GFP_KERNEL to GFP_ATOMIC.

linuxkm/lkcapi_glue.c: make misc.h/misc.c inclusion unconditional, and trim now-redundant inclusions out of lkcapi_dh_glue.c and lkcapi_ecdh_glue.c.
2025-07-02 14:25:05 -05:00
Daniel Pouzzner
b25d484a4e linuxkm/lkcapi_sha_glue.c: implement mutex-free sync mechanism for wc_linuxkm_drbg_ctx in new get_drbg(), get_drbg_n(), and put_drbg();
linuxkm/x86_vector_register_glue.c: implement support for WC_FPU_INHIBITED_FLAG, and an `int inhibit_p` argument to save_vector_registers_x86();

wolfcrypt/src/random.c: implement linuxkm support for RDSEED and HAVE_ENTROPY_MEMUSE;

wolfssl/wolfcrypt/error-crypt.h and wolfcrypt/src/error.c: add WC_ACCEL_INHIBIT_E "Crypto acceleration is currently inhibited";

linuxkm/module_hooks.c and linuxkm/x86_vector_register_glue.c: remove broken and bit-rotten WOLFSSL_COMMERCIAL_LICENSE and LINUXKM_FPU_STATES_FOLLOW_THREADS code paths.
2025-07-02 14:25:05 -05:00
Daniel Pouzzner
8cc2ba7153 Merge pull request #8953 from philljj/fedora_linuxkm_uninit_errors
linuxkm fedora: fix uninitialized build errors.
2025-07-02 14:20:26 -05:00
David Garske
221330df0b Added introspection for Intel and ARM assembly speedups (useful for benchmarking output). Added STM32F439ZI benchmarks.
`--enable-armasm` : `Assembly Speedups: ARMASM ALIGN`
`--enable-intelasm` : `Assembly Speedups: INTELASM ALIGN X86_64_BUILD`
2025-07-02 10:57:24 -07:00
jordan
9e811b5bd5 wolfcrypt misc: avoid frivolous initialization. 2025-07-02 10:46:38 -05:00
David Garske
fa9e122f1c Merge pull request #8952 from SparkiDev/mem_fail_fixes_3
Unit Test: fix test case for memory allocation failure testing
2025-07-02 08:01:20 -07:00
jordan
9ac480a60d linuxkm fedora: fix uninitialized build errors. 2025-07-02 10:00:28 -05:00
Sean Parkinson
af05fa874f Unit Test: fix test case for memory allocation failure testing
test_ocsp_basic_verify() not freeing and setting pointer to NULL. Second
free occuring on freed pointer.
2025-07-02 09:27:25 +10:00
JacobBarthelmeh
ff80d62db2 Merge pull request #8942 from rlm2002/coverity
Coverity: address unresolved issue from previous change
2025-07-01 16:09:32 -06:00
David Garske
33510ad714 Merge pull request #8949 from holtrop/asn-fn-prototype-names
wc/asn: fix several inconsistent function prototype parameter names
2025-07-01 14:50:51 -07:00
Ruby Martin
c06fa48e75 return NULL on negative length 2025-07-01 14:25:35 -06:00
Kaleb Himes
f2abadb777 Merge pull request #8950 from douzzer/20250701-Hash_DRBG_Generate-DEBUG_WOLFSSL
20250701-Hash_DRBG_Generate-DEBUG_WOLFSSL
2025-07-01 14:03:59 -06:00
Daniel Pouzzner
a8fc68d81b wolfcrypt/src/random.c: in Hash_DRBG_Generate(), gate the verbose reseed message on DEBUG_WOLFSSL or DEBUG_DRBG_RESEEDS, use WOLFSSL_MSG_EX(), and refactor the condition from drbg->reseedCtr == RESEED_INTERVAL to drbg->reseedCtr >= WC_RESEED_INTERVAL.
also some unrelated cleanup in .wolfssl_known_macro_extras.
2025-07-01 13:05:00 -05:00
JacobBarthelmeh
8fa0f6b3df Merge pull request #8944 from SparkiDev/evp_hmac_copy_hash_fix
EVP HMAC: get working with WOLFSSL_HMAC_COPY_HASH
2025-07-01 09:50:53 -06:00
JacobBarthelmeh
77792ace65 Merge pull request #8945 from SparkiDev/mem_fail_fixes_2
Memory allocation failure testing fixes
2025-07-01 09:35:11 -06:00
JacobBarthelmeh
9cf5bbcd35 Merge pull request #8948 from AlexLanzano/disable-md5-cmake
Disable MD5 by default for cmake builds
2025-07-01 09:29:42 -06:00
Josh Holtrop
fd1954babf wc/asn: fix several inconsistent function prototype parameter names 2025-07-01 11:14:11 -04:00
Alex Lanzano
709581061e Disable MD5 by default for cmake builds 2025-07-01 09:27:46 -04:00
Sean Parkinson
7c4de54e73 EVP HMAC: get working with WOLFSSL_HMAC_COPY_HASH
Get the EVP layer working with the wolfSSL HMAC implementation when
WOLFSSL_HMAC_COPY_HASH is defined.
This define hashes the ipad and opad into temporary hashes and copies
the required hash into the working hash when needed. Uses more memory
but is faster when starting a new hash with the same key.
2025-07-01 13:14:26 +10:00
Sean Parkinson
574de4b234 Memory allocation failure testing fixes
Fixes for test code to cleanup on failure properly.
pkcs7.c: when streaming, free the decrypting content when adding data to
the stream fails.
2025-07-01 11:50:42 +10:00
JacobBarthelmeh
7fb750962b Merge pull request #8935 from philljj/fix_coverity
coverity: prune dead code in ssl_sess.c.
2025-06-30 13:32:34 -06:00
Sean Parkinson
5db7fc05d8 Merge pull request #8940 from rizlik/dtls_fix_record_span_tests
fix(tests): enlarge readBuf in DTLS record tests
2025-06-30 21:57:27 +10:00
Marco Oliverio
ae9ba6627c fix(tests): enlarge readBuf in DTLS record tests
Increase readBuf to 256 bytes. Guard memcpy with EXPECT_SUCCESS().
2025-06-30 09:47:38 +02:00
Daniel Pouzzner
6c8ab11f5f Merge pull request #8936 from gojimmypi/pr-workflow-owner
Ensure workflows only run for wolfssl repository_owner
2025-06-27 22:29:46 -05:00
Daniel Pouzzner
1127dabe98 Merge pull request #8926 from dgarske/various_20250625
Improvement to allow building OPENSSL_EXTRA without KEEP_PEER_CERT
2025-06-27 22:29:24 -05:00
Daniel Pouzzner
89148f98b0 Merge pull request #8921 from rlm2002/appleNativeCertTests
Apple native cert tests code modifications
2025-06-27 22:26:17 -05:00
Daniel Pouzzner
018ee9754f Merge pull request #8608 from anhu/2akid
Check for duplicate extensions in a CRL
2025-06-27 22:25:27 -05:00
Daniel Pouzzner
d1c1bca9e4 Merge pull request #8914 from dgarske/stm32n6
Added support for STM32N6
2025-06-27 22:19:01 -05:00
gojimmypi
7621612eb8 Ensure workflows only run for wolfssl repository_owner 2025-06-27 16:29:13 -07:00
jordan
68cf96e7f6 coverity: do not free x509 on error in wolfSSL_add0_chain_cert. 2025-06-27 17:25:28 -05:00
jordan
d998d01a0c coverity: prune dead code in ssl_sess.c. 2025-06-27 15:40:01 -05:00
David Garske
1db3dbcc28 Improvement to allow building OPENSSL_EXTRA without KEEP_PEER_CERT. Workaround to avoid large WOLFSSL structure size with compatibility layer enabled (the struct WOLFSSL_X509 is over 5KB). Note: May investigate way to place into heap instead. Fix issues building compatibility layer without MD5. 2025-06-27 12:42:52 -07:00
Daniel Pouzzner
4421f8bd84 Merge pull request #8934 from dgarske/macos_typo
Fix minor code typos for macos signal and types.h max block size
2025-06-27 14:11:31 -05:00
David Garske
3a200387c0 Fix a copy/paste typo WC_MAX_BLOCK_SIZE from PR #8909. 2025-06-27 08:59:05 -07:00
David Garske
22c8a014e3 Merge pull request #8932 from rizlik/gaisler
Gaisler: minor doc fixes
2025-06-27 08:46:28 -07:00
David Garske
9a2c8840e2 Merge pull request #8933 from SparkiDev/armv7a_asm_branch_fix
ARMv7a ASM: fix branch instruction
2025-06-27 08:45:52 -07:00
David Garske
8b61cd6c4a Merge pull request #8895 from AlexLanzano/disable-md5
Disable MD5 by default
2025-06-27 08:45:28 -07:00
David Garske
295d90655b Merge pull request #8929 from SparkiDev/regression_fixes_18
Regression testing
2025-06-27 08:44:43 -07:00
David Garske
20a2ec0fc1 Fix typo from MacOS signal fix improvement in PR #8928. 2025-06-27 07:43:55 -07:00
Sean Parkinson
edacf0434c Merge pull request #8869 from rlm2002/coverityTests
Coverity: parameter checking and NULL assignment
2025-06-27 09:49:21 +10:00
Sean Parkinson
a7430b3f70 Merge pull request #8930 from kojiws/check_shift_counts
Clarify the len range on SetShortInt()
2025-06-27 09:46:42 +10:00
Sean Parkinson
f713882c54 Merge pull request #8928 from dgarske/macos
Implement proper MacOS dispatch for conditional signal/wait
2025-06-27 09:35:30 +10:00
Sean Parkinson
81e1eb4600 ARMv7a ASM: fix branch instruction
Branch instructions got changed for 64-bit to be B.<cond>.
32-bit must be B<cond>.
Return them to this form.
2025-06-27 09:26:28 +10:00
Ruby Martin
0302dbcb31 rename .yml file for macos-apple-native-cert-validation
WOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION macro placement and comment adjustment
2025-06-26 17:07:00 -06:00
Marco Oliverio
5eceb4faf4 Gaisler: minor doc fixes 2025-06-26 23:18:40 +02:00
Anthony Hu
a0cd18daea Add back a removed comment and give RFC reference. 2025-06-26 16:08:21 -04:00
Ruby Martin
8ab08f7b17 check length in wc_oid_sum()
add MAX_OID_SZ to known macro extras
2025-06-26 09:20:26 -06:00
Ruby Martin
9b6b41627e move CFErrorRef instantiation
cleanup
2025-06-26 09:06:01 -06:00
Ruby Martin
1321e00e45 set p2 to null before next iteration 2025-06-26 08:57:56 -06:00
Ruby Martin
79b6e62668 modify check domain test
void code for unused variable warning

do not run check_domain_name test if ssl_verify_none has been set
2025-06-26 08:39:32 -06:00
Ruby Martin
7c44f14e77 add apple test to github actions 2025-06-26 08:38:30 -06:00
Ruby Martin
d3b30f8d51 Check underlying error, want only maximum validity period error
add apple test macros to tests requiring cert manager
2025-06-26 08:38:28 -06:00
Brett
877bade216 additional debugging 2025-06-26 08:38:28 -06:00
Brett
7232b3a6bb Apple native cert validation: add WOLFSSL_TEST_APPLE_CERT_VALIDATION feature macro that forces system CA certs on and makes all CA certs added to CM via xxx_load_verify_xxx APIs to instead be loaded as system trust anchors when used for TLS cert verification 2025-06-26 08:38:26 -06:00
Sean Parkinson
f1cb4d579c Regression testing
Fixes to get WOLFSSL_PUBLIC_MP testing passing.
Fix DH constant time agreement:
  - implement constant time encoding to big-endian byte array in TFM
- only force x to be zero for SP math as others implementations ensure
unused words are zero
- exponentiate in constant time to the smallest number of words
possible
- no need to encode into separate buffer anymore as encoding is
constant time and front padded
- make requested_sz be the maximum size for the parameters and check
against agreeSz
- update agreeSz to be the maximum valid size instead of filling all
the buffer which may be many times too big
- fix SP result to front pad when doing constant time
2025-06-26 21:21:05 +10:00
Koji Takeda
b734c47cc9 Check the len range stricter 2025-06-26 17:48:52 +09:00
Daniel Pouzzner
981ba4b14c Merge pull request #8925 from mattia-moffa/20250625-wolftpm-ca-false
Allow CA:FALSE on wolftpm
2025-06-25 22:27:27 -05:00
Daniel Pouzzner
41e2d920a5 Merge pull request #8924 from JacobBarthelmeh/cert_expr
regenerate intermediate and crl certs to update ca-int.pem
2025-06-25 22:26:26 -05:00
Daniel Pouzzner
d49eb5f2c4 Merge pull request #8920 from kaleb-himes/wolfEntropy-2025
Update wolfEntropy checkout with AdPr update
2025-06-25 22:21:36 -05:00
Daniel Pouzzner
6fb1c54c29 Merge pull request #8854 from dgarske/renesas_rx_tsip_aesctr
Added Renesas RX TSIP AES CTR support
2025-06-25 22:20:03 -05:00
Daniel Pouzzner
6bfd2632db Merge pull request #8917 from dgarske/various_20250623
Fix for broken `test_wolfSSL_check_domain_basic`
2025-06-25 22:15:02 -05:00
Daniel Pouzzner
23a37b2ebc Merge pull request #8916 from dgarske/revert_pr8911
Revert PR #8911
2025-06-25 21:52:34 -05:00
Daniel Pouzzner
d6d124bb85 Merge pull request #8774 from SparkiDev/armv8_ghs
Armv8 (Aarch64) ASM fixes for Green Hills compiler
2025-06-25 21:46:48 -05:00
Daniel Pouzzner
29f534f3b0 Merge pull request #8836 from SparkiDev/lms_serialize_state
LMS: Allow state to be saved with private key
2025-06-25 21:34:42 -05:00
Daniel Pouzzner
38892fdd07 Merge pull request #8757 from anhu/recalc_suites
Recalculate suites at ssl initialization.
2025-06-25 21:32:38 -05:00
David Garske
6b7fe091bf Implement proper MacOS dispatch for conditional signal/wait. Note: this logic was pulled from wolfMQTT and is well established. 2025-06-25 17:14:12 -07:00
Sean Parkinson
f119086d3e Merge pull request #8918 from kojiws/fix_asn_integer_export
Fix SetShortInt() not to export wrong DER
2025-06-26 08:16:48 +10:00
Sean Parkinson
80a234a0c5 Merge pull request #8830 from JacobBarthelmeh/rx_threadx
add option to not use CT code with min/max
2025-06-26 08:15:09 +10:00
Mattia Moffa
e9e00c47ab Allow CA:FALSE on wolftpm
The Intel CSME fTFM sets this basic constraint on their EK certificates
and by default wolfSSL fails to parse because of this.
2025-06-25 22:48:53 +02:00
Alex Lanzano
9ae221444c Enable MD5 when --enable-opensslall is set 2025-06-25 15:16:02 -04:00
JacobBarthelmeh
7b5e3e2551 regenerate intermediate and crl certs to update ca-int.pem 2025-06-25 10:00:57 -06:00
Alex Lanzano
6bba48d89c Enable MD5 when --enabled-bump is set 2025-06-25 11:47:04 -04:00
Alex Lanzano
39cef87e43 Enable MD5 when --enable-des3 is set 2025-06-25 11:42:10 -04:00
Alex Lanzano
caaa4fbc5d Enable MD5 when --enable-lighty is set 2025-06-25 11:35:35 -04:00
Alex Lanzano
3e774f8074 Enable MD5 when --enable-mcapi is set 2025-06-25 11:33:52 -04:00
Alex Lanzano
4275b66211 Enable MD5 when --enable-jni is set 2025-06-25 11:27:08 -04:00
Alex Lanzano
4fd0029f18 Enable MD5 when --enable-fortress is set 2025-06-25 11:21:00 -04:00
Alex Lanzano
f33d1d69bb Enable MD5 when --enable-asio is set 2025-06-25 11:15:50 -04:00
Alex Lanzano
495324d4dc Add the md5 dependency to options that require it 2025-06-25 11:00:41 -04:00
Alex Lanzano
07f76723e2 Disable MD5 by default
Disable the use of MD5 by default. Add the conditional use of MD5 when
--enable-all-crypto is present. Add the use of MD5 when
--enable-opensslextra is present. Add the use of MD5 when
--enable-tlsv10 is present.
2025-06-25 11:00:41 -04:00
Daniel Pouzzner
1c1c556e5e Merge pull request #8915 from philljj/linuxkm_rsa_fix_sig_callbacks
linuxkm rsa: set sig_alg max_size and digest_size callbacks.
2025-06-25 08:28:04 -05:00
Daniel Pouzzner
e223da457c Merge pull request #8922 from JacobBarthelmeh/rng
altering macro guards and test case for RNG test on alternate builds
2025-06-24 22:15:14 -05:00
Koji Takeda
d76386f38c Add tests 2025-06-25 11:27:12 +09:00
Koji Takeda
05c8bc7514 Fix SetShortInt() 2025-06-25 11:27:11 +09:00
JacobBarthelmeh
6cf3b51333 guard test that uses pipe from running with mingw 2025-06-24 17:21:24 -06:00
Sean Parkinson
5c9ad359d1 Merge pull request #8904 from anhu/bigger_header
Fix missing dashes on the end of header and footer.
2025-06-25 08:26:59 +10:00
JacobBarthelmeh
fe7d458d29 random.c is also locked in FIPS v6 2025-06-24 16:08:25 -06:00
JacobBarthelmeh
1c5e531332 add new macro to known macro list 2025-06-24 14:57:17 -06:00
JacobBarthelmeh
c33035e6a6 add conditions to constant time mask functions 2025-06-24 13:52:40 -06:00
JacobBarthelmeh
838636c76b add option to not use CT code with min/max 2025-06-24 13:52:40 -06:00
jordan
1e0e4932ca linuxkm rsa: fix km_pkcs1_key_size callback. 2025-06-24 14:41:57 -05:00
David Garske
33972e3678 Disable system CA certs for msys2 test. 2025-06-24 10:28:42 -07:00
kaleb-himes
f5f0bdf61e Update wolfEntropy checkout with AdPr update 2025-06-24 10:54:52 -06:00
David Garske
41591e7eb9 Fixes for TSIP AES CTR unit tests and handling of invalid cases. 2025-06-24 09:41:33 -07:00
David Garske
191165a021 Test case created by @miyazakh. 2025-06-24 09:41:33 -07:00
David Garske
dc57adcfed Fix to increment IV for AES CTR with TSIP (allow encrypt to be called multiple times without having to manually reset the IV). 2025-06-24 09:41:33 -07:00
David Garske
c7ff3b99b7 Allow for calling the Renesas RX TSIP AES crypto callback without a user context. 2025-06-24 09:41:33 -07:00
David Garske
ad9d068174 Fix issues with crypto callbacks and HAVE_ECC_DHE. Fix issues with ecc_onlycb_test. 2025-06-24 09:41:33 -07:00
David Garske
111feedadc Add build guards on the crypto callback ECC items. 2025-06-24 09:41:32 -07:00
David Garske
c7f6673e53 Fixup the .wolfssl_known_macro_extras 2025-06-24 09:41:32 -07:00
David Garske
ebe8816c2a Code size reductions (check RX TSIP enables). 2025-06-24 09:41:32 -07:00
David Garske
78362bc346 Changes to support Renesas RX TSIP AES CTR. 2025-06-24 09:41:32 -07:00
David Garske
33584550e8 Cleanup to support override of HAL_CONSOLE_UART. Added support for STM32F439xx. 2025-06-24 09:41:01 -07:00
David Garske
803edb0fa4 Added support for STM32N6. 2025-06-24 09:41:01 -07:00
David Garske
bfebeae533 Revert PR #8911. For TLS v1.2 RSA only is only supported with WOLFSSL_STATIC_RSA. For TLS v1.3 RSA only is not supported (must be PFS). 2025-06-24 09:40:15 -07:00
Daniel Pouzzner
b8aa4bd84b Merge pull request #8919 from philljj/fix_linuxkm_getpid
linuxkm: add WOLFSSL_NO_GETPID to wolfcrypt settings.h.
2025-06-24 11:32:56 -05:00
jordan
5503ea8e6d linuxkm: add WOLFSSL_NO_GETPID to wolfcrypt settings.h. 2025-06-24 11:12:00 -05:00
David Garske
5d7cb2ec07 Fix for new api.c test test_wolfSSL_check_domain_basic added in PR #8863 that fails with --disable-sys-ca-certs. 2025-06-24 08:25:01 -07:00
Anthony Hu
72ec4029d1 Correct the size for MLDSA PEM header 2025-06-24 11:12:27 -04:00
Anthony Hu
423ecf8b1f Try harder not to make stack increases 2025-06-24 11:12:27 -04:00
Anthony Hu
a0f6b779a5 -----BEGIN SPHINCS_SMALL_LEVEL1 PRIVATE KEY----- is the longest one at length 48 2025-06-24 11:12:27 -04:00
Anthony Hu
bf928795b3 Fix missing dashes on the end of header and footer. 2025-06-24 11:12:27 -04:00
Anthony Hu
1dff76782b Check for duplicate extensions in a CRL 2025-06-24 11:10:18 -04:00
Anthony Hu
43df11c9c1 Add gate on having DH 2025-06-24 10:37:26 -04:00
Anthony Hu
8c1298a1d8 Check if DH's P and G are set 2025-06-24 09:59:12 -04:00
Sean Parkinson
d05790ed89 LMS: Allow state to be saved with private key
Defining WOLFSSL_WC_LMS_SERIALIZE_STATE will have the state serialized
before the private key data.
Lots of memory used but means fast reload times. That means that the key
can be reloaded for each sign.
2025-06-24 20:46:41 +10:00
Sean Parkinson
fc1d281268 Green Hills compiler fixes
internal.c: Move non-enumeration value out of switch.
ssl.c: Only declare globalRNGMutex when required.
x509.c: initialize ret

armv8-aes.c, armv8-chacha.c: fix branch instructions
armv8-mlkem*: ensure only required constants are input operands and move
constants closer to first use.
armv8-poly1305.c: remove POLY1305_BLOCK_SIZE from input operands.
armv8-sha3-asm_c.c, armv8-sha512-asm_c.c: use constraint ':' instead of
'S'.
armv8-sha512.c: initialize initfp. Is always used.
2025-06-24 19:39:40 +10:00
Sean Parkinson
f8bb889712 Armv8 (Aarch64) ASM fixes for Green Hills compiler
Change branch instructions to proper form.
Use constant value rather than POLY1305_BLOCK_SIZE.
Remove duplicate clobber registers - both w and x versions.
Make clamp unconditionally compiled.
2025-06-24 19:39:39 +10:00
David Garske
978a29da0b Merge pull request #8898 from cconlon/getpidOptionsH
Add HAVE_GETPID to options.h if getpid detected
2025-06-23 17:11:55 -07:00
JacobBarthelmeh
9ee212cacc fix for free'ing memory with test case 2025-06-23 17:33:52 -06:00
David Garske
c4428a432f Merge pull request #8912 from SparkiDev/lms_sha256_192_w_fix
LMS SHA-256_192: fix parameters
2025-06-23 15:35:02 -07:00
Anthony Hu
d45e42e2e6 keySz is only in Buffers if NO_CERTS not defined. 2025-06-23 18:29:39 -04:00
Anthony Hu
6385999ae9 Recalculate suites at ssl initialization. 2025-06-23 18:29:39 -04:00
Anthony Hu
aec13923a7 Merge pull request #8913 from dgarske/pq_verifyonly
Fix for building LMS with verify only
2025-06-23 16:37:32 -04:00
David Garske
f1005c33fb Merge pull request #8905 from gojimmypi/pr-vs-cmake
Introduce CMakePresets.json and CMakeSettings.json
2025-06-23 11:18:57 -07:00
David Garske
caf8494d65 Merge pull request #8911 from gojimmypi/pr-allow-only-rsa
Allow configuration with only RSA cipher suites
2025-06-23 11:18:27 -07:00
David Garske
d4c827bc5e Fix for building LMS with verify only. Added tests for LMS/XMSS verify only. New wc_LmsKey_GetKid references key->priv_raw that is not available. 2025-06-23 11:12:53 -07:00
Daniel Pouzzner
b361c62372 Merge pull request #8903 from dgarske/cadate_calist
Expose API to access "store" error code and depth for cert failure callback
2025-06-23 10:08:41 -05:00
Daniel Pouzzner
47a8242093 Merge pull request #8868 from SparkiDev/dilithium_win_fixes_1
Dilithium/ML-DSA: Fixes for casting down and uninit
2025-06-23 09:02:35 -05:00
Daniel Pouzzner
bcdce75b08 Merge pull request #8909 from dgarske/various_20250620
Fixes with max size, openssl.test netcat and clang-tidy
2025-06-23 08:15:17 -05:00
Sean Parkinson
f36f86ee98 LMS SHA-256_192: fix parameters
Winternitz bits needs to be one larger when only 192 bit hash.
2025-06-23 08:16:05 +10:00
gojimmypi
afa22dfc2b Allow configuration with only RSA cipher suites 2025-06-21 14:54:10 -07:00
David Garske
b9455bc94b Fixes issue with cert gen, no malloc and crypto callback causing wolfssl/wolfcrypt/asn.h:1375:18: error: use of undeclared identifier 'WC_MAX_DIGEST_SIZE. Fixed netcat issue in openssl.test causing server open check to fail on some platforms. Fixed clang-tidy report in benchmark.c where XFTELL could return negative (error) and wasn't handled. 2025-06-20 16:34:46 -07:00
David Garske
1be303866e Merge pull request #8908 from douzzer/20250620-clang-tidy-and-cppcheck-fixes-and-workarounds
20250620-clang-tidy-and-cppcheck-fixes-and-workarounds
2025-06-20 15:07:09 -07:00
David Garske
f30c54abdd Merge pull request #8894 from SparkiDev/ppc32_sha256_asm
PPC 32 ASM: SHA-256
2025-06-20 14:29:47 -07:00
Daniel Pouzzner
af78ed8b6f wolfcrypt/src/wc_xmss_impl.c: in wc_xmss_bds_state_treehash_complete(), add suppression for false positive clang-analyzer-core.NullDereference from LLVM-21 pre20250523+. 2025-06-20 15:31:31 -05:00
Daniel Pouzzner
7977a605c5 src/internal.c: in FreeSskeArgs(), move nullness check on args to the start, and make it unconditional, to resolve nullPointerRedundantChecks. 2025-06-20 15:04:07 -05:00
Daniel Pouzzner
e1fe186753 wolfcrypt/src/sp_int.c: in _sp_prime_trials(), use DECL_SP_INT() not DECL_SP_INT_ARRAY() for n1 and r, to mollify a very confused clang-tidy (fixes false positive clang-analyzer-core.UndefinedBinaryOperatorResult and clang-analyzer-core.CallAndMessage). 2025-06-20 14:52:42 -05:00
David Garske
0f119ab8e2 Merge pull request #8906 from julek-wolfssl/libspdm-3.7.0
libspdm 3.3.0 -> 3.7.0
2025-06-20 11:44:53 -07:00
David Garske
b98cf8882b Remove HAVE_LIGHTY from the client_ca_names feature. 2025-06-20 11:29:02 -07:00
gojimmypi
380e068df6 Introduce CMakePresets.json and CMakeSettings.json 2025-06-20 11:24:58 -07:00
Juliusz Sosinowicz
9f900d4b8a libspdm 3.3.0 -> 3.7.0
3.3.0 pulls cmocka from https://git.cryptomilk.org/projects/cmocka.git. Update to 3.7.0 to pull from https://gitlab.com/cmocka/cmocka.git.
2025-06-20 19:55:16 +02:00
David Garske
4c6279c6c7 Good feedback about adding wolfCrypt error codes to .cs layer. Partially added useful ones. 2025-06-20 09:41:35 -07:00
Kaleb Himes
17f3da11d2 Merge pull request #8899 from SparkiDev/entropy_cont_tests_fix_2
Entropy: fix proportion health test
2025-06-20 09:10:41 -06:00
David Garske
9b50708741 Fix to expose API to access "store" error code and error depth for cert failure callback (from set_verify). Useful for C# wrapper or clients that cannot directly dereference X509_STORE. Fixes for building with WOLFSSL_EXTRA and WOLFSSL_NO_CA_NAMES (and added new tests). Added example in CSharp TLS client for overriding a begin date error (useful if date is not set). 2025-06-19 14:49:00 -07:00
David Garske
7610b4e2f5 Merge pull request #8893 from SparkiDev/asm_omit_frame_pointer
ARM32/Thumb2/RISC-V 64 ASM: omit frame pointer
2025-06-19 10:48:23 -07:00
David Garske
96a3591f98 Merge pull request #8896 from holtrop/fix-asn-memory-leak
Fix memory leak in ParseCRL_Extensions
2025-06-19 06:18:41 -07:00
David Garske
8f0106a7fe Merge pull request #8888 from julek-wolfssl/bind-v9.18.33
Add bind v9.18.33 testing
2025-06-19 06:08:13 -07:00
David Garske
64bc41a3c3 Merge pull request #8901 from SparkiDev/ecc_config_fixex_1
ECC configuration fixes
2025-06-19 06:02:33 -07:00
Sean Parkinson
f7fb68dedc Merge pull request #8884 from dgarske/enablecerts
Fix to make sure ASN.1 is enabled if just building PQ algorithms
2025-06-19 15:50:59 +10:00
Sean Parkinson
7289687b44 ECC configuration fixes
When ECC verify only and with no RNG.
2025-06-19 13:37:43 +10:00
Sean Parkinson
62721f4d51 PPC32 SHA-256 ASM: small code implementation
Slower but smaller SHA-256 assembly code implementation enabled with:
WOLFSSL_PPC32_ASM_SMALL. (--enable-ppc32=small or
--enable-ppc32=inline,small)
2025-06-19 10:51:12 +10:00
Sean Parkinson
16aab18ae9 Entropy: fix proportion health test
Update the count of entries.
2025-06-19 10:34:03 +10:00
Chris Conlon
cdd02f9665 Add check for reseed in ssl.c for HAVE_SELFTEST, similar to old FIPS bundles that do not have older random.c files 2025-06-18 17:21:55 -06:00
Chris Conlon
9c35c0de65 Add HAVE_GETPID to options.h if getpid detected, needed for apps to correctly detect size of WC_RNG struct 2025-06-18 16:08:34 -06:00
Josh Holtrop
7dfb782c9e Fix memory leak in ParseCRL_Extensions 2025-06-18 16:47:15 -04:00
David Garske
74de689941 Merge pull request #8875 from kareem-wolfssl/zd20035
Fix SRP wolfCrypt test on lower FP_MAX/SP_INT_BITS configs
2025-06-18 08:59:09 -07:00
David Garske
27176a5eeb Merge pull request #8870 from kareem-wolfssl/zd20030
Various minor fixes.
2025-06-18 08:55:07 -07:00
David Garske
e5a9c7039c Merge pull request #8889 from holtrop/remove-dtls-from-echo-examples
Remove DTLS from echo examples
2025-06-18 08:52:47 -07:00
David Garske
9528aaf238 Support WOLFSSL_TRACK_MEMORY with SINGLE_THREADED. 2025-06-18 08:37:27 -07:00
David Garske
cdbc4cb3b3 Fix to make sure certs/asn are enabled for PQ algorithms 2025-06-18 08:32:49 -07:00
Sean Parkinson
c39f1fe721 PPC 32 ASM: SHA-256
Pure and inline  ASM for the PowerPC 32-bit.
2025-06-18 21:23:15 +10:00
Sean Parkinson
dc70cfa3b3 ARM32/Thumb2/RISC-V 64 ASM: omit frame pointer
ARM32/Thumb2: Generated code now omits the frame pointer attribute on
each function. Remove global use in configure.ac.
RISC-V 64: Omit the frame pointer on the one function that uses the
register 's0'.
2025-06-18 10:20:55 +10:00
Kaleb Himes
6f78c26bff Merge pull request #8820 from SparkiDev/entropy_cont_tests_fix
Entropy - fix off by ones in continuous testing
2025-06-17 17:56:00 -06:00
Sean Parkinson
c724c6560d Entropy - fix off by ones in continuous testing
rep_cnt is count of contiguous bytes with same value.
First ever sample must set count to 1.

Wasn't filling the cache up completely.
Off by one in check for initial fill.
2025-06-18 08:10:55 +10:00
Josh Holtrop
feaae9fc58 Fix configure help to use --enable-debug instead of --enable-verbose 2025-06-17 14:38:01 -04:00
Josh Holtrop
0b6c53c8b0 Remove DTLS from echoserver/echoclient examples
This fixes some intermittent CI testsuite failures.
2025-06-17 14:38:01 -04:00
David Garske
7d77446964 Merge pull request #8882 from rizlik/dtls13_always_transmit_explicit_ack
dtls13: always send ACKs on detected retransmission
2025-06-17 11:35:07 -07:00
Daniel Pouzzner
d39295166f Merge pull request #8885 from embhorn/zd20088
Check for STDC_NO_ATOMICS
2025-06-17 13:33:39 -05:00
David Garske
6b68797b4f Merge pull request #8883 from JacobBarthelmeh/rng
account for Intel RDRAND build without HAVE_HASHDRBG
2025-06-17 11:33:16 -07:00
David Garske
7e864c177d Merge pull request #8886 from douzzer/20250617-prime_test-uninited-wc_FreeRng
20250617-prime_test-uninited-wc_FreeRng
2025-06-17 11:31:53 -07:00
Kareem
fe5ae0cbdf Restore 128-byte SRP test using safe prime N for the case where 192 bytes is too large for the fast/SP math config. 2025-06-17 11:30:11 -07:00
Kareem
a035b045a4 Only run SRP tests with at least 3072 bits.
The SRP buffers are 192 bytes, so they need a minimum of 3072 bits.
If the bit size is too low, wc_SrpGetVerifier will return MP_VAL as the buffers won't fit.
2025-06-17 11:30:11 -07:00
Kareem
7e4ec84124 Add macros for legacy get_digit functions for FIPS/selftest. 2025-06-17 10:12:06 -07:00
Kareem
9c9465aa23 Also account for selftest for mp_get_digit refactor. 2025-06-17 10:12:06 -07:00
Kareem
05aa4f5f08 Make mp_get_digit refactor FIPS friendly. 2025-06-17 10:12:06 -07:00
Kareem
2366718d5a Add args->input free in FreeSskeArgs.
This free is redundant in most cases but it covers the specific
case of using async, exiting SendServerKeyExchange early due to
WANT_WRITE or WC_PENDING_E, then later freeing the async context
without calling SendServerKeyExchange again.
2025-06-17 10:12:06 -07:00
Kareem
304019d28d Fix inclusion guard around wc_RsaSSL_Verify.
The current condition of !WOLFSSL_RSA_VERIFY_ONLY doesn't make sense,
as the verify only case will want this function.

Based on the original change and the context, it looks like this was a
typo meant to be !WOLFSSL_RSA_VERIFY_INLINE.
2025-06-17 10:12:06 -07:00
Kareem
e8c110d2ac Rename get_digit* to mp_get_digit* to avoid conflicts with other functions named get_digit. 2025-06-17 10:12:06 -07:00
Kareem
6633b52e28 Don't try to build wc_RsaSSL_Sign in asn.c MakeSignature if RSA public or verify only is enabled. 2025-06-17 10:12:06 -07:00
David Garske
83954100d6 Merge pull request #8812 from kosmax871/tropic01-dev
Added crypto callback functions for TROPIC01 secure element
2025-06-17 10:03:18 -07:00
Eric Blankenhorn
9defad0b24 Check for STDC_NO_ATOMICS 2025-06-17 11:40:07 -05:00
Juliusz Sosinowicz
9c54032159 Add bind v9.18.33 testing 2025-06-17 18:38:38 +02:00
David Garske
5e6c1ba05f Merge pull request #8879 from julek-wolfssl/openssh-10.0p2
Updates for OpenSSH 10.0p2
2025-06-17 09:36:45 -07:00
Daniel Pouzzner
d28045daa8 wolfcrypt/test/test.c: fix prime_test() uninitialized data access by wc_FreeRng(). 2025-06-17 09:31:19 -05:00
Daniel Pouzzner
3e5e470005 Merge pull request #8876 from philljj/small_drbg_cleanup
linuxkm drbg: refactor drbg_ctx clear.
2025-06-16 16:33:57 -05:00
Maxim Kostin
037ccbaa05 Update TROPIC01 integration guide and header file for key slot definitions and datasheet link 2025-06-16 21:12:19 +02:00
David Garske
842e2366e3 Merge pull request #8881 from douzzer/20250615-heapmath-FREE_MP_INT_SIZE
20250615-heapmath-FREE_MP_INT_SIZE
2025-06-16 11:46:12 -07:00
David Garske
5151a2297a Merge pull request #8880 from holtrop/fix-printing-cert-with-empty-issuer-name
Fix printing empty names in certificates
2025-06-16 11:37:02 -07:00
Maxim Kostin
cafb1f5fd7 Merge branch 'tropic01-dev' of github.com:kosmax871/wolfssl into tropic01-dev 2025-06-16 20:32:30 +02:00
Maxim Kostin
f865e0de97 improve ED25519 key handling in CryptoCb function 2025-06-16 20:27:15 +02:00
Maxim Kostin
60f442b04e Fix formatting inconsistencies in README.md 2025-06-16 20:27:15 +02:00
Maxim Kostin
bab7677273 Added AES IV retrieval from TROPIC01 and use of new R-Memory slot definitions 2025-06-16 20:27:15 +02:00
Maxim Kostin
3b198babe3 Add Tropic01_Deinit call in wolfCrypt_Cleanup for proper resource management 2025-06-16 20:27:15 +02:00
Maxim Kostin
172728bf7f Refactor Tropic01 interface: clean up code formatting and improve function declarations 2025-06-16 20:27:15 +02:00
kosmax871
5696582add Update README.md 2025-06-16 20:27:15 +02:00
Maxim Kostin
375af753aa Changes for the PR https://github.com/wolfSSL/wolfssl/pull/8812 2025-06-16 20:27:15 +02:00
Maxim Kostin
2f210b3907 Refactor TROPIC01 integration: update README, enhance pairing key handling, and improve error messages 2025-06-16 20:27:15 +02:00
Maxim Kostin
296bfd258c README.md added 2025-06-16 20:27:15 +02:00
Maxim Kostin
0eecfbfb35 ed25519 fixes 2025-06-16 20:27:15 +02:00
Maxim Kostin
cd76615e49 added support of ED25519 2025-06-16 20:27:15 +02:00
kosmax871
7c1980fe01 some fixes and updates 2025-06-16 20:27:15 +02:00
kosmax871
b13fdaa05e Draft of readme.md 2025-06-16 20:27:15 +02:00
kosmax871
5664507e65 Support for static libraries 2025-06-16 20:27:15 +02:00
Maxim Kostin
385be1c08a added support for Tropic01 crypto callbacks 2025-06-16 20:27:15 +02:00
kosmax871
3da72fb9b6 Merge branch 'wolfSSL:master' into tropic01-dev 2025-06-16 19:30:32 +02:00
Juliusz Sosinowicz
9a576d9e2e Fix CI failures 2025-06-16 19:07:58 +02:00
Marco Oliverio
e82c099bec fix indentation 2025-06-16 18:42:17 +02:00
Juliusz Sosinowicz
72db5e5108 Remove NO_FILESYSTEM for CI 2025-06-16 18:06:19 +02:00
Juliusz Sosinowicz
aca6da66f6 Set default seedCb when not FIPS 2025-06-16 17:39:22 +02:00
Josh Holtrop
3bd9b2e0bc Add generation instructions for empty issuer cert and change expiry to 100 years 2025-06-16 11:39:01 -04:00
JacobBarthelmeh
ce61f0d517 account for Intel RDRAND build without HAVE_HASHDRBG 2025-06-16 09:04:50 -06:00
Marco Oliverio
b1b49c9ffb dtls13: always send ACKs on detected retransmission
Otherwise the connection can stall due the indefinite delay of an explicit ACK,
for exapmle:

 -> client sends the last Finished message
<- server sends the ACK, but the ACK is lost
 -> client rentrasmit the Finished message
 - server delay sending of the ACK until a fast timeout
 -> client rentrasmit the Finished message quicker than the server timeout
 - server resets the timeout, delaying sending the ACK
 -> client rentrasmit the Finished...
2025-06-16 14:19:32 +02:00
Marco Oliverio
509491f554 dtls13: wolfSSL_is_init_finished true after last server ACK
Do not consider the handshake finished until the last server ACK.
This way the application knows where to switch from
wolfSSL_negotiate/wolfSSL_connect to wolfSSL_read/wolfSSL_write.
2025-06-16 14:19:31 +02:00
Daniel Pouzzner
d5ce9744a4 linuxkm/lkcapi_sha_glue.c: explicitly free hash state in wrappers. 2025-06-15 14:40:42 -05:00
Daniel Pouzzner
89e51025ab .wolfssl_known_macro_extras: snip out unneeded entries. 2025-06-15 12:46:44 -05:00
Daniel Pouzzner
e852c090c0 wolfssl/wolfcrypt/integer.h: for heapmath FREE_MP_INT_SIZE(), rather than WC_DO_NOTHING(), conditionally mp_free(), for functional isomorphism with sp_int and tfm MPI lifecycles. 2025-06-15 07:56:25 -05:00
David Garske
05ff12969e Merge pull request #8864 from kojiws/improve_pkcs12_export_params
Apply 16 bytes salt length for PBES2 key encryption on wc_PKCS12_create()
2025-06-13 14:12:37 -07:00
Juliusz Sosinowicz
37554a13db Updates for OpenSSH 10.0p2
- random.c: use getrandom when available and fall back to direct file access
- openssh.yml: run more tests
- openssh.yml: add 10.0p2 and 9.9p2
- configure.ac: detect if `getrandom` is available on the system
- configure.ac: openssh requires WC_RNG_SEED_CB to always use `getrandom` so that the RNG doesn't get killed by SECCOMP
2025-06-13 18:06:19 +02:00
Koji Takeda
ff1baf0ae7 Apply stronger salt length for PBES2 2025-06-14 00:45:03 +09:00
Josh Holtrop
8bde5e6982 Fix printing empty names in certificates
The empty-issuer-cert.pem certificate was created with:

    wolfssl genkey rsa -size 2048 -out mykey -outform pem -output KEY
    wolfssl req -new -days 3650 -key mykey.priv -out empty-issuer-cert.pem -x509

Prior to this fix this command would error printing the certificate:

    wolfssl x509 -inform pem -in empty-issuer-cert.pem -text
2025-06-13 11:22:52 -04:00
JacobBarthelmeh
e74214ded0 Merge pull request #8878 from dgarske/fix_pr8867_oscheck
Fix for syntax error in os-check.yml
2025-06-13 09:09:27 -06:00
David Garske
8181561f0f Fix for syntax error in os-check.yml added in PR #8867. 2025-06-13 07:17:37 -07:00
Daniel Pouzzner
1549425411 Merge pull request #8873 from philljj/fix_fips_enabled
linuxkm: don't toggle fips_enabled.
2025-06-13 05:56:52 -05:00
jordan
b6b58a957b linuxkm: add missing WC_NO_ERR_TRACE. 2025-06-13 01:45:47 -05:00
jordan
bb5291aa5e linuxkm: don't toggle fips_enabled. 2025-06-13 00:45:12 -05:00
jordan
41965750c8 linuxkm drbg: refactor drbg_ctx clear. 2025-06-12 19:59:19 -05:00
David Garske
6cb0c8513d Merge pull request #8874 from JacobBarthelmeh/nginx-tests
fix for perl module version used with nginx test
2025-06-12 16:09:31 -07:00
JacobBarthelmeh
b78f8a4ed6 fix for perl module version used with nginx test 2025-06-12 15:55:56 -06:00
David Garske
c5e63b84ca Merge pull request #8840 from douzzer/20250605-linuxkm-DRBG-multithread-round-1
20250605-linuxkm-DRBG-multithread-round-1
2025-06-12 13:17:54 -07:00
David Garske
2fc1110a13 Merge pull request #8587 from lealem47/gh8574
Fix bug in ParseCRL_Extensions
2025-06-12 12:09:52 -07:00
David Garske
701e3ba64e Merge pull request #8808 from rlm2002/coverity
Coverity: api.c fix
2025-06-12 12:03:14 -07:00
David Garske
bfdce3a345 Merge pull request #8832 from SparkiDev/aarch64_xfence
Aarch64 XFENCE
2025-06-12 11:53:55 -07:00
David Garske
6571f42cb9 Merge pull request #8867 from JacobBarthelmeh/rng
Improvements to RNG and compatibility layer
2025-06-11 14:31:53 -07:00
Maxim Kostin
abdcf4dbc5 improve ED25519 key handling in CryptoCb function 2025-06-11 21:09:22 +02:00
kosmax871
394a25b376 Merge branch 'wolfSSL:master' into tropic01-dev 2025-06-11 21:07:15 +02:00
JacobBarthelmeh
8ee1f8f287 add macro guard on test case 2025-06-11 10:43:47 -06:00
JacobBarthelmeh
675ff71b0b Merge pull request #8863 from rlm2002/AppleNativeCert
Add api unit test for checking domain name
2025-06-11 09:38:08 -06:00
Sean Parkinson
1c85a76ddd Dilithium/ML-DSA: Fixes for casting down and uninit 2025-06-11 11:14:49 +10:00
Sean Parkinson
d66863d0ac Aarch64 XFENCE
Use sb instruction instead of isb if available.
2025-06-11 09:29:20 +10:00
JacobBarthelmeh
ae87afa677 Merge pull request #8857 from miyazakh/tsip_fix
fix TSIP TLS example program
2025-06-10 16:26:34 -06:00
JacobBarthelmeh
47cf634965 add a way to restore previous pid behavior 2025-06-10 16:12:09 -06:00
JacobBarthelmeh
4207affc72 adding additional RAND test cases 2025-06-10 16:01:52 -06:00
Ruby Martin
d0134f2212 coverity: address reuse after free, add NULL checks 2025-06-10 15:33:47 -06:00
Ruby Martin
a7a5062c7a add api test for checking domain name
use SNI example.com in client ssl
2025-06-10 15:22:01 -06:00
JacobBarthelmeh
fbbb6b7707 add mutex locking and compat layer FIPS case 2025-06-10 14:37:11 -06:00
JacobBarthelmeh
31490ab813 add sanity checks on pid with RNG 2025-06-10 14:37:11 -06:00
Hideki Miyazaki
d138c48a00 add TSIP_RSASSA_1024 and TSIP_RSASSA_2048 to known_macro_extras 2025-06-11 04:12:54 +09:00
JacobBarthelmeh
2d892f07eb Merge pull request #8861 from gasbytes/psk-handshake-failure-fix
tls13: clear tls1_3 on downgrade
2025-06-10 10:24:17 -06:00
JacobBarthelmeh
047f0bb5fc Merge pull request #8847 from gojimmypi/pr-platformio-cert-bundles
Improve PlatformIO Certificate Bundle Support
2025-06-10 10:23:07 -06:00
JacobBarthelmeh
eb3c324ea4 Merge pull request #8852 from holtrop/reseed-drbg-in-rand-poll-test
Add additional compatibility layer RAND tests
2025-06-10 10:20:46 -06:00
JacobBarthelmeh
94f5948f20 Merge pull request #8858 from rizlik/dtls13_set_epoch_fix
dtls13: move Dtls13NewEpoch into DeriveTls13Keys
2025-06-10 09:48:58 -06:00
JacobBarthelmeh
81852e7425 Merge pull request #8865 from SparkiDev/dilithium_fixes_2
ML-DSA: fix tests for different configs
2025-06-10 09:43:13 -06:00
Sean Parkinson
cb90b78688 ML-DSA: fix tests for different configs
Setting the private key into SSL object requires signing to be
available.
Only enable the parameters that are compiled in.
2025-06-10 20:44:27 +10:00
Josh Holtrop
1c6e3d729a Check that fork() returns >= 0 in RAND_poll fork test 2025-06-10 06:23:06 -04:00
JacobBarthelmeh
106bcb22d3 Merge pull request #8860 from LinuxJedi/tls13-trusted-ca
Allow `trusted_ca_keys` with TLSv1.3
2025-06-09 17:43:44 -06:00
JacobBarthelmeh
4ae8ca03ac Merge pull request #8859 from kojiws/clarify_supported_pkcs12_enc_algos
Clarify supported encryption algorithms on wc_PKCS12_create()
2025-06-09 16:03:53 -06:00
David Garske
587d5c783b Merge pull request #8862 from JacobBarthelmeh/pqc
fix syntax error with pqc yml
2025-06-09 13:03:48 -07:00
Josh Holtrop
133e238359 Wait on child process in RAND_poll fork test 2025-06-09 15:59:22 -04:00
JacobBarthelmeh
496b0911be fix syntax error with pqc yml 2025-06-09 13:50:00 -06:00
Marco Oliverio
3e6703e1fb fixup! dtls13: move Dtls13NewEpoch into DeriveTls13Keys 2025-06-09 19:20:06 +02:00
Marco Oliverio
1024bf0109 fixup! dtls13: move Dtls13NewEpoch into DeriveTls13Keys 2025-06-09 18:00:23 +02:00
Reda Chouk
92b6e2f2e9 tls13: clear tls1_3 on downgrade
Unset ssl->options.tls1_3 whenever we drop to TLS 1.2 so PSK
handshakes don’t hit -326 VERSION_ERROR.
2025-06-09 17:12:56 +02:00
Maxim Kostin
519b314cf2 Fix formatting inconsistencies in README.md 2025-06-09 17:12:46 +02:00
Marco Oliverio
59ff71f936 fixup! dtls13: move Dtls13NewEpoch into DeriveTls13Keys 2025-06-09 16:11:17 +02:00
Maxim Kostin
7b0b2e9f0c Added AES IV retrieval from TROPIC01 and use of new R-Memory slot definitions 2025-06-09 16:06:56 +02:00
kosmax871
2da1b4e6b2 Merge branch 'wolfSSL:master' into tropic01-dev 2025-06-09 16:01:23 +02:00
Andrew Hutchings
5e6cb2b0b6 Allow trusted_ca_keys with TLSv1.3
It is possible that the client will provied `trusted_ca_keys` during a
TLSv1.3 connection with 1.2 downgrade. wolfSSL would error with
`EXT_NOT_ALLOWED`. The TLSv1.3 spec states that it can be provided and
should be ignored.

ZD 19936
2025-06-09 08:31:54 +01:00
Koji Takeda
0260ff789b Clarify supported PKCS12 encryption algorithms 2025-06-09 12:03:47 +09:00
Marco Oliverio
c1c1929e55 dtls13: move Dtls13NewEpoch into DeriveTls13Keys
Dlts13NewEpoch saves the keys currently derived in the ssl object.
Moving Dtls13NewEpoch inside DeriveTls13Keys avoid the risk of using the wrong
keys when creating a new Epoch.

This fixes at least he following scenario:

- Client has encryption epoch != 2 in the handshake (eg. due to rtx)

- Client derives traffic0 keys after receiving server Finished message

- Client set encryption epoch to 2 again to send the Finished message, this
   override the traffic key computed

- Client creates the new epoch with the wrong key
2025-06-09 02:35:29 +02:00
Hideki Miyazaki
eeb3961b6f fix trailing whitespace 2025-06-07 14:23:59 +09:00
Hideki Miyazaki
0404447bd8 fix typo 2025-06-07 12:46:22 +09:00
Hideki Miyazaki
1f8efc3c14 fix TSIP example
fix Client Certificate Verify using RSA sign/verify
2025-06-07 12:38:18 +09:00
Daniel Pouzzner
ae15693fa8 linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_generate() and wc_linuxkm_drbg_seed(), check retval from wc_LockMutex().
wolfcrypt/src/random.c: in Hash_DRBG_Generate(), restore smallstack path for digest[], but use non-smallstack path for WOLFSSL_LINUXKM.
2025-06-07 07:07:20 +04:00
Josh Holtrop
10b3cc8dd2 Add fork test for RAND_poll() 2025-06-06 20:45:01 -04:00
gojimmypi
3254f56d32 Improve PlatformIO Certificate Bundle Support 2025-06-06 15:48:07 -07:00
JacobBarthelmeh
0bac2c2b34 Merge pull request #8846 from lealem47/zd20027
Don't include AEAD nonce in decrypted data size
2025-06-06 15:43:20 -06:00
Sean Parkinson
8e9e671a5a Merge pull request #8853 from JacobBarthelmeh/pqc
add macro WOLFSSL_ML_KEM_USE_OLD_IDS to PQC CI test
2025-06-07 07:29:33 +10:00
JacobBarthelmeh
369f9f0339 Merge pull request #8849 from holtrop/reseed-drbg-in-rand-poll
Reseed DRBG in RAND_poll()
2025-06-06 11:55:46 -06:00
Maxim Kostin
0fe8fa7645 Add Tropic01_Deinit call in wolfCrypt_Cleanup for proper resource management 2025-06-06 19:46:27 +02:00
JacobBarthelmeh
ae7509e746 Merge pull request #8813 from gojimmypi/espressif-mlkem-support
Adjust Espressif Examples for Post Quantum ML-KEM
2025-06-06 11:41:59 -06:00
JacobBarthelmeh
9ffca6b39c Merge pull request #8822 from kojiws/support_cert_aes_cbc_on_pkcs12_export
Support PBE_AES(256|128)_CBC certificate encryptions on wc_PKCS12_create()
2025-06-06 11:35:13 -06:00
JacobBarthelmeh
45306e9378 Merge pull request #8845 from rlm2002/coverityTests
Coverity: test adjustments and variable checks
2025-06-06 11:29:56 -06:00
JacobBarthelmeh
8a4200eb31 add macro WOLFSSL_ML_KEM_USE_OLD_IDS to PQC CI test 2025-06-06 11:12:37 -06:00
JacobBarthelmeh
f4821eb0f4 Merge pull request #8827 from SparkiDev/ml_kem_codepoints
ML_KEM IDs backward compat
2025-06-06 11:06:15 -06:00
JacobBarthelmeh
570c1fc390 Merge pull request #8824 from JeremiahM37/tlsCurveFix
tls fix for set_groups
2025-06-06 10:47:06 -06:00
Josh Holtrop
0c12337194 Reseed DRBG in RAND_poll() 2025-06-06 12:20:58 -04:00
JacobBarthelmeh
bfc55d9016 Merge pull request #8848 from julek-wolfssl/gh/8841
dtlsProcessPendingPeer: correctly set the current peer
2025-06-06 09:52:35 -06:00
kosmax871
04a1a3fec7 Merge branch 'wolfSSL:master' into tropic01-dev 2025-06-06 17:51:29 +02:00
JacobBarthelmeh
407a1259af Merge pull request #8851 from douzzer/20250606-fixes
Adjustment for warnings with NO_TLS build and add github actions test
2025-06-06 09:46:42 -06:00
Daniel Pouzzner
efc36655e6 src/internal.c: add pedantic-compatible NO_TLS codepath for cipher_names[] and GetCipherNamesSize(). 2025-06-06 18:02:19 +04:00
Daniel Pouzzner
4572dcf9f9 tests/api/test_x509.c: in test_x509_rfc2818_verification_callback(), add dependency on HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES;
wolfcrypt/test/test.c: in lms_test(), fix -Wdeclaration-after-statement;

add .github/workflows/no-tls.yml;

.github/workflows/pq-all.yml: add smallstack scenario.
2025-06-06 17:18:50 +04:00
Sean Parkinson
7eca4fb331 ML_KEM IDs backward compat
Allow backward compatibilitly of Hybrid ML_KEM codepoints in TLS with
version before wolfSSL 5.8.0.
When WOLFSSL_ML_KEM_USE_OLD_IDS is defined, it will accept the old
codepoints for P256 with ML-KEM-512, P384 with ML-KEM-768, P521 with
ML-KEM-10124. (Others combinations were not know pre 5.8.0.)
Both old client with new server and new client with new server work with
old codepoints.
2025-06-06 09:17:40 +10:00
JacobBarthelmeh
3ecc58cc0e Merge pull request #8842 from julek-wolfssl/zd/19966
ALT_NAMES_OID: Mark IP address as WOLFSSL_V_ASN1_OCTET_STRING
2025-06-05 17:07:47 -06:00
Juliusz Sosinowicz
736a5e1f89 dtlsProcessPendingPeer: correctly set the current peer 2025-06-06 00:12:38 +02:00
Lealem Amedie
53f3e74bf1 Sniffer: Don't include AEAD nonce in decrypted data size 2025-06-05 14:13:45 -06:00
Juliusz Sosinowicz
edfc5360d4 TLSX_SupportedCurve_Parse: fix commonCurves wouldn't be free'd on error 2025-06-05 22:04:50 +02:00
Juliusz Sosinowicz
0ac6ca3cf7 Fix hard tabs and c++ style comments 2025-06-05 22:04:50 +02:00
Juliusz Sosinowicz
761f0f1d1f Simplify TLSX_SupportedCurve_Parse
Server only uses curves that are supported by both the client and the server. If no common groups are found, the connection will fail in TLS 1.2 and below. In TLS 1.3, HRR may still be used to resolve the group mismatch.
2025-06-05 22:04:49 +02:00
JeremiahM37
a160ba1379 Supported_group unit test fix 2025-06-05 22:04:49 +02:00
JeremiahM37
9d342bae83 unit tests for set_groups curve fix 2025-06-05 22:04:49 +02:00
JeremiahM37
888407e40b Updated fix for set_groups 2025-06-05 22:04:49 +02:00
JeremiahM37
3c1c4792da tls fix for set_groups 2025-06-05 22:04:49 +02:00
Ruby Martin
a413be1984 remove null assignment, add null check 2025-06-05 12:25:50 -06:00
Juliusz Sosinowicz
f2584fd5fa ALT_NAMES_OID: Mark IP address as WOLFSSL_V_ASN1_OCTET_STRING 2025-06-05 19:17:00 +02:00
JacobBarthelmeh
c207e2d198 Merge pull request #8838 from miyazakh/fsp_fix2
Fix Renesas SCE on RA6M4
2025-06-05 09:43:05 -06:00
Chris Conlon
e51702043f Merge pull request #8837 from BridgerVoss/code_cov
Unit test for Dh.c code coverage
2025-06-05 09:37:42 -06:00
Chris Conlon
a17b3b4985 Merge pull request #8831 from JeremiahM37/UnitTest
Unit test for wolfcrypt pkcs12 file to improve code coverage
2025-06-05 09:30:48 -06:00
JacobBarthelmeh
307840388b Merge pull request #8786 from SparkiDev/lms_kid
LMS: Key ID fixup
2025-06-05 09:22:48 -06:00
Daniel Pouzzner
dbc34352c7 linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_seed(), prefix the supplied seed with the CPU ID of each DRBG, to avoid duplicate states;
wolfcrypt/src/random.c: in Hash_DRBG_Generate(), always put digest[] on the stack even in WOLFSSL_SMALL_STACK configuration (it's only 32 bytes);

configure.ac: default smallstackcache on when linuxkm-defaults.
2025-06-05 16:31:46 +04:00
Daniel Pouzzner
29cf3eb84e linuxkm/lkcapi_sha_glue.c: refactor DRBG wrapper to instantiate one DRBG per core, to relieve contention. 2025-06-05 09:18:18 +04:00
Sean Parkinson
fbc483e23a Merge pull request #8833 from rlm2002/AppleNativeCert
domain name policy for WOLFSSL_APPLE_NATIVE_CERT_VALIDATION
2025-06-05 12:22:20 +10:00
Brett
89be92f1a8 formatting 2025-06-04 18:29:05 -06:00
Koji Takeda
1f78923590 Add a test for mixture of algorithms 2025-06-05 09:26:44 +09:00
Sean Parkinson
640b060792 LMS: Key ID fixup
Fix implementation for extracting from private key data.
Add implementation that gets Key ID from wc_LmsKey.
2025-06-05 10:25:47 +10:00
Brett
0e2a3fd0b6 add missing error trace macro 2025-06-04 16:56:16 -06:00
JeremiahM37
a6580d3916 Unit test for wolfcrypt pkcs12 file to improve code coverage 2025-06-04 16:01:35 -06:00
Bridger Voss
80c6ac141a Unit test for Dh.c wc_DhSetNamedKey code coverage 2025-06-04 15:48:52 -06:00
Brett
bc8eeea703 prevent apple native cert validation from overriding error codes other than ASN_NO_SIGNER_E 2025-06-04 15:48:15 -06:00
Chris Conlon
50471342b3 Merge pull request #8819 from sebastian-carpenter/asn-allow-0-serial-make-check-fail
WOLFSSL_ASN_ALLOW_0_SERIAL not handled in make check
2025-06-04 13:39:55 -06:00
Sebastian Carpenter
a29d12fd3f WOLFSSL_ASN_ALLOW_0_SERIAL not handled in make check
test_MakeCertWith0Ser needed an extra #define check for WOLFSSL_ASN_ALLOW_0_SERIAL. Previously, it was validating that a 0 serial should not work -> now it validates that a 0 serial does work.
2025-06-04 12:21:41 -06:00
Lealem Amedie
02a49693e2 Fix bug in ParseCRL_Extensions 2025-06-04 10:23:53 -06:00
Koji Takeda
7c33096398 Support PBE_AES256_CBC and PBE_AES128_CBC cert encryption on wc_PKCS12_create() 2025-06-04 16:43:30 +09:00
Hideki Miyazaki
e633dd7537 trailing whitespace 2025-06-04 13:41:01 +09:00
Hideki Miyazaki
4aea2a1cd2 Update README to add SEGGER_RTT control block 2025-06-04 13:41:01 +09:00
Hideki Miyazaki
8445e66ceb Update signed certificate 2025-06-04 13:41:01 +09:00
Hideki Miyazaki
6d2a8b3f4c ready-for-use flag fix 2025-06-04 13:41:01 +09:00
Sean Parkinson
7898823d42 Merge pull request #8834 from JacobBarthelmeh/sp_int
Comment to avoid older versions of clang-tidy false positive
2025-06-04 11:15:54 +10:00
JacobBarthelmeh
c1b683f307 add clang-tidy lint comment to avoid false positive 2025-06-03 14:44:01 -06:00
Ruby Martin
9864959e41 create policy for WOLFSSL_APPLE_NATIVE_CERT_VALIDATION, domain name
checking
2025-06-03 10:08:58 -06:00
JacobBarthelmeh
b34fd2f685 Merge pull request #8829 from gojimmypi/pr-espressif-time-correction
Correct Espressif default time setting
2025-06-02 17:03:06 -06:00
gojimmypi
a9db6d08f7 Adjust Espressif Examples for Post Quantum ML-KEM 2025-06-02 15:11:53 -07:00
gojimmypi
1aa97a9070 Correct Espressif default time setting 2025-06-02 15:04:49 -07:00
Maxim Kostin
e635afd26a Refactor Tropic01 interface: clean up code formatting and improve function declarations 2025-06-02 20:12:41 +02:00
JacobBarthelmeh
ecb8cb744e Merge pull request #8799 from dgarske/csharp_wince_unicode
Fix issue with CSharp and Windows CE with conversion of ASCII and Unicode
2025-06-02 10:39:23 -06:00
kosmax871
66b0a5bd02 Merge branch 'wolfSSL:master' into tropic01-dev 2025-06-01 09:35:34 +02:00
David Garske
30490f9650 Merge pull request #8828 from douzzer/20250531-wc_linuxkm_fpu_state_assoc-optimize
20250531-wc_linuxkm_fpu_state_assoc-optimize
2025-05-31 09:23:59 -07:00
Daniel Pouzzner
8c33f47a85 linuxkm/x86_vector_register_glue.c: fix overhead in wc_linuxkm_fpu_state_assoc() from pointless full searches of wc_linuxkm_fpu_states. 2025-05-31 00:23:32 -05:00
Daniel Pouzzner
a6e9bd73e4 Merge pull request #8803 from dgarske/csr_nomalloc
Refactor to support CSR generation and signing with `WOLFSSL_NO_MALLOC`
2025-05-30 18:05:25 -05:00
philljj
316681be2a Merge pull request #8826 from douzzer/20250530-ML-KEM-WC_SHA3_NO_ASM
20250530-ML-KEM-WC_SHA3_NO_ASM
2025-05-30 16:25:48 -05:00
Daniel Pouzzner
dd6e6015ea wolfcrypt/src/wc_mlkem.c: add setup for WC_MLKEM_NO_ASM. 2025-05-30 14:51:52 -05:00
Daniel Pouzzner
0bdf8b54db wolfssl/wolfcrypt/sha3.h: in asm prototypes section, snip out redundant prototypes for BlockSha3(), and add indentation for clarity. 2025-05-30 14:16:25 -05:00
Daniel Pouzzner
8256e42178 .github/workflows/wolfCrypt-Wconversion.yml: fix apt-get to update first. 2025-05-30 13:56:14 -05:00
Daniel Pouzzner
6a5dc482fd linuxkm/Kbuild: set OBJECT_FILES_NON_STANDARD=y for wolfcrypt/src/wc_mlkem_asm.o ("'naked' return found"). 2025-05-30 13:39:33 -05:00
Daniel Pouzzner
8f347e68f5 wolfcrypt/src/wc_mlkem_poly.c and configure.ac: add support for WC_MLKEM_NO_ASM, and add gates to support WC_SHA3_NO_ASM;
wolfcrypt/src/sha3.c and wolfssl/wolfcrypt/sha3.h: BlockSha3() now always WOLFSSL_LOCAL (never static) to support calls from MLKEM implementation.
2025-05-30 13:31:40 -05:00
Maxim Kostin
22a4cf2422 Merge branch 'tropic01-dev' of github.com:kosmax871/wolfssl into tropic01-dev 2025-05-30 15:31:47 +02:00
Maxim Kostin
698ca29326 Changes for the PR https://github.com/wolfSSL/wolfssl/pull/8812 2025-05-30 11:21:28 +02:00
Daniel Pouzzner
5c21551808 Merge pull request #8816 from philljj/crypto_sig_sign_ret_value
linuxkm rsa: fix ret value usage for crypto_sig_sign.
2025-05-29 22:44:13 -05:00
philljj
9bd58344d9 Merge pull request #8817 from douzzer/20250529-WC_SHA3_NO_ASM
20250529-WC_SHA3_NO_ASM
2025-05-29 22:24:36 -05:00
David Garske
165f868be1 Fix for warning: ‘free’ called on unallocated object ‘buf’. 2025-05-29 17:15:55 -07:00
Daniel Pouzzner
aeae9cb3b6 Merge pull request #8807 from philljj/linuxkm_ecdsa_small_cleanup
linuxkm ecdsa: small debug msg cleanup.
2025-05-29 17:16:40 -05:00
jordan
0b64a5549c linuxkm rsa: fix ret value usage for crypto_sig_sign. 2025-05-29 16:22:40 -05:00
Daniel Pouzzner
245042a342 add WC_SHA3_NO_ASM, mainly for the benefit of linuxkm-defaults and KASAN compatibility. 2025-05-29 16:21:34 -05:00
philljj
429ed8d0be Merge pull request #8814 from douzzer/20250529-linuxkm-fix-AesGcmCrypt_1-no-stream
20250529-linuxkm-fix-AesGcmCrypt_1-no-stream
2025-05-29 14:36:07 -05:00
Daniel Pouzzner
4d19f55c3f linuxkm/lkcapi_aes_glue.c: in AesGcmCrypt_1(), in !WOLFSSL_AESGCM_STREAM version, don't call skcipher_walk_done(&sk_walk, ...) -- doesn't work, and not needed. 2025-05-29 12:10:02 -05:00
kosmax871
daf5d4b015 Update README.md 2025-05-29 12:43:52 +02:00
Maxim Kostin
7e25669e6f Refactor TROPIC01 integration: update README, enhance pairing key handling, and improve error messages 2025-05-29 12:25:12 +02:00
Daniel Pouzzner
2a9269e654 Merge pull request #8796 from philljj/linuxkm_rsa_sig
linuxkm rsa: add sig_alg support for linux 6.13
2025-05-29 01:15:13 -05:00
philljj
8ce0a3bf83 Merge pull request #8810 from douzzer/20250528-linuxkm-aes-kmemleaks
20250528-linuxkm-aes-kmemleaks
2025-05-28 19:45:49 -05:00
David Garske
18aab1a883 Further improvements to MultiByte and WideChar conversions. 2025-05-28 15:35:10 -07:00
Daniel Pouzzner
5c0a278c7f linuxkm/lkcapi_aes_glue.c: add error path cleanups for dangling skcipher_walks. 2025-05-28 16:30:43 -05:00
David Garske
5c82757eb4 Merge pull request #8809 from douzzer/20250528-fix-mldsa_nosign
20250528-fix-mldsa_nosign
2025-05-28 14:12:06 -07:00
Daniel Pouzzner
b9ef6c583a wolfcrypt/test/test.c: in test_dilithium_decode_level(), on early malloc failure, stay in the flow to assure cleanup;
.wolfssl_known_macro_extras: remove unneeded entry for WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC.
2025-05-28 12:48:36 -05:00
Maxim Kostin
1c45d155d1 README.md added 2025-05-28 19:01:12 +02:00
jordan
7212fd0483 linuxkm ecdsa: small debug msg cleanup. 2025-05-28 11:43:44 -05:00
Sean Parkinson
8ea01056c3 Merge pull request #8788 from julek-wolfssl/gh/8765
tls13: handle malformed CCS and CCS before CH
2025-05-28 09:45:09 +10:00
David Garske
3032e977a8 Merge pull request #8802 from kojo1/csharp
fix C# Release build
2025-05-27 15:46:28 -07:00
David Garske
6de7bb74ed Merge pull request #8787 from julek-wolfssl/refactor-GetHandshakeHeader
Refactor GetHandshakeHeader/GetHandShakeHeader into one
2025-05-27 15:26:24 -07:00
David Garske
482f2bdd2a Refactor to support CSR generation and signing with WOLFSSL_NO_MALLOC. Also for DSA. Don't test no malloc with ECC custom curves. 2025-05-27 14:51:16 -07:00
Sean Parkinson
71a9e48701 Merge pull request #8801 from rlm2002/coverity
coverity: misc changes to api.c
2025-05-28 07:28:40 +10:00
Daniel Pouzzner
8179367412 Merge pull request #8798 from dgarske/mldsa_nosign
Fix for ML-DSA with `WOLFSSL_DILITHIUM_NO_SIGN`
2025-05-27 14:44:44 -05:00
Maxim Kostin
0f2d965d81 ed25519 fixes 2025-05-27 21:28:59 +02:00
Ruby Martin
2eddc32eed coverity: fix use after free, improper use of negative value, initialize src variable 2025-05-27 09:43:44 -06:00
Maxim Kostin
7696e33d7d added support of ED25519 2025-05-26 21:58:06 +02:00
Sean Parkinson
6c7edeba38 Merge pull request #8800 from douzzer/20250523-WC_NID_netscape_cert_type
20250523-WC_NID_netscape_cert_type
2025-05-26 08:19:22 +10:00
kosmax871
6f48851862 some fixes and updates 2025-05-25 20:43:56 +02:00
Takashi Kojo
7b8f30bb25 fix Release build 2025-05-24 14:03:55 +09:00
jordan
da9410565d linuxkm rsa: km_pkcs1_sign should return sig_len on success. 2025-05-23 22:29:16 -05:00
Daniel Pouzzner
ec842be582 wolfssl/wolfcrypt/asn.h: add a real value for WC_NID_netscape_cert_type. 2025-05-23 14:05:51 -05:00
Juliusz Sosinowicz
2ec6b92b41 tls13: handle malformed CCS and CCS before CH
- fix incorrect alert type being sent
- error out when we receive a CCS before a CH
- error out when we receive an encrypted CCS
2025-05-23 15:04:22 +02:00
Sean Parkinson
999641d9b1 Merge pull request #8642 from rizlik/dtls_no_span_records
DTLS: drop records that span datagrams
2025-05-23 14:57:24 +10:00
David Garske
db0b0e28d2 Fix issue with CSharp and Windows CE with conversion of ASCII->Unicode and Unicode->ASCII with odd length and extra null terminator. 2025-05-22 16:34:54 -07:00
Sean Parkinson
d1312c87bb Merge pull request #8792 from rlm2002/coverity-src
Coverity: remove dead code issue in ssl.c
2025-05-23 09:27:39 +10:00
Sean Parkinson
2ecd4d75e3 Merge pull request #8795 from dgarske/stm32_aes_gcm_oldcube
Fix for STM32 AES GCM and older STM32Cube HAL that does not support `HeaderWidthUnit`
2025-05-23 08:00:35 +10:00
Sean Parkinson
fb6f0c8b73 Merge pull request #8797 from douzzer/20250522-FIPS-v5-no-implicit-DES
20250522-FIPS-v5-no-implicit-DES
2025-05-23 07:50:34 +10:00
David Garske
607d7489bc Add no malloc support for Dilithium tests. Fixes for WOLFSSL_DILITHIUM_NO_ASN1. 2025-05-22 14:34:34 -07:00
Ruby Martin
5352e100db Add NO_OLD_TLS macroguard, remove dead code 2025-05-22 14:21:38 -06:00
Daniel Pouzzner
b06a921697 tests/api.c: add missing NO_SHA gates in test_wc_PKCS12_create(). 2025-05-22 14:56:31 -05:00
David Garske
d0085834cd Fix for ML-DSA with WOLFSSL_DILITHIUM_NO_SIGN. ZD 19948. 2025-05-22 12:36:46 -07:00
Daniel Pouzzner
7e9460c377 configure.ac: remove implicit enablements of DES/DES3 on FIPS v5+. 2025-05-22 14:19:28 -05:00
jordan
402ebec3b7 linuxkm rsa: comments, cleanup work buffer useage. 2025-05-22 11:07:36 -05:00
kosmax871
b366f814c7 Draft of readme.md 2025-05-22 14:40:11 +02:00
kosmax871
95007de18a Support for static libraries 2025-05-22 14:22:40 +02:00
Sean Parkinson
807e95f35f Merge pull request #8785 from julek-wolfssl/checkGroup
TLSX_UseSupportedCurve: Check group correctness outside of TLS 1.3 too
2025-05-22 14:10:14 +10:00
David Garske
cc78e3f5d1 Fix for older STM32Cube HAL that does not support hcryp->Init.HeaderWidthUnit. ZD 19926. 2025-05-21 16:42:52 -07:00
Sean Parkinson
9fdb40caa4 Merge pull request #8790 from philljj/fix_coverity
coverity: misc fixes
2025-05-22 08:40:59 +10:00
Sean Parkinson
85a4e34705 Merge pull request #8782 from kojiws/support_aes_cbc_pkcs12_export
Support PBE_AES(256|128)_CBC key encryptions on wc_PKCS12_create()
2025-05-22 08:39:11 +10:00
Sean Parkinson
2398a94cf8 Merge pull request #8784 from rlm2002/coverity
coverity: init dgst variable test_sha3.c and issues in api.c
2025-05-22 08:34:11 +10:00
Sean Parkinson
005ce08380 Merge pull request #8794 from kareem-wolfssl/multiFixes
Add missing DH_MAX_SIZE define for FIPS, correct wolfssl.rc FILETYPE to VFT_DLL
2025-05-22 08:26:24 +10:00
jordan
54104887ca linuxkm rsa: clean up duplicate code. 2025-05-21 16:59:02 -05:00
jordan
d396987863 linuxkm rsa: don't forget to unregister pkcs1pad akcipher. 2025-05-21 16:32:39 -05:00
jordan
8fef82cc59 linuxkm rsa: linux 6.13 support. 2025-05-21 16:07:46 -05:00
Kareem
08f063d8b3 Correct wolfssl.rc FILETYPE to VFT_DLL. It was previously set to 0x7L which is VFT_STATIC_LIB. 2025-05-21 12:34:09 -07:00
Kareem
4d63d7dedf Fix missing DH_MAX_SIZE define when building FIPS 140-3 with OpenSSL compatibility layer dh.h. 2025-05-21 12:33:37 -07:00
philljj
be5b62b1a1 Merge pull request #8791 from douzzer/20250521-fix-WC_SIPHASH_NO_ASM
20250521-fix-WC_SIPHASH_NO_ASM
2025-05-21 12:23:46 -05:00
Daniel Pouzzner
e2def987d4 wolfcrypt/src/siphash.c: for WC_SIPHASH_NO_ASM, don't define WOLFSSL_NO_ASM if it's already defined. 2025-05-21 10:03:10 -05:00
Ruby Martin
a170624118 coverity: init dgst variable test_sha3.c
improper use of neg val api.c

copy-paste error in test_wolfSSL_PEM_read_bio_ECPKParameters
2025-05-21 08:29:44 -06:00
Sean Parkinson
dfe0684bc7 Merge pull request #8789 from douzzer/20250520-WC_SIPHASH_NO_ASM
20250520-WC_SIPHASH_NO_ASM
2025-05-21 07:29:53 +10:00
Daniel Pouzzner
a01fb2a61c wolfcrypt/src/siphash.c: honor WC_SIPHASH_NO_ASM; configure.ac: add -DWC_SIPHASH_NO_ASM when ENABLED_LINUXKM. 2025-05-20 13:03:58 -05:00
Juliusz Sosinowicz
5e7ef142e8 Refactor GetHandshakeHeader/GetHandShakeHeader into one 2025-05-20 13:23:14 +02:00
jordan
c619c19a1d asn: add underflow check to idx. 2025-05-19 19:04:27 -05:00
Maxim Kostin
cbcd7bca2c added support for Tropic01 crypto callbacks 2025-05-19 21:41:49 +02:00
Koji Takeda
3666851589 Support PBE_AES256_CBC and PBE_AES128_CBC key encryption on wc_PKCS12_create() 2025-05-19 22:26:46 +09:00
Juliusz Sosinowicz
83ce63ac1a TLSX_UseSupportedCurve: Check group correctness outside of TLS 1.3 too 2025-05-19 14:19:59 +02:00
Marco Oliverio
cbe1fb2c62 dtls: drop DTLS messages that span across datagrams
A new macro "WOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS" restores the old
behaviour.
2025-05-19 10:28:13 +02:00
Marco Oliverio
23b73bb298 test_memio: preserve write boundaries in reads 2025-05-19 10:25:24 +02:00
Marco Oliverio
80bdd1736a internal: refactor out Decryption in DoDecrypt function
To uniform error handling for the SanityCheckCipherText check.
2025-05-19 10:25:24 +02:00
JacobBarthelmeh
05bc7e0d2f Merge pull request #8783 from douzzer/20250516-remove-implicit-WOLFSSL_DEBUG_CERTIFICATE_LOADS
20250516-remove-implicit-WOLFSSL_DEBUG_CERTIFICATE_LOADS
2025-05-16 17:06:18 -06:00
Daniel Pouzzner
3ab16257b0 wolfssl/wolfcrypt/logging.h: don't define WOLFSSL_DEBUG_CERTIFICATE_LOADS just because defined(DEBUG_WOLFSSL). 2025-05-16 16:53:10 -05:00
Daniel Pouzzner
4495da457a Merge pull request #8778 from rlm2002/ghi8772
add NULL reference checks to RSA functions
2025-05-16 16:41:43 -05:00
Ruby Martin
7ae2c24ac4 add NULL reference checks to RSA functions 2025-05-16 14:00:35 -06:00
Daniel Pouzzner
91af9073b0 Merge pull request #8777 from rizlik/dtls_reject_v11
Drop DTLS packets with bogus minor version number
2025-05-16 14:45:25 -05:00
Daniel Pouzzner
e67536cb15 Merge pull request #8775 from rlm2002/coverity
Coverity: address uninitialized scalar variable issues
2025-05-16 14:44:38 -05:00
Daniel Pouzzner
56b43e5948 Merge pull request #8776 from anhu/no_server_with_opensslall
Allow tests to build with opensslall and no server.
2025-05-16 13:28:48 -05:00
Daniel Pouzzner
5abe5df498 Merge pull request #8760 from miyazakh/benchmark_up
Guard some benchmark tests by NO_SW_BENCH
2025-05-16 12:42:59 -05:00
Kaleb Himes
25e3a2d34f Merge pull request #8780 from douzzer/20250515-fips-armasm-fixes
20250515-fips-armasm-fixes
2025-05-16 11:12:16 -06:00
David Garske
69ae36a1b6 Merge pull request #8781 from night1rider/zephyr-mlkem-update
updating kyber to mlkem arm file for zephyr
2025-05-16 09:21:19 -07:00
Ruby Martin
e998a4c2fc fix off-by-one error in asn.c 2025-05-16 08:26:19 -06:00
night1rider
229141fd51 updating kyber to mlkem arm file for zephyr 2025-05-15 21:55:36 -06:00
Daniel Pouzzner
77bebff341 fixes for armasm:
configure.ac: set DEFAULT_ENABLED_ALL_ASM=no if FIPS <v6 and not on amd64 (i.e. if ARM);

tests/api/test_sha256.c: skip test_wc_Sha256_Flags() and test_wc_Sha224_Flags() if armasm and FIPS <v7;

wolfssl/wolfcrypt/settings.h: define WOLFSSL_SP_INT_DIGIT_ALIGN for ARM (needed on BE, and no effect on LE).
2025-05-15 21:20:10 -05:00
Daniel Pouzzner
8a8a2b5bb1 .github/workflows/smallStackSize.yml: don't install multilib (not needed). 2025-05-15 21:13:50 -05:00
Ruby Martin
2940a16c10 coverity: initialize variables for api.c, test_digest.h, and test_sha3.c 2025-05-15 16:55:34 -06:00
David Garske
081b8397c0 Merge pull request #8779 from douzzer/20250515-smallstack-refactors-and-tests
20250515-smallstack-refactors-and-tests
2025-05-15 15:02:58 -07:00
Daniel Pouzzner
401868908a add .github/workflows/smallStackSize.yml;
smallstack refactors in
* wolfcrypt/src/asn.c : wc_GetSubjectPubKeyInfoDerFromCert(),
* wolfcrypt/src/dilithium.c : dilithium_sign_with_seed_mu(),
* wolfcrypt/src/ecc.c : wc_ecc_mulmod_ex2(),
* wolfcrypt/src/wc_mlkem.c : mlkemkey_decapsulate(),
* and wolfcrypt/src/wc_mlkem_poly.c : mlkem_gen_matrix_k*_avx2() and mlkem_get_noise_k2_avx2();

wolfcrypt/test/test.c: in TEST_PASS(), fix STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK to honor TEST_ALWAYS_RUN_TO_END.
2025-05-15 15:28:11 -05:00
David Garske
a1b644202c Merge pull request #8759 from anhu/index_idx
Rename variable index to idx to avoid conflicting declaration.
2025-05-15 11:01:27 -07:00
David Garske
63c3c547b6 Merge pull request #8768 from lealem47/zd19853
Add sniffer cleanup API's
2025-05-15 11:01:19 -07:00
David Garske
c13be21a90 Merge pull request #8755 from AlexLanzano/pqc-gcc-error
Remove redefinition of MlKemKey and Fix build issue in benchmark
2025-05-15 11:00:40 -07:00
Marco Oliverio
22f41a8dbb Drop DTLS packets with bogus minor version number 2025-05-15 19:50:36 +02:00
Andrew Hutchings
6790c95e94 Merge pull request #8745 from dgarske/stm32_crypt_header_width
Fix edge case issue with STM32 AES GCM auth padding
2025-05-15 16:51:52 +01:00
Anthony Hu
a613fc28d6 Allow tests to build with opensslall and no server. 2025-05-15 11:18:15 -04:00
David Garske
2ac4be3f22 Merge pull request #8773 from douzzer/20250514-linuxkm-and-sp-tweaks
20250514-linuxkm-and-sp-tweaks
2025-05-14 19:54:48 -07:00
Daniel Pouzzner
baaab4ccac Merge pull request #8722 from anhu/undef_def
Do not allow define of max to interfere with pthreads
2025-05-14 18:44:57 -05:00
Daniel Pouzzner
c201006a26 wolfcrypt/src/sp_int.c: move setup for -Wno-array-bounds when WOLFSSL_SP_DYN_STACK, to follow sp_int.h include. 2025-05-14 18:20:08 -05:00
Anthony Hu
a814683684 Rename variable index to idx to avoid conflicting declaration. 2025-05-14 18:26:37 -04:00
Daniel Pouzzner
c8b507d246 wolfssl/wolfcrypt/sp_int.h: refactor SP_WORD_SIZEOF as a simple numeric literal, and use them for XALIGNED() for Windows portability. 2025-05-14 16:54:49 -05:00
Daniel Pouzzner
55bbd84445 wolfssl/wolfcrypt/sp_int.h and wolfcrypt/src/sp_int.c: add WOLFSSL_SP_DYN_STACK macro to orthogonalize gnarly setup logic, and refactor to use it throughout; refactor several more sp_int stack-allocated data buffers as sp_int_digit[]s rather than char[]s. 2025-05-14 15:39:37 -05:00
Daniel Pouzzner
f0f4084f94 linuxkm/lkcapi_dh_glue.c: never install DH/FFDHE on kernel <5.18 -- DH secrets have a different format before that version, and FFDHE (CONFIG_CRYPTO_DH_RFC7919_GROUPS) was introduced in 5.18 and is the only FIPS-allowed DH variant. 2025-05-14 15:39:37 -05:00
David Garske
49d9bfa160 Merge pull request #8758 from bigbrett/exportx509pubkey-api
Added new ASN X509 API: `wc_GetSubjectPubKeyInfoDerFromCert`
2025-05-14 12:28:45 -07:00
Lealem Amedie
4af0e14e7b Add ssl_RemoveSession API 2025-05-14 12:09:41 -06:00
Brett Nicholas
40c9a03ebe rename function args to match implementation 2025-05-14 11:31:36 -06:00
David Garske
6270429089 Fix STM32MP13x STM32 AES GCM. 2025-05-14 10:27:01 -07:00
David Garske
4fd76dae95 Add portability fix for new INT_MAX required on all TLS limit checking (added in 91aad90c59 Jan 24, 2025). 2025-05-14 10:27:01 -07:00
David Garske
7a936d731d Fix edge case issue with STM32 AES GCM auth padding. Issue introduced in PR #8584. Fixes ZD 19783
Added way to override STM_CRYPT_HEADER_WIDTH.
2025-05-14 10:27:01 -07:00
David Garske
813e36a823 Merge pull request #8770 from douzzer/20250514-WOLFSSL_DEBUG_PRINTF-C89
20250514-WOLFSSL_DEBUG_PRINTF-C89
2025-05-14 08:50:46 -07:00
Alex Lanzano
88ae4266cf Don't define PQC option strings in benchmark if WOLFSSL_BENCHMARK_ALL is defined
This fixes the 'defined but not used' build issue in benchmark.c if any PQC algos are enabled
and WOLFSSL_BENCHMARK_ALL is defined.
2025-05-14 08:54:59 -04:00
Daniel Pouzzner
8035667d9b wolfssl/wolfcrypt/logging.h and wolfcrypt/src/logging.c: add WOLFSSL_DEBUG_PRINTF_FN and WOLFSSL_DEBUG_PRINTF_FIRST_ARGS, and update refactored wolfssl_log(), for C89 compat. 2025-05-14 03:21:28 -05:00
Daniel Pouzzner
c5021c0690 wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mulmod(). 2025-05-14 03:18:35 -05:00
Hideki Miyazaki
9b7a95e338 gurd tests NO_SW_BENCH 2025-05-14 14:52:51 +09:00
David Garske
cd79be4928 Merge pull request #8769 from douzzer/20250513-WOLFSSL_DEBUG_PRINTF-WOLFSSL_DEBUG_CERTIFICATE_LOADS
20250513-WOLFSSL_DEBUG_PRINTF-WOLFSSL_DEBUG_CERTIFICATE_LOADS
2025-05-13 21:15:43 -07:00
Daniel Pouzzner
9d722b3a6c purge baltimore-cybertrust-root.pem from certs/external/include.am and scripts/. 2025-05-13 20:52:08 -05:00
Daniel Pouzzner
55460a5261 wolfssl/wolfcrypt/logging.h and wolfcrypt/src/logging.c: add
WOLFSSL_DEBUG_PRINTF() macro adapted from wolfssl_log(), refactor
  wolfssl_log() to use it, and move printf setup includes/prototypes from
  logging.c to logging.h;

src/ssl_load.c: add source_name arg and WOLFSSL_DEBUG_CERTIFICATE_LOADS clauses
  to ProcessBuffer() and ProcessChainBuffer(), and pass reasonable values from
  callers;

remove expired "Baltimore CyberTrust Root" from certs/external/ca_collection.pem
  and certs/external/baltimore-cybertrust-root.pem.
2025-05-13 20:30:48 -05:00
Lealem Amedie
5a4c1d99a3 Expose RemoveStaleSessions sniffer API 2025-05-13 15:16:02 -06:00
JacobBarthelmeh
336b374b9c Merge pull request #8753 from dgarske/gcc4_portability
Improvements for portability using older gcc 4.8.2
2025-05-13 13:12:31 -06:00
Daniel Pouzzner
5f2a43f01f Merge pull request #8766 from dgarske/static_ephemeral
Fix for Curve25519 and static ephemeral issue with blinding
2025-05-12 15:18:37 -05:00
Brett Nicholas
2151a1b8a1 review comments 2025-05-12 11:43:56 -06:00
David Garske
e09e3f6098 Fix for Curve25519 and static ephemeral issue with curve25519 blinding. Added new test case (used by wolfKeyMgr). 2025-05-12 10:26:31 -07:00
David Garske
ed6f853b9c Merge pull request #8763 from douzzer/20250511-fixes
20250511-fixes
2025-05-12 08:48:37 -07:00
David Garske
110504acd6 Merge pull request #8761 from douzzer/20250510-SP-dyn-stack-tweaks-and-workaround
20250510-SP-dyn-stack-tweaks-and-workaround
2025-05-12 08:48:10 -07:00
Anthony Hu
af29a59325 Do not allow define of max to interfere with pthreads 2025-05-12 11:39:07 -04:00
Daniel Pouzzner
e19295bb64 wolfssl/wolfcrypt/settings.h: #define WOLFSSL_CURVE25519_BLINDING if defined(NO_CURVED25519_X64);
wolfcrypt/src/curve25519.c: if defined(NO_CURVED25519_X64), #undef USE_INTEL_SPEEDUP;

wolfcrypt/src/fe_operations.c: fixes for -m32 -Wconversions;

.github/workflows/wolfCrypt-Wconversion.yml: add -m32 scenario;

.wolfssl_known_macro_extras: remove unneeded entry for WOLFSSL_CURVE25519_BLINDING.
2025-05-11 12:06:23 -05:00
David Garske
b1cf5df2c2 Merge pull request #8762 from douzzer/20250510-testwolfcrypt-fix-exit-status
20250510-testwolfcrypt-fix-exit-status
2025-05-10 11:54:36 -07:00
Daniel Pouzzner
001a5ef897 wolfcrypt/test/test.c: in main(), return (exit with) 0 for success and 1 for failure. 2025-05-10 12:08:50 -05:00
Daniel Pouzzner
5a911f6af0 wolfssl/wolfcrypt/sp_int.h: wc_static_assert(), not static_assert(). 2025-05-10 02:16:48 -05:00
Daniel Pouzzner
8410d922db .wolfssl_known_macro_extras: remove WOLFSSL_CURVE25519_BLINDING (defined in settings.h since aa840f9c94). 2025-05-10 01:31:45 -05:00
Daniel Pouzzner
c967dd2a30 wolfcrypt/src/sp_int.c and wolfssl/wolfcrypt/sp_int.h: add
MP_INT_SIZEOF_DIGITS() macro, and use it for stack allocations in DECL_SP_INT()
  and DECL_SP_INT_ARRAY();

  refactor _sp_submod() to use DECL_SP_INT() rather than DECL_SP_INT_ARRAY() to
  work around apparent optimizer bug in gcc-15.
2025-05-10 01:28:17 -05:00
Daniel Pouzzner
d232680e9c Merge pull request #8749 from philljj/linuxkm_aes_debug_msgs
linuxkm aes: add debug msgs.
2025-05-09 16:46:44 -05:00
Brett Nicholas
79f214f73c add new X509 API: wc_Exportx509PubKeyWithSpki 2025-05-09 14:40:20 -06:00
JacobBarthelmeh
8e0aefd321 Merge pull request #8725 from AlexLanzano/no-malloc-support
Add support for no malloc with `wc_CheckCertSigPubKey`
2025-05-09 14:23:47 -06:00
philljj
3d92eb6d2e Merge pull request #8756 from douzzer/20250509-linuxkm-lkcapi-rsa-pkcs1-precedence
20250509-linuxkm-lkcapi-rsa-pkcs1-precedence
2025-05-09 13:59:09 -05:00
David Garske
68b83bfa14 Merge pull request #8711 from JacobBarthelmeh/coverity
fix for sanity check on --group with unit test app and null sanity check with des decrypt
2025-05-09 11:41:53 -07:00
David Garske
407efd3c5d Merge pull request #8710 from JacobBarthelmeh/codesonar
ech get length fix and x509 extension print temporary buffer size
2025-05-09 11:41:24 -07:00
David Garske
7cd080b421 Merge pull request #8713 from JacobBarthelmeh/scan
use proper heap hint when free'ing CRL in error case
2025-05-09 11:23:20 -07:00
David Garske
0adb6eb788 Merge pull request #8748 from ColtonWilley/pkcs7_x509_store_update
Update PKCS7 to use X509 STORE for internal verification
2025-05-09 11:22:53 -07:00
Daniel Pouzzner
b6f6d8ffda linuxkm/lkcapi_glue.c: reorder registration of AES and SHA algs to put composite first and primitive last, to prevent kernel dynamic synthesis of the composites. 2025-05-09 12:12:15 -05:00
Alex Lanzano
76fd5319d4 Remove redefinition of MlKemKey
Removes the redundant typedef of MlKemKey which will break builds on
pre-C11 compilers. KyberKey is defined as a macro for MlKemKey.
2025-05-09 10:42:15 -04:00
Sean Parkinson
9d1bf83a43 Merge pull request #8736 from JacobBarthelmeh/build
adjust default build with curve25519
2025-05-09 20:24:53 +10:00
Daniel Pouzzner
707505d31d linuxkm/lkcapi_glue.c: in linuxkm_lkcapi_register(), register PKCS1 algs before direct_rsa, to prevent kernel from synthesizing conflicting PKCS1 implementations. for good measure, move raw DH after FFDHE too. 2025-05-09 00:40:30 -05:00
David Garske
82cb83abee Improvements for portability using older gcc 4.8.2 and customer parsing tools. 2025-05-08 17:02:27 -07:00
Sean Parkinson
4f07f6a9c1 Merge pull request #8750 from anhu/crl_RefFree
Add missing call to wolfSSL_RefFree in FreeCRL
2025-05-09 08:24:10 +10:00
philljj
96c15b3a87 Merge pull request #8751 from douzzer/20250508-linuxkm-lkcapi-ECDH-never-fips_enabled
20250508-linuxkm-lkcapi-ECDH-never-fips_enabled
2025-05-08 14:59:48 -05:00
JacobBarthelmeh
77c0f79cbe adjust ech get length only case 2025-05-08 13:50:42 -06:00
JacobBarthelmeh
9fb34d76c2 adjust size of temporary buffer 2025-05-08 13:50:42 -06:00
JacobBarthelmeh
6f1fe2e4b9 add sanity check on des cbc decrypt, CID 512990 2025-05-08 13:50:02 -06:00
JacobBarthelmeh
f96e493790 help static analyzer out, CID 516263 2025-05-08 13:50:02 -06:00
JacobBarthelmeh
ea03decf60 fix for --group argument test, CID 516265 2025-05-08 13:50:02 -06:00
JacobBarthelmeh
ae4a4236cc fix for index value with curve25519 2025-05-08 13:42:02 -06:00
jordan
b3d330258f linuxkm aes: cleanup. 2025-05-08 14:32:42 -05:00
Daniel Pouzzner
0532df5ce1 configure.ac: further fixes+cleanups for curve25519/ed25519 feature setup. now recognizes =asm as an override optionally preventing implicit noasm (linuxkm), and fixes wrong -DHAVE_CURVE25519 added to flags in FIPS builds. 2025-05-08 12:20:05 -05:00
Daniel Pouzzner
ac7326d272 linuxkm/lkcapi_glue.c: for LINUXKM_LKCAPI_REGISTER_ECDH, always clear fips_enabled (see comment for details). 2025-05-08 12:13:06 -05:00
Anthony Hu
42fb041890 Add missing call to wolfSSL_RefFree in FreeCRL 2025-05-08 13:11:37 -04:00
jordan
49f1725620 linuxkm aes: add debug msgs. 2025-05-08 11:47:20 -05:00
Colton Willey
9e7a4f6518 Update PKCS7 to use X509 STORE for internal verification instead of underlying CM 2025-05-08 09:45:58 -07:00
David Garske
7ff4ada692 Merge pull request #8746 from douzzer/20250507-ed25519-noasm
20250507-ed25519-noasm
2025-05-08 08:29:04 -07:00
Daniel Pouzzner
e044ec45b7 .github/workflows/codespell.yml: in skip section, add full paths for new artifacts in examples/asn1/. 2025-05-08 00:41:35 -05:00
Daniel Pouzzner
2e0ada9836 configure.ac: implement support for --enable-ed25519=noasm, and refactor and improve existing support for --enable-curve25519=noasm. 2025-05-07 23:59:58 -05:00
David Garske
c2528d48d7 Fix liboqs builds. 2025-05-07 14:36:55 -07:00
David Garske
18818415d9 Merge pull request #8744 from douzzer/20250507-fips-all
20250507-fips-all
2025-05-07 13:56:31 -07:00
JacobBarthelmeh
3f9fe491cc adjust C# test and set rng with hpke case 2025-05-07 14:33:15 -06:00
Daniel Pouzzner
d3ce45fbfb clean up Curve25519/Curve448 dependencies in FIPS builds:
configure.ac:

* in FIPS setup, fix sensing of ENABLED_CURVE25519 and ENABLED_CURVE448 to prevent noasm sneaking through, and allow fips=dev to enable them via override;

* enable-all enables ECH only if !FIPS;

* enable-all-crypto enables curve25519/curve448 only if !FIPS;

* QUIC implication of ENABLED_CURVE25519 is inhibited if FIPS;

tests/quic.c: add !HAVE_CURVE25519 paths in test_quic_key_share() to allow FIPS QUIC.
2025-05-07 14:34:35 -05:00
David Garske
cdeac13c87 Merge pull request #8742 from gojimmypi/pr-espressif-p4-and-hkdf
Espressif HAVE_HKDF for wolfssl_test, explicit ESP32P4
2025-05-07 12:30:54 -07:00
David Garske
72bff7d01e Lint and overlong. 2025-05-07 12:06:11 -07:00
David Garske
760178c7dc Improvements to no malloc support in ConfirmSignature for async and non-blocking. Refactor DSA ASN.1 decode in ConfirmSignature. Cleanup indent in types.h. Move struct CertSignCtx to types.h. Move WC_ENABLE_ASYM_KEY_IMPORT and WC_ENABLE_ASYM_KEY_EXPORT to settings.h. 2025-05-07 12:06:09 -07:00
Alex Lanzano
bc6b5598c5 Add NO_MALLOC support for wc_CheckCertSigPugKey 2025-05-07 12:04:38 -07:00
David Garske
1e3718ea7b Merge pull request #8655 from SparkiDev/asn1_oid_update
ASN.1 OIDs and sum: Change algorithm for sum
2025-05-07 11:43:54 -07:00
philljj
36d8298602 Merge pull request #8743 from douzzer/20250807-linuxkm-lkcapi-ecdh-fips-5v15
20250807-linuxkm-lkcapi-ecdh-fips-5v15
2025-05-07 12:47:03 -05:00
JacobBarthelmeh
cbc4cba263 set rng when making a curve25519 key and cast type after shift 2025-05-07 11:45:55 -06:00
Daniel Pouzzner
060d4d5ecc linuxkm/lkcapi_glue.c: on FIPS kernels <5.15, suspend fips_enabled when registering ecdh-nist-p256 and ecdh-nist-p384 to work around wrong/missing attributes/items in kernel crypto manager. 2025-05-07 11:14:24 -05:00
JacobBarthelmeh
eae4005884 Merge pull request #8717 from dgarske/renesas_rx_api
Make wc_tsip_* API's public
2025-05-07 09:29:05 -06:00
gojimmypi
ed2c20a3b2 Espressif HAVE_HKDF for wolfssl_test, explicit ESP32P4 2025-05-07 16:38:05 +02:00
Sean Parkinson
5e5f486a4c Merge pull request #8732 from dgarske/stm32_hash_status
Fix for STM32 hash status check logic (also fix NO_AES_192 and NO_AES_256)
2025-05-07 20:56:18 +10:00
Sean Parkinson
4b73e70515 Merge pull request #8706 from dgarske/win_crypt_rng
New build option to allow reuse of the windows crypt provider handle …
2025-05-07 20:55:07 +10:00
philljj
a69039b40d Merge pull request #8740 from douzzer/20250506-linuxkm-lkcapi-default-priority-100000
20250506-linuxkm-lkcapi-default-priority-100000
2025-05-06 20:04:19 -05:00
Sean Parkinson
112351667a ASN.1 OIDs and sum: Change algorithm for sum
New sum algorithm has no clashes at this time.
Old algorithm enabled by defining: WOLFSSL_OLD_OID_SUM.
New oid_sum.h file generated with scripts/asn1_oid_sum.pl.

Added bunch of OID names into asn1 example.
2025-05-07 08:32:08 +10:00
Sean Parkinson
d100898e92 Merge pull request #8737 from julek-wolfssl/wc_HKDF_Expand_ex-fix
wc_HKDF_Expand_ex: correctly advance the index
2025-05-07 08:23:33 +10:00
Daniel Pouzzner
8a3a5929b8 linuxkm/lkcapi_glue.c: change WOLFSSL_LINUXKM_LKCAPI_PRIORITY from INT_MAX to 100000 to avoid overflows in kernel calculation of priority on constructed algs. 2025-05-06 17:21:35 -05:00
David Garske
6eb8dfb769 Merge pull request #8668 from gojimmypi/pr-arduino-print
Fix Arduino progmem print, AVR WOLFSSL_USER_IO
2025-05-06 14:51:12 -07:00
David Garske
213c43b0fc Merge pull request #8715 from padelsbach/ssl-certman-codesonar
Speculative fix for CodeSonar overflow issue in ssl_certman.c
2025-05-06 14:49:57 -07:00
David Garske
1ee954a38c Merge pull request #8738 from kaleb-himes/refine-module-boundary
Refine module boundary based on lab feedback [IG C.K.]
2025-05-06 14:42:57 -07:00
David Garske
05a3557b2b Merge pull request #8703 from lealem47/zd19592
Attempt wolfssl_read_bio_file in read_bio even when XFSEEK is available
2025-05-06 14:42:19 -07:00
David Garske
d04ab3757e New build option WIN_REUSE_CRYPT_HANDLE to allow reuse of the windows crypt provider handle. Seeding happens on any new RNG or after WC_RESEED_INTERVAL. If using threads make sure wolfSSL_Init() or wolfCrypt_Init() is called before spinning up threads. ZD 19754. Fixed minor implicit cast warnings in internal.c. Add missing hpke.c to wolfssl VS project. 2025-05-06 14:38:02 -07:00
David Garske
602f4a7b05 Merge pull request #8739 from douzzer/20250506-fixes-and-test-coverage
20250506-fixes-and-test-coverage
2025-05-06 14:27:38 -07:00
Daniel Pouzzner
982a7600c2 src/tls13.c: in DoTls13ServerHello() WOLFSSL_ASYNC_CRYPT path, fix -Wdeclaration-after-statement caused by fallthrough definition;
.github/workflows: update async.yml, multi-arch.yml, multi-compiler.yml, no-malloc.yml, opensslcoexist.yml, and os-check.yml, with -pedantic and related flags, and add --enable-riscv-asm to multi-arch.yml RISC-V scenario;

configure.ac: clarify error message for "SP ASM not available for CPU."
2025-05-06 14:49:32 -05:00
Lealem Amedie
579e22f843 Remove WOLFSSL_NO_FSEEK from known macros 2025-05-06 15:39:18 -04:00
David Garske
25db14f50c Fix macro typo. 2025-05-06 10:42:09 -07:00
kaleb-himes
654812679b Refine module boundary based on lab feedback [IG C.K.] 2025-05-06 09:33:36 -06:00
Juliusz Sosinowicz
d82d8a53ef wc_HKDF_Expand_ex: correctly advance the index 2025-05-06 13:47:54 +02:00
Sean Parkinson
1c0e5af3a4 Merge pull request #8720 from JacobBarthelmeh/xilinx
add macro guards for SHA3 test cases to unit tests
2025-05-06 10:50:01 +10:00
Sean Parkinson
428915e492 Merge pull request #8719 from philljj/coverity_april_2025
Fix coverity warnings
2025-05-06 10:11:27 +10:00
Sean Parkinson
dfec168402 Merge pull request #8721 from philljj/coverity_misc
Coverity misc
2025-05-06 10:04:53 +10:00
JacobBarthelmeh
3819c352e8 Merge pull request #8728 from dgarske/qat_4.28
Fixes for Intel QuickAssist latest driver (4.28)
2025-05-05 17:48:49 -06:00
David Garske
219902149e Fix issue with api.c test_wolfSSL_OBJ and ./certs/test-servercert.p12 that uses DES3 and AES-CBC-256. 2025-05-05 15:55:00 -07:00
David Garske
c2f1563144 Merge pull request #8726 from kareem-wolfssl/zd19786
Pass in correct hash type to wolfSSL_RSA_verify_ex.
2025-05-05 15:38:41 -07:00
Daniel Pouzzner
629d812eb3 Merge pull request #8730 from philljj/linuxkm_pkcs1pad_more
linuxkm rsa: add more pkcs1pad sha variants
2025-05-05 16:59:29 -05:00
David Garske
751dcdf3df Improve the hash wait logic by separating the data input ready from the digest calculation complete. 2025-05-05 14:36:36 -07:00
David Garske
0f4ce03c28 Fixes for NO_AES_192 and NO_AES_256. Added CI test. Fixed bad BUILD_ logic for ADH-AES256-GCM-SHA384. 2025-05-05 14:36:36 -07:00
David Garske
e487685d7d Fix for STM32 Hashing status bit checking logic. ZD 19783. The digest calculation was indicating "not busy" before digest result (DCIS) was finished. This did not show up on most systems because the computation is usually done by the time it reads. 2025-05-05 14:36:36 -07:00
philljj
6296dfdb1e Merge pull request #8735 from douzzer/20250502-linuxkm-fixes
20250502-linuxkm-fixes
2025-05-05 16:29:00 -05:00
David Garske
3d4e89c2ca Make wc_tsip_* API's public. 2025-05-05 14:02:05 -07:00
David Garske
2c0ca1cacb Fix for QAT driver QAT.L.4.28.0-00004 icp include path. Fix for CentOS 7 to allow automake 1.13.4 (works fine). 2025-05-05 13:22:54 -07:00
JacobBarthelmeh
aa840f9c94 adjust default build with curve25519 2025-05-05 14:06:44 -06:00
Daniel Pouzzner
c402d7bd94 Merge pull request #8729 from philljj/linuxkm_ecdh_decode_secret
Linuxkm ecdh decode secret
2025-05-05 14:59:51 -05:00
David Garske
d5cca9d7c9 Merge pull request #8733 from SparkiDev/riscv_hash_raw_fix
RISC-V 64-bit: fix raw hash when using crypto instructions
2025-05-05 12:44:51 -07:00
Kareem
aad15b27a2 Pass in correct hash type to wolfSSL_RSA_verify_ex. 2025-05-05 11:58:26 -07:00
jordan
a341333589 linuxkm rsa: additional pkcs1 sha variants. 2025-05-05 13:50:12 -05:00
jordan
68682f155c linuxkm ecdh: remove dependency on crypto_ecdh_decode_key. 2025-05-05 13:39:13 -05:00
jordan
efd5405d0e coverity: fix check_after_deref, assignment_where_comparison_intended, uninit vars, return values, etc. 2025-05-05 13:18:29 -05:00
Daniel Pouzzner
b9b66042d7 wolfssl/wolfcrypt/dh.h: gate in wc_DhGeneratePublic() with WOLFSSL_DH_EXTRA,
adding WOLFSSL_NO_DH_GEN_PUB in the unlikely event it needs to be disabled;

configure.ac: in --enable-linuxkm-lkcapi-register section, remove special-case
  handling for -DWOLFSSL_DH_GEN_PUB, and add support for
  --enable-linuxkm-lkcapi-register=all-kconfig, which disables registration of
  any algs that are disabled in the target kernel, and #errors if any algs or
  registrations are disabled or incompatible in libwolfssl but enabled in the
  target kernel (note, it does not #error for algorithms we don't currently
  shim/implement);

linuxkm/lkcapi_glue.c: change default WOLFSSL_LINUXKM_LKCAPI_PRIORITY from 10000
  to INT_MAX to make masking impossible;

linuxkm/lkcapi*glue.c: move all remaining algorithm-specific gate setup into the
  respective algorithm family files, and in each family file, add
  LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG logic to activate shims only if the
  corresponding algorithm is activated in the target kernel.

linuxkm/lkcapi_sha_glue.c: fix -Wunuseds in
  wc_linuxkm_drbg_default_instance_registered() and wc_linuxkm_drbg_cleanup()
  when !LINUXKM_LKCAPI_REGISTER_HASH_DRBG_DEFAULT.
2025-05-05 13:17:06 -05:00
jordan
baa7efa8af Fix coverity uninit var warnings, add missing priv key ForceZero. 2025-05-05 13:14:39 -05:00
JacobBarthelmeh
203758695f use proper heap hint when free'ing CRL in error case 2025-05-05 11:21:03 -06:00
JacobBarthelmeh
e233ead7f6 add macro guards for SHA3 test cases 2025-05-05 11:19:21 -06:00
David Garske
9587b7b12e Merge pull request #8734 from JacobBarthelmeh/libssh2
update libssh2 test to use stable-slim instead of test-slim
2025-05-05 09:55:57 -07:00
JacobBarthelmeh
5fbe23cfd9 update libssh2 test to use stable-slim instead of test-slim 2025-05-05 10:09:47 -06:00
Sean Parkinson
3acf3ef3c5 RISC-V 64-bit: fix raw hash when using crypto instructions
./configure CC=riscv64-linux-gnu-gcc --host=riscv64 --disable-shared LDFLAGS=--static --enable-riscv-asm=zvkned
Digest state is not always stored in a way that can be directly copied out.
2025-05-03 08:42:17 +10:00
philljj
1075ce8cf4 Merge pull request #8727 from douzzer/20250501-linuxkm-ecdsa-workaround
20250501-linuxkm-ecdsa-workaround
2025-05-01 22:44:48 -05:00
Sean Parkinson
aa50cfc92c Merge pull request #8723 from lealem47/zd19721
Sniffer: Add multiple sessions by removing cached check
2025-05-02 08:44:05 +10:00
Daniel Pouzzner
fea5694e1d linuxkm/lkcapi_glue.c: with kernels <6.3.0, disable kernel fips_enabled mode while registering FIPS ECDSA shims, to work around crypto manager bug (not recognized as FIPS-allowed algorithms). 2025-05-01 16:57:55 -05:00
Daniel Pouzzner
a18a8ced23 linuxkm/lkcapi_*_glue.c: in test harnesses, fix several out-of-order NULLing of PTR_ERR-type pointers in error paths. 2025-05-01 16:55:30 -05:00
philljj
937fb03f05 Merge pull request #8718 from douzzer/20250428-linuxkm-stdrng
20250428-linuxkm-stdrng
2025-05-01 15:31:15 -05:00
Lealem Amedie
ac139dfe49 Sniffer: Add multiple sessions by removing cached check 2025-05-01 14:27:35 -04:00
Daniel Pouzzner
5633a2fa76 linuxkm: in configure.ac, fix feature dependency test for --enable-linuxkm-lkcapi-register=stdrng*, and in linuxkm/lkcapi_sha_glue.c, fix PRNG quality test in wc_linuxkm_drbg_startup(). 2025-05-01 13:07:23 -05:00
Daniel Pouzzner
1b59bc25d1 linuxkm:
in lkcapi_sha_glue.c:

    in linuxkm_hmac_setkey_common(), ignore keylength even in FIPS modules (use
    wc_HmacSetKey_ex(..., 1)) on kernel < 6.0 to work around crypto manager bug;

    in wc_linuxkm_drbg_startup(), add rng workout routine using handle from
    crypto_alloc_rng();

  in lkcapi_*_glue.c: fix test routines to return valid wolfCrypt error codes
  consistently;

  in module_hooks.c, implement
    * linuxkm_lkcapi_sysfs_install_node(),
    * linuxkm_lkcapi_sysfs_deinstall_node(),
    * FIPS_rerun_self_test_handler()
  and add corresponding setup/teardown in wolfssl_init() and wolfssl_exit();

  in lkcapi_glue.c:

    refactor linuxkm_lkcapi_sysfs_install and linuxkm_lkcapi_sysfs_deinstall to
    use the new helpers;

    harden the REGISTER_ALG() and UNREGISTER_ALG() macros and the
    linuxkm_lkcapi_register() and linuxkm_lkcapi_unregister() functions, and add
    informational messages about number of algs registered/deregistered;

  in x86_vector_register_glue.c: fix gate for irq_fpu_usable() workaround to
  reflect backporting of fix in >=5.10.180 in 5.10-LTS and >=5.15.39 in 5.15-LTS
  linuxkm/lkcapi_glue.c: move WOLFSSL_DEBUG_TRACE_ERROR_CODES coverage for
  EINVAL/ENOMEM/EBADMSG to module_hooks.c.
2025-05-01 00:08:32 -05:00
Daniel Pouzzner
273b7fc0da linuxkm: support DRBG in LKCAPI shim set:
* Implement --enable-linuxkm-lkcapi-register=stdrng and =stdrng-default,
  LINUXKM_LKCAPI_REGISTER_HASH_DRBG, and
  LINUXKM_LKCAPI_REGISTER_HASH_DRBG_DEFAULT.  With "_DEFAULT", the DRBG is
  installed as the systemwide default stdrng, necessitating
  deregister-on-command, described below.  Note that get_random_bytes() and the
  associated /dev/random and /dev/urandom do not use the default stdrng, and
  their back end cannot currently be replaced by a module.

* Add control nodes /sys/module/libwolfssl/install_algs and
  /sys/module/libwolfssl/deinstall_algs.

* Add configure option --enable-linuxkm-lkcapi-register=sysfs-nodes-only, and
  macro LINUXKM_LKCAPI_REGISTER_ONLY_ON_COMMAND, to inhibit registration at
  module load time.

In configure.ac ENABLED_LINUXKM_LKCAPI_REGISTER setup, don't define
  WOLFSSL_DH_GEN_PUB in old FIPS, but do define it for =all.
2025-04-29 00:42:15 -05:00
Daniel Pouzzner
4450167ab0 Merge pull request #8707 from philljj/register_dh
linuxkm: register dh and ffdhe.
2025-04-28 23:00:17 -05:00
Sean Parkinson
bb9f3c9f9d Merge pull request #8698 from rlm2002/msys2
adjust MSYS CI Build
2025-04-29 09:03:58 +10:00
Sean Parkinson
d8ab66b39a Merge pull request #8705 from dgarske/stm32_hash
Fix for STM32 Hash with IRQ enabled
2025-04-29 09:00:42 +10:00
Sean Parkinson
03ad93f4eb Merge pull request #8709 from dgarske/win32_wince
Fixes to support _WIN32_WCE (VS 2008 with WinCE 6.0/7.0)
2025-04-29 08:59:58 +10:00
Sean Parkinson
2ce7c2ac4c Merge pull request #8714 from mgrojo/alire-inclusion
Ada: prepare inclusion of v5.8.0 in Alire index
2025-04-29 08:58:24 +10:00
jordan
f6f3b0a1ee linuxkm: register dh and ffdhe. 2025-04-25 21:21:26 -05:00
Paul Adelsbach
b4d94429d1 Speculative fix for CodeSonar overflow issue 2025-04-25 12:58:23 -07:00
mgrojo
e6e64515c7 Ada: prepare inclusion of v5.8.0 in Alire index 2025-04-25 20:56:06 +02:00
David Garske
81cd5df263 Fixes to support _WIN32_WCE (VS 2008 with WinCE 6.0/7.0). Should have been part of #8621. 2025-04-24 08:18:44 -07:00
David Garske
3a1178f71c Fix for STM32 Hash with NVIC (IRQ) enabled that can cause a DINIS interrupt that does not get cleared. If the HASH NVIC tab has Interrupts enabled it can cause an IRQ to be triggered that is not cleared. This is because the wolfSSL implementation of STM32 Hash does not call the HAL HASH API's and does not use interrupts yet. ZD 19778 2025-04-23 13:55:57 -07:00
Lealem Amedie
5fe086b388 Skip PKCS8 header check in wc_CreatePKCS8Key with WOLFSSL_NO_ASN_STRICT 2025-04-22 16:58:04 -06:00
Lealem Amedie
882eaa5df8 Attempt wolfssl_read_bio_file in read_bio even when XFSEEK is available 2025-04-22 16:56:32 -06:00
Ruby Martin
a1cb6e5ba5 only test msys system, add buffer typecasts 2025-04-22 12:35:12 -06:00
gojimmypi
1f88ab58c1 Fix Arduino progmem print, AVR WOLFSSL_USER_IO 2025-04-18 14:29:32 +02:00
1870 changed files with 514010 additions and 159485 deletions

View File

@@ -13,6 +13,9 @@ rsource "Kconfig.tls-generic"
const uint8_t* hashIn, int hashSz)
XMEMCPY(hash + (curveSz - hashSz), hashIn, hashSz);
0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, /* creen would be i */
0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, /* creen would be i */
\pagenumbering{alph}
DES3_KEY_SIZE = 24, /* 3 des ede */
/* functions added to support above needed, removed TOOM and KARATSUBA */
#include <sys/systm.h>
* extern global version from /usr/src/sys/sys/systm.h */

View File

@@ -0,0 +1,108 @@
cmake_minimum_required(VERSION 3.18)
project(wolfcrypt_stm32h753 LANGUAGES C ASM)
set(WOLFSSL_ROOT "/opt/wolfssl" CACHE PATH "wolfSSL source")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
enable_language(ASM)
# Include paths for CMSIS device headers and STM32 HAL
# Order matters: CMSIS must come before HAL
include_directories(BEFORE
${CMAKE_SOURCE_DIR}
/opt/CMSIS_5/CMSIS/Core/Include # Core CMSIS (core_cm7.h, etc.) - must be first
/opt/cmsis-device-h7/Include # Device-specific CMSIS (stm32h7xx.h)
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc
)
# STM32 HAL source files (minimal set for CRYP and HASH)
# Note: These files are cloned in the Dockerfile before CMake runs
set(HAL_SRC_DIR /opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Src)
# Check if HAL directory exists, then add source files
if(EXISTS ${HAL_SRC_DIR})
set(HAL_SOURCES
${HAL_SRC_DIR}/stm32h7xx_hal.c
${HAL_SRC_DIR}/stm32h7xx_hal_rcc.c
${HAL_SRC_DIR}/stm32h7xx_hal_rcc_ex.c
${HAL_SRC_DIR}/stm32h7xx_hal_cortex.c
${HAL_SRC_DIR}/stm32h7xx_hal_dma.c
${HAL_SRC_DIR}/stm32h7xx_hal_dma_ex.c
${HAL_SRC_DIR}/stm32h7xx_hal_rng.c
# CRYP HAL files enabled for AES_GCM only
${HAL_SRC_DIR}/stm32h7xx_hal_cryp.c
${HAL_SRC_DIR}/stm32h7xx_hal_cryp_ex.c
# HASH HAL files disabled - Renode doesn't implement HASH peripheral
# ${HAL_SRC_DIR}/stm32h7xx_hal_hash.c
# ${HAL_SRC_DIR}/stm32h7xx_hal_hash_ex.c
)
else()
message(WARNING "HAL source directory not found: ${HAL_SRC_DIR}")
set(HAL_SOURCES "")
endif()
# wolfSSL build options
set(WOLFSSL_USER_SETTINGS ON CACHE BOOL "Use user_settings.h")
set(WOLFSSL_CRYPT_TESTS OFF CACHE BOOL "")
set(WOLFSSL_EXAMPLES OFF CACHE BOOL "")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
add_subdirectory(${WOLFSSL_ROOT} ${CMAKE_BINARY_DIR}/wolfssl-build EXCLUDE_FROM_ALL)
target_include_directories(wolfssl PRIVATE
/opt/CMSIS_5/CMSIS/Core/Include # Core CMSIS first
/opt/cmsis-device-h7/Include # Device CMSIS
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc
${CMAKE_SOURCE_DIR} # For stm32h7xx_hal_conf.h
)
# Suppress the GENSEED_FORTEST warning (expected for emulation/test builds)
target_compile_options(wolfssl PRIVATE -Wno-cpp)
# wolfSSL STM32 port source file (needed for HASH and CRYPTO hardware acceleration)
set(WOLFSSL_STM32_PORT_SRC ${WOLFSSL_ROOT}/wolfcrypt/src/port/st/stm32.c)
add_executable(wolfcrypt_test.elf
startup_stm32h753.c
main.c
${WOLFSSL_ROOT}/wolfcrypt/test/test.c
${HAL_SOURCES}
${WOLFSSL_STM32_PORT_SRC}
)
target_include_directories(wolfcrypt_test.elf PRIVATE
${CMAKE_SOURCE_DIR}
${WOLFSSL_ROOT}
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc
/opt/STM32CubeH7/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy
)
target_compile_definitions(wolfcrypt_test.elf PRIVATE
WOLFSSL_USER_SETTINGS
STM32H753xx
USE_HAL_DRIVER
USE_HAL_CONF # Enable HAL configuration
# NO_AES_CBC is defined in user_settings.h, no need to define it here
)
# HAL source files need the same compile options and must include stdint.h
# Disable all warnings for HAL files (third-party code we don't control)
set_source_files_properties(${HAL_SOURCES} PROPERTIES
COMPILE_FLAGS "-mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -Os -include stdint.h -w"
)
target_compile_options(wolfcrypt_test.elf PRIVATE
-mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard
-ffunction-sections -fdata-sections -Os
)
target_link_options(wolfcrypt_test.elf PRIVATE
-T${CMAKE_SOURCE_DIR}/stm32h753.ld
-Wl,--gc-sections
-nostartfiles
-specs=nano.specs
-specs=nosys.specs
)
target_link_libraries(wolfcrypt_test.elf PRIVATE wolfssl m c gcc nosys)

194
.github/renode-test/stm32h753/entrypoint.sh vendored Executable file
View File

@@ -0,0 +1,194 @@
#!/bin/bash
set -euo pipefail
LOG=/tmp/wolfcrypt-renode.log
TIMEOUT=300 # Maximum 5 minutes
echo "Running wolfCrypt test in Renode..."
# Try to find Renode binary in common installation locations
# When installed via .deb package, Renode is typically in /usr/bin/renode
RENODE_BIN="${RENODE_BIN:-$(command -v renode 2>/dev/null || true)}"
if [ -z "$RENODE_BIN" ]; then
# Check common installation paths (order matters - check standard locations first)
for path in /usr/bin/renode /usr/local/bin/renode /opt/renode/renode; do
if [ -x "$path" ]; then
RENODE_BIN="$path"
break
fi
done
fi
if [ -z "$RENODE_BIN" ] || [ ! -x "$RENODE_BIN" ]; then
echo "Renode binary not found in image."
echo "Checked paths: /usr/bin/renode, /usr/local/bin/renode, /opt/renode/renode"
echo "PATH: $PATH"
which renode || echo "renode not in PATH"
exit 2
fi
echo "Using Renode binary: $RENODE_BIN"
# Determine Renode root directory (where platforms/ directory is located)
if [ -d "/opt/renode/platforms" ]; then
RENODE_ROOT="/opt/renode"
elif [ -d "/usr/lib/renode/platforms" ]; then
RENODE_ROOT="/usr/lib/renode"
elif [ -d "/usr/share/renode/platforms" ]; then
RENODE_ROOT="/usr/share/renode"
else
# Try to find Renode root by checking where the binary is
RENODE_DIR=$(dirname "$(readlink -f "${RENODE_BIN}" 2>/dev/null || echo "${RENODE_BIN}")")
if [ -d "${RENODE_DIR}/../platforms" ]; then
RENODE_ROOT=$(readlink -f "${RENODE_DIR}/.." 2>/dev/null || echo "${RENODE_DIR}/..")
else
echo "Warning: Could not determine Renode root directory"
RENODE_ROOT=""
fi
fi
# Set RENODE_ROOT environment variable (Renode uses this to find platform files)
if [ -n "$RENODE_ROOT" ]; then
export RENODE_ROOT
echo "Using Renode root: ${RENODE_ROOT}"
# Also create .renode-root file in firmware directory as backup
echo "${RENODE_ROOT}" > /opt/firmware/.renode-root
chmod 644 /opt/firmware/.renode-root
else
echo "ERROR: Could not determine Renode root directory"
exit 1
fi
# Verify platform file exists
PLATFORM_FILE="${RENODE_ROOT}/platforms/cpus/stm32h753.repl"
if [ ! -f "${PLATFORM_FILE}" ]; then
echo "ERROR: Platform file not found at ${PLATFORM_FILE}"
echo "Searching for platform files..."
find "${RENODE_ROOT}" -name "stm32h753.repl" 2>/dev/null | head -5 || true
exit 1
fi
echo "Platform file found at: ${PLATFORM_FILE}"
# Change to firmware directory
cd /opt/firmware
# Create a modified Renode script with absolute path to platform file
# This avoids the .renode-root file lookup issue
cat > /opt/firmware/run-renode-absolute.resc <<EOF
# Renode test script for STM32H753 (with absolute platform path)
using sysbus
mach create "stm32h753"
# Use absolute path to platform file to avoid .renode-root lookup issues
machine LoadPlatformDescription @${PLATFORM_FILE}
sysbus LoadELF @/opt/firmware/wolfcrypt_test.elf
# Connect USART3 to the console for wolfCrypt output
showAnalyzer usart3
# Start emulation and run for a long time
# The entrypoint script will kill Renode when test completes
emulation RunFor "600s"
EOF
# Start Renode in background, output to log (unbuffered)
# Use the modified script with absolute path
echo "Starting Renode with command: ${RENODE_BIN} --disable-xwt --console -e \"i @/opt/firmware/run-renode-absolute.resc\""
stdbuf -oL -eL "${RENODE_BIN}" --disable-xwt --console -e "i @/opt/firmware/run-renode-absolute.resc" > "${LOG}" 2>&1 &
RENODE_PID=$!
echo "Renode PID: $RENODE_PID"
# Monitor the log for completion, errors, and flush output frequently
START_TIME=$(date +%s)
RESULT=""
LAST_LOG_SIZE=0
while true; do
# Check if Renode is still running
if ! kill -0 "$RENODE_PID" 2>/dev/null; then
break
fi
# Flush new log content to stdout (unbuffered)
if [ -f "${LOG}" ]; then
CURRENT_LOG_SIZE=$(stat -f%z "${LOG}" 2>/dev/null || stat -c%s "${LOG}" 2>/dev/null || echo 0)
if [ "$CURRENT_LOG_SIZE" -gt "$LAST_LOG_SIZE" ]; then
# Output new lines
tail -c +$((LAST_LOG_SIZE + 1)) "${LOG}" 2>/dev/null | head -c $((CURRENT_LOG_SIZE - LAST_LOG_SIZE))
LAST_LOG_SIZE=$CURRENT_LOG_SIZE
fi
fi
# Check for Renode errors (must check before completion to catch errors early)
if grep -q "\[ERROR\]" "${LOG}" 2>/dev/null; then
echo ""
echo "ERROR: Renode reported an error!"
RESULT="renode_error"
break
fi
# Check for completion messages
if grep -q "=== wolfCrypt test passed! ===" "${LOG}" 2>/dev/null; then
RESULT="passed"
break
fi
if grep -q "=== wolfCrypt test FAILED ===" "${LOG}" 2>/dev/null; then
RESULT="failed"
break
fi
# Check timeout
CURRENT_TIME=$(date +%s)
ELAPSED=$((CURRENT_TIME - START_TIME))
if [ "$ELAPSED" -ge "$TIMEOUT" ]; then
echo ""
echo "Timeout after ${TIMEOUT} seconds"
RESULT="timeout"
break
fi
sleep 0.5
done
# Kill Renode if still running
if kill -0 "$RENODE_PID" 2>/dev/null; then
kill "$RENODE_PID" 2>/dev/null || true
wait "$RENODE_PID" 2>/dev/null || true
fi
# Show the log output
cat "${LOG}"
# Report result
case "$RESULT" in
passed)
echo ""
echo "wolfCrypt tests completed successfully."
exit 0
;;
failed)
echo ""
echo "wolfCrypt tests FAILED."
exit 1
;;
renode_error)
echo ""
echo "Renode reported an error - test aborted."
exit 1
;;
timeout)
echo ""
echo "wolfCrypt tests timed out after ${TIMEOUT} seconds."
exit 1
;;
*)
echo ""
echo "wolfCrypt tests did not report a result."
exit 1
;;
esac

137
.github/renode-test/stm32h753/main.c vendored Normal file
View File

@@ -0,0 +1,137 @@
/* main.c - Entry point for wolfCrypt test on STM32H753 under Renode
*
* Runs the wolfCrypt test suite with output via USART3.
*/
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
/* wolfCrypt test entry point */
extern int wolfcrypt_test(void *args);
/* USART3 registers (STM32H7) */
#define USART3_BASE 0x40004800UL
#define USART3_CR1 (*(volatile uint32_t *)(USART3_BASE + 0x00))
#define USART3_BRR (*(volatile uint32_t *)(USART3_BASE + 0x0C))
#define USART3_ISR (*(volatile uint32_t *)(USART3_BASE + 0x1C))
#define USART3_TDR (*(volatile uint32_t *)(USART3_BASE + 0x28))
#define USART_CR1_UE (1 << 0)
#define USART_CR1_TE (1 << 3)
#define USART_ISR_TXE (1 << 7)
/* RCC registers for enabling USART3 clock */
#define RCC_BASE 0x58024400UL
#define RCC_APB1LENR (*(volatile uint32_t *)(RCC_BASE + 0xE8))
#define RCC_APB1LENR_USART3EN (1 << 18)
static void uart_init(void)
{
/* Enable USART3 clock */
RCC_APB1LENR |= RCC_APB1LENR_USART3EN;
/* Configure USART3: 115200 baud at 64MHz HSI */
USART3_BRR = 64000000 / 115200;
USART3_CR1 = USART_CR1_UE | USART_CR1_TE;
}
static void uart_putc(char c)
{
while (!(USART3_ISR & USART_ISR_TXE))
;
USART3_TDR = c;
}
static void uart_puts(const char *s)
{
while (*s) {
if (*s == '\n')
uart_putc('\r');
uart_putc(*s++);
}
}
/* newlib _write syscall - redirects printf to UART */
int _write(int fd, const char *buf, int len)
{
(void)fd;
for (int i = 0; i < len; i++) {
if (buf[i] == '\n')
uart_putc('\r');
uart_putc(buf[i]);
}
return len;
}
/* Heap management for malloc - required by printf with format strings */
extern char __heap_start__;
extern char __heap_end__;
void *_sbrk(ptrdiff_t incr)
{
static char *heap_ptr = NULL;
char *prev_heap_ptr;
if (heap_ptr == NULL) {
heap_ptr = &__heap_start__;
}
prev_heap_ptr = heap_ptr;
if (heap_ptr + incr > &__heap_end__) {
/* Out of heap memory */
return (void *)-1;
}
heap_ptr += incr;
return prev_heap_ptr;
}
/* Simple counter for time - used by GENSEED_FORTEST */
static volatile uint32_t tick_counter = 0;
/* time() stub for wolfSSL GENSEED_FORTEST */
#include <time.h>
time_t time(time_t *t)
{
tick_counter += 12345; /* Simple pseudo-random increment */
time_t val = (time_t)tick_counter;
if (t)
*t = val;
return val;
}
/* Result variable - can be monitored by Renode at fixed address */
volatile int test_result __attribute__((section(".data"))) = -1;
volatile int test_complete __attribute__((section(".data"))) = 0;
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
uart_init();
uart_puts("\n\n=== Starting wolfCrypt test ===\n\n");
test_result = wolfcrypt_test(NULL);
test_complete = 1;
if (test_result == 0) {
uart_puts("\n\n=== wolfCrypt test passed! ===\n");
} else {
uart_puts("\n\n=== wolfCrypt test FAILED ===\n");
}
/* Spin forever after the test completes */
while (1) {
__asm__ volatile ("wfi");
}
return test_result;
}

View File

@@ -0,0 +1,20 @@
# Renode test script for STM32H753
# Note: @platforms/cpus/stm32h753.repl is relative to Renode root
# If RENODE_ROOT is set, Renode will use it; otherwise it looks for .renode-root file
using sysbus
mach create "stm32h753"
# Try relative path first (works if RENODE_ROOT or .renode-root is set correctly)
# If this fails, the absolute path will be tried in entrypoint.sh
machine LoadPlatformDescription @platforms/cpus/stm32h753.repl
sysbus LoadELF @/opt/firmware/wolfcrypt_test.elf
# Connect USART3 to the console for wolfCrypt output
showAnalyzer usart3
# Start emulation and run for a long time
# The entrypoint script will kill Renode when test completes
emulation RunFor "600s"

View File

@@ -0,0 +1,101 @@
/* Minimal startup code for STM32H753 running under Renode */
#include <stdint.h>
#include <stddef.h>
extern int main(int argc, char** argv);
void Default_Handler(void);
void Reset_Handler(void);
/* Symbols provided by the linker script */
extern unsigned long _estack;
extern unsigned long __data_start__;
extern unsigned long __data_end__;
extern unsigned long __bss_start__;
extern unsigned long __bss_end__;
extern unsigned long _sidata; /* start of .data in flash */
/* Minimal init_array support */
extern void (*__preinit_array_start[])(void);
extern void (*__preinit_array_end[])(void);
extern void (*__init_array_start[])(void);
extern void (*__init_array_end[])(void);
static void call_init_array(void)
{
size_t count, i;
count = __preinit_array_end - __preinit_array_start;
for (i = 0; i < count; i++)
__preinit_array_start[i]();
count = __init_array_end - __init_array_start;
for (i = 0; i < count; i++)
__init_array_start[i]();
}
void Reset_Handler(void)
{
unsigned long *src, *dst;
/* Copy .data from flash to RAM */
src = &_sidata;
for (dst = &__data_start__; dst < &__data_end__;)
*dst++ = *src++;
/* Zero .bss */
for (dst = &__bss_start__; dst < &__bss_end__;)
*dst++ = 0;
/* Call static constructors */
call_init_array();
/* Call main */
(void)main(0, (char**)0);
/* Infinite loop after main returns */
while (1) {
__asm__ volatile ("wfi");
}
}
void Default_Handler(void)
{
while (1) {
__asm__ volatile ("wfi");
}
}
/* Exception handlers - all weak aliases to Default_Handler */
void NMI_Handler(void) __attribute__((weak, alias("Default_Handler")));
void HardFault_Handler(void) __attribute__((weak, alias("Default_Handler")));
void MemManage_Handler(void) __attribute__((weak, alias("Default_Handler")));
void BusFault_Handler(void) __attribute__((weak, alias("Default_Handler")));
void UsageFault_Handler(void) __attribute__((weak, alias("Default_Handler")));
void SVC_Handler(void) __attribute__((weak, alias("Default_Handler")));
void DebugMon_Handler(void) __attribute__((weak, alias("Default_Handler")));
void PendSV_Handler(void) __attribute__((weak, alias("Default_Handler")));
void SysTick_Handler(void) __attribute__((weak, alias("Default_Handler")));
/* Vector table */
__attribute__ ((section(".isr_vector"), used))
void (* const g_pfnVectors[])(void) = {
(void (*)(void))(&_estack), /* Initial stack pointer */
Reset_Handler, /* Reset Handler */
NMI_Handler, /* NMI Handler */
HardFault_Handler, /* Hard Fault Handler */
MemManage_Handler, /* MPU Fault Handler */
BusFault_Handler, /* Bus Fault Handler */
UsageFault_Handler, /* Usage Fault Handler */
0, /* Reserved */
0, /* Reserved */
0, /* Reserved */
0, /* Reserved */
SVC_Handler, /* SVCall Handler */
DebugMon_Handler, /* Debug Monitor Handler */
0, /* Reserved */
PendSV_Handler, /* PendSV Handler */
SysTick_Handler /* SysTick Handler */
/* IRQ vectors would continue here */
};

View File

@@ -0,0 +1,109 @@
/* Minimal STM32H753 memory map for Renode run */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
}
_estack = ORIGIN(RAM) + LENGTH(RAM);
_Min_Heap_Size = 128K;
_Min_Stack_Size = 128K;
ENTRY(Reset_Handler)
SECTIONS
{
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector))
. = ALIGN(4);
} > FLASH
.text :
{
. = ALIGN(4);
*(.text*)
*(.rodata*)
*(.glue_7)
*(.glue_7t)
*(.eh_frame)
. = ALIGN(4);
_etext = .;
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
.ARM.exidx :
{
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} > FLASH
.preinit_array :
{
PROVIDE_HIDDEN(__preinit_array_start = .);
KEEP(*(.preinit_array*))
PROVIDE_HIDDEN(__preinit_array_end = .);
} > FLASH
.init_array :
{
PROVIDE_HIDDEN(__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array*))
PROVIDE_HIDDEN(__init_array_end = .);
} > FLASH
.fini_array :
{
PROVIDE_HIDDEN(__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array*))
PROVIDE_HIDDEN(__fini_array_end = .);
} > FLASH
/* Location in flash where .data will be stored */
_sidata = LOADADDR(.data);
.data :
{
. = ALIGN(4);
__data_start__ = .;
*(.data*)
. = ALIGN(4);
__data_end__ = .;
} > RAM AT> FLASH
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap_stack (NOLOAD):
{
. = ALIGN(8);
PROVIDE(__heap_start__ = .);
. = . + _Min_Heap_Size;
PROVIDE(__heap_end__ = .);
PROVIDE(end = __heap_end__);
. = ALIGN(8);
PROVIDE(__stack_start__ = .);
. = . + _Min_Stack_Size;
PROVIDE(__stack_end__ = .);
} > RAM
}
PROVIDE(_init = 0);
PROVIDE(_fini = 0);

View File

@@ -0,0 +1,208 @@
/* Minimal HAL configuration for STM32H753 wolfCrypt build under Renode.
* RNG and CRYP HAL are enabled. CRYP is used for AES_GCM only (other AES modes disabled).
* HASH is disabled as Renode doesn't implement it.
*/
#ifndef STM32H7xx_HAL_CONF_H
#define STM32H7xx_HAL_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------- Module Selection ----------------------------- */
#define HAL_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_GPIO_MODULE_ENABLED
#define HAL_RNG_MODULE_ENABLED
#define HAL_CRYP_MODULE_ENABLED /* Enabled for AES_GCM only */
/* #define HAL_HASH_MODULE_ENABLED */ /* Disabled - Renode doesn't implement HASH */
#define HAL_DMA_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
/* Disabled modules (explicit for clarity) */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* ------------------------- Oscillator Values ---------------------------- */
#if !defined(HSE_VALUE)
#define HSE_VALUE 25000000UL /* External oscillator frequency in Hz */
#endif
#if !defined(HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT 100UL /* Time out for HSE start up in ms */
#endif
#if !defined(CSI_VALUE)
#define CSI_VALUE 4000000UL /* Internal oscillator CSI in Hz */
#endif
#if !defined(HSI_VALUE)
#define HSI_VALUE 64000000UL /* Internal oscillator HSI in Hz */
#endif
#if !defined(HSI48_VALUE)
#define HSI48_VALUE 48000000UL /* Value of the Internal High Speed oscillator for USB in Hz */
#endif
#if !defined(LSE_VALUE)
#define LSE_VALUE 32768UL /* External low speed oscillator in Hz */
#endif
#if !defined(LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT 5000UL /* Time out for LSE start up in ms */
#endif
#if !defined(LSI_VALUE)
#define LSI_VALUE 32000UL /* Internal low speed oscillator in Hz */
#endif
#if !defined(EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE 12288000UL /* External audio clock in Hz */
#endif
/* ------------------------- System Configuration -------------------------- */
#define VDD_VALUE 3300UL /* Value of VDD in mV */
#define TICK_INT_PRIORITY 0x0FUL /* Tick interrupt priority */
#define USE_RTOS 0U
#define PREFETCH_ENABLE 0U
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U
#define USE_HAL_DMA_REGISTER_CALLBACKS 0U
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U
#define USE_HAL_DTS_REGISTER_CALLBACKS 0U
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U
#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U
#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U
#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_OTFDEC_REGISTER_CALLBACKS 0U
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
#define USE_HAL_PSSI_REGISTER_CALLBACKS 0U
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U
#define USE_HAL_SD_REGISTER_CALLBACKS 0U
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
#define USE_HAL_UART_REGISTER_CALLBACKS 0U
#define USE_HAL_USART_REGISTER_CALLBACKS 0U
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
#define USE_HAL_XSPI_REGISTER_CALLBACKS 0U
/* ------------------------- SPI peripheral configuration ------------------ */
#define USE_SPI_CRC 0U
/* ------------------------- Assertion ------------------------------------- */
/* #define USE_FULL_ASSERT 1U */
#define assert_param(expr) ((void)0U)
/* ------------------------- Ethernet Configuration ------------------------ */
#define ETH_TX_DESC_CNT 4U
#define ETH_RX_DESC_CNT 4U
#define ETH_MAC_ADDR0 0x02U
#define ETH_MAC_ADDR1 0x00U
#define ETH_MAC_ADDR2 0x00U
#define ETH_MAC_ADDR3 0x00U
#define ETH_MAC_ADDR4 0x00U
#define ETH_MAC_ADDR5 0x00U
/* ------------------------- Include HAL headers --------------------------- */
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32h7xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32h7xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32h7xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32h7xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32h7xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32h7xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32h7xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED
#include "stm32h7xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */
/* CRYP enabled for AES_GCM only */
#ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32h7xx_hal_cryp.h"
#endif
/* #ifdef HAL_HASH_MODULE_ENABLED
#include "stm32h7xx_hal_hash.h"
#endif */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* STM32H7xx_HAL_CONF_H */

View File

@@ -0,0 +1,24 @@
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
set(CMAKE_AR arm-none-eabi-ar)
set(CMAKE_RANLIB arm-none-eabi-ranlib)
set(CMAKE_C_STANDARD 11)
set(CPU_FLAGS "-mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard")
set(OPT_FLAGS "-Os -ffunction-sections -fdata-sections")
set(CMSIS_INCLUDES "-I/opt/cmsis-device-h7/Include -I/opt/CMSIS_5/CMSIS/Core/Include -I/opt/firmware")
set(CMAKE_C_FLAGS_INIT "${CPU_FLAGS} ${OPT_FLAGS} ${CMSIS_INCLUDES} -DSTM32H753xx")
set(CMAKE_CXX_FLAGS_INIT "${CPU_FLAGS} ${OPT_FLAGS} ${CMSIS_INCLUDES} -DSTM32H753xx")
set(CMAKE_ASM_FLAGS_INIT "${CPU_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--gc-sections -static")

View File

@@ -0,0 +1,95 @@
/* user_settings_renode.h - wolfSSL/wolfCrypt configuration for STM32H753 under Renode
*
* Minimal, semihosting-friendly build for Cortex-M7 / STM32H753.
* Hardware RNG and CRYPTO (AES-GCM only) are enabled via Renode's STM32H753 emulation.
* HASH is disabled as Renode doesn't implement the HASH peripheral.
*/
#ifndef USER_SETTINGS_RENODE_H
#define USER_SETTINGS_RENODE_H
/* ------------------------- Platform ------------------------------------- */
#define WOLFSSL_ARM_CORTEX_M
#define WOLFSSL_STM32H7 /* STM32H7 series (includes H753) */
#define WOLFSSL_STM32_CUBEMX /* Use STM32 HAL for CRYPTO */
/* NO_STM32_CRYPTO is NOT defined, so CRYPTO will be enabled */
/* Disable HASH - Renode doesn't implement HASH peripheral */
#define NO_STM32_HASH
/* Required for consistent math library settings (CTC_SETTINGS) */
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
/* ------------------------- Threading / OS ------------------------------- */
#define SINGLE_THREADED
/* ------------------------- Filesystem / I/O ----------------------------- */
#define WOLFSSL_NO_CURRDIR
#define NO_FILESYSTEM
#define NO_WRITEV
/* ------------------------- wolfCrypt Only ------------------------------- */
#define WOLFCRYPT_ONLY
#define NO_DH
#define NO_DSA
/* Disable DES/3DES - Renode CRYPTO only supports AES_GCM */
#define NO_DES
#define NO_DES3
/* ------------------------- AES Mode Configuration ----------------------- */
/* Disable all AES modes except GCM - Renode CRYPTO only supports AES_GCM */
/* NO_AES_CBC prevents HAVE_AES_CBC from being defined in settings.h */
#define NO_AES_CBC
/* ------------------------- RNG Configuration ---------------------------- */
/* Enable STM32 hardware RNG (emulated by Renode) using direct register access */
#define WOLFSSL_STM32_RNG_NOLIB
/* NO_STM32_RNG is NOT defined, so STM32_RNG will be auto-enabled */
#define NO_DEV_RANDOM
#define HAVE_HASHDRBG
/* ------------------------- Math Library --------------------------------- */
/* Use SP Math (Single Precision) - modern, efficient, and secure */
#define WOLFSSL_SP_MATH_ALL
#define WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_DH
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_ARM_CORTEX_M_ASM
#define SP_WORD_SIZE 32
/* ------------------------- Crypto Hardening ----------------------------- */
#define WC_RSA_BLINDING
#define ECC_TIMING_RESISTANT
/* ------------------------- Size Optimization ---------------------------- */
#define WOLFSSL_SMALL_STACK
/* ------------------------- Test Configuration --------------------------- */
/* Use smaller key sizes for faster test runs in emulation */
#define BENCH_EMBEDDED
/* Use our own main() instead of the one in test.c */
#define NO_MAIN_DRIVER
/* ------------------------- Post-options.h cleanup ----------------------- */
/* Ensure unsupported AES modes stay disabled even after options.h processing */
/* These undefs will be processed after options.h includes, preventing
* Renode-unsupported modes from being used */
#ifdef HAVE_AES_CBC
#undef HAVE_AES_CBC
#endif
#ifdef HAVE_AES_ECB
#undef HAVE_AES_ECB
#endif
#ifdef HAVE_AES_CTR
#undef HAVE_AES_CTR
#endif
#ifdef HAVE_AES_CFB
#undef HAVE_AES_CFB
#endif
#ifdef HAVE_AES_OFB
#undef HAVE_AES_OFB
#endif
#endif /* USER_SETTINGS_RENODE_H */

View File

@@ -9,6 +9,7 @@ on:
jobs:
build:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
steps:

465
.github/workflows/arduino.yml vendored Normal file
View File

@@ -0,0 +1,465 @@
name: Arduino CI Build (1 of 4) wolfssl
#
# Test fetches wolfssl-examples/Arduino and uses local, latest github master branch wolfssl
#
# These 4 workflows across 3 repos are interdependent for the current $REPO_OWNER:
#
# THIS Arduino CI Build 1: https://github.com/$REPO_OWNER/wolfssl # /.github/workflows/arduino.yml
# - Builds Arduino library from local clone of wolfssl master branch
# - Fetches examples from https://github.com/$REPO_OWNER/wolfssl-examples
#
# Arduino CI Build 2: https://github.com/$REPO_OWNER/wolfssl-examples # /.github/workflows/arduino-release.yml
# - Tests examples based on latest published release of Arduino library, NOT latest on wolfssl github.
# - Should be identical to Arduino CI Build 3 in every way but wolfssl install.
# - Copies only compile script from wolfssl-examples
# - Builds local examples
# - No other repos used
#
# Arduino CI Build 3: https://github.com/$REPO_OWNER/wolfssl-examples # /.github/workflows/arduino.yml
# - Fetches current wolfSSL from https://github.com/$REPO_OWNER/wolfssl
# - Creates an updated Arduino library
# - Compiles local examples
# - Contains the source of `compile-all-examples.sh` and respective board-list.txt
#
# Arduino CI Build 4: https://github.com/$REPO_OWNER/Arduino-wolfssl # /.github/workflows/arduino.yml
# - Assembles and installs an updated Arduino wolfssl library from LOCAL wolfssl master source
# - Copies only compile script copied from wolfssl-examples
# - Builds local examples
# - No other repos used
#
#
# ** NOTE TO MAINTAINERS **
#
# Consider using winmerge or similar tool to keep the 4 arduino[-release].yml files in relative sync.
# Although there are some specific differences, most of the contents are otherwise identical.
#
# See https://github.com/wolfSSL/Arduino-wolfSSL
#
# To test locally:
# cd [your WOLFSSL_ROOT], e.g. cd /mnt/c/workspace/wolfssl-$USER
# [optional checkout] e.g. git checkout tags/v5.8.4-stable
# pushd ./IDE/ARDUINO
# export ARDUINO_ROOT="$HOME/Arduino/libraries"
# ./wolfssl-arduino.sh INSTALL
# cd [your WOLFSSL_EXAMPLES_ROOT] e.g. /mnt/c/workspace/wolfssl-examples-$USER
#
# START OF COMMON SECTION
on:
push:
branches: [ '**', 'master', 'main', 'release/**' ]
paths:
# Specific to this Arduino CI Build (1 of 4)
- '.github/workflows/arduino.yml'
- 'IDE/ARDUINO/**'
- 'src/**'
- 'wolfcrypt/**'
- 'wolfssl/**'
pull_request:
branches: [ '**' ]
paths:
- '.github/workflows/arduino.yml'
- 'IDE/ARDUINO/**'
- 'src/**'
- 'wolfcrypt/**'
- 'wolfssl/**'
workflow_dispatch:
concurrency:
# Same branch push cancels other jobs. Other PR branches untouched
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fqbn:
# When editing this list, be sure to also edit file: board_list.txt
# The compile-all-examples.sh optionally takes a FQBN parameter to
# optionally compile all examples ONLY for the respective fully qualified board name.
# See https://github.com/wolfSSL/wolfssl-examples/blob/master/Arduino/sketches/board_list.txt
- arduino:avr:ethernet
- arduino:avr:leonardoeth
- arduino:avr:mega
- arduino:avr:nano
- arduino:avr:uno
- arduino:avr:yun
- arduino:samd:mkrwifi1010
- arduino:samd:mkr1000
- arduino:samd:mkrfox1200
- arduino:mbed_edge:edge_control
- arduino:mbed_nano:nanorp2040connect
- arduino:mbed_portenta:envie_m7
- arduino:mbed_portenta:portenta_x8
- arduino:renesas_uno:unor4wifi
- arduino:sam:arduino_due_x
- arduino:samd:arduino_zero_native
- arduino:samd:tian
- esp32:esp32:esp32
- esp32:esp32:esp32s2
- esp32:esp32:esp32s3
- esp32:esp32:esp32c3
- esp32:esp32:esp32c6
- esp32:esp32:esp32h2
- esp8266:esp8266:generic
- teensy:avr:teensy40
# Not yet supported, not in standard library
# - esp32:esp32:nano_nora
# End strategy matrix
env:
REPO_OWNER: ${{ github.repository_owner }}
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo apt-get clean
df -h
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Arduino CLI
run: |
# Script to fetch and run install.sh from arduino/arduino-cli
# The install script will test to see if the recently installed apps in the path
# So set it up in advance:
mkdir -p "${PWD}/bin"
echo "${PWD}/bin" >> $GITHUB_PATH
# Sets the install directory to a consistent path at the repo root.
ROOT_BIN="$GITHUB_WORKSPACE/bin"
# Ensures that BINDIR exists before the installer runs
mkdir -p "$ROOT_BIN"
# Save as a global environment variable
echo "$ROOT_BIN" >> "$GITHUB_PATH"
# Download and run install script from Arduino:
# -S show errors; -L follow redirects; -v Verbose
set +e # don't abort on error
set -o pipefail
curl -vSL --retry 5 --retry-delay 10 \
https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh \
| sh -x
rc=$?
c_rc=${PIPESTATUS[0]} # curl's exit code
s_rc=${PIPESTATUS[1]} # sh's exit code
set -e # restore default abort-on-error
# If there was a curl error, we have our own local copy that is more reliable and can add our own debugging
if [ "$rc" -ne 0 ]; then
echo "Primary install failed: curl=$c_rc, sh=$s_rc. Falling back..." >&2
echo "Using local copy of arduino_install.sh"
pushd ./Arduino/sketches
chmod +x ./arduino_install.sh
# Mimic curl install, does not use current directory:
BINDIR="$ROOT_BIN" sh -x ./arduino_install.sh
popd
else
echo "Alternative install script not needed."
fi
- name: Confirm Arduino CLI Install
run: arduino-cli version
- name: Derive CORE_ID (vendor:arch from FQBN)
run: |
CORE_ID="$(echo '${{ matrix.fqbn }}' | cut -d: -f1-2)"
echo "CORE_ID=$CORE_ID" >> "$GITHUB_ENV"
- name: Setup Arduino CLI
run: |
arduino-cli config init
# wait 10 minutes for big downloads (or use 0 for no limit)
arduino-cli config set network.connection_timeout 600s
arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core update-index
echo "CORE_ID: $CORE_ID"
arduino-cli core install "$CORE_ID"
# The above is instead of:
# arduino-cli core install esp32:esp32 # ESP32
# arduino-cli core install arduino:avr # Arduino Uno, Mega, Nano
# arduino-cli core install arduino:sam # Arduino Due
# arduino-cli core install arduino:samd # Arduino Zero
# arduino-cli core install teensy:avr # PJRC Teensy
# arduino-cli core install esp8266:esp8266 # ESP8266
# arduino-cli core install arduino:mbed_nano # nanorp2040connect
# arduino-cli core install arduino:mbed_portenta # portenta_h7_m7
# arduino-cli core install arduino:mbed_edge
# arduino-cli core install arduino:renesas_uno
# For reference:
# mbed nano not yet tested
# sudo "/home/$USER/.arduino15/packages/arduino/hardware/mbed_nano/4.2.4/post_install.sh"
# Always install networking (not part of FQBN matrix)
# The first one also creates directory: /home/runner/Arduino/libraries
arduino-cli lib install "ArduinoJson" # Example dependency
arduino-cli lib install "WiFiNINA" # ARDUINO_SAMD_NANO_33_IOT
arduino-cli lib install "Ethernet" # Install Ethernet library
arduino-cli lib install "Bridge" # Pseudo-network for things like arduino:samd:tian
- name: Set Job Environment Variables
run: |
# Script to assign some common environment variables after everything is installed
ICON_OK=$(printf "\xE2\x9C\x85")
ICON_FAIL=$(printf "\xE2\x9D\x8C")
echo "GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..")" >> "$GITHUB_ENV"
echo "ARDUINO_ROOT=$(realpath "$HOME/Arduino/libraries")" >> "$GITHUB_ENV"
# Show predefined summary:
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE"
# Show assigned build:env values (e.g. "wolfssl", "gojimmpi" or other owners):
echo "REPO_OWNER = $REPO_OWNER"
echo "GITHUB_ENV=$GITHUB_ENV"
# Show our custom values:
echo "GITHUB_WORK = $GITHUB_WORK"
echo "ARDUINO_ROOT = $ARDUINO_ROOT"
# WOLFSSL_EXAMPLES_ROOT is the repo root, not example location
echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT"
- name: Cache Arduino Packages
uses: actions/cache@v4
with:
path: |
~/.arduino15
~/.cache/arduino
# Exclude staging directory from cache to save space
!~/.arduino15/staging
# Arduino libraries
# Specific to Arduino CI Build (2 of 4) Arduinbo Release wolfSSL for Local Examples
# Include all libraries, as the latest Arduino-wolfSSL will only change upon release.
~/Arduino/libraries
# Ensure wolfssl is not cached, we're always using the latest. See separate cache.
!~/Arduino/libraries/wolfssl
key: arduino-${{ runner.os }}-${{ env.CORE_ID }}-${{ hashFiles('Arduino/sketches/board_list.txt') }}
restore-keys: |
arduino-${{ runner.os }}-${{ env.CORE_ID }}-
arduino-${{ runner.os }}-
- name: Get wolfssl-examples
run: |
# Fetch Arduino examples from the wolfssl-examples repo
echo "Start pwd:"
pwd
# we're typically in $GITHUB_WORKSPACE=/home/runner/work/wolfssl/wolfssl
# goto /home/runner/work to fetch wolfssl-examples
echo "Current pwd for wolfssl-examples clone fetch: $(pwd)"
GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..")
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
# Typically /home/runner/work
echo "GITHUB_WORK=$GITHUB_WORK"
pushd "$GITHUB_WORK"
echo "Updated pwd for wolfssl-examples clone fetch: $(pwd)"
git clone --depth 1 https://github.com/$REPO_OWNER/wolfssl-examples.git wolfssl-examples-publish
cd ./wolfssl-examples-publish
echo "WOLFSSL_EXAMPLES_ROOT=$(pwd)"
echo "Path for wolfssl-examples-publish: $(pwd)"
popd # GITHUB_WORK
# ** END ** Get wolfssl-examples
- name: Install wolfSSL Arduino library
run: |
# Run the local wolfssl-arduino.sh install script to install wolfssl Arduino library.
echo "Installing wolfSSL Arduino library (no cache hit)."
rm -rf "$ARDUINO_ROOT/wolfssl"
# Methods of installing Arduino library:
# 1) arduino-cli lib install "wolfSSL"
# 2) manual copy of files (typical of the Arduino-wolfssl repo)
# 3) run ./wolfssl-arduino.sh INSTALL (typical of the wolfssl repo)
echo "Current pwd for wolfssl-examples clone fetch: $(pwd)"
GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..")
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
# Typically /home/runner/work
echo "GITHUB_WORK=$GITHUB_WORK"
pwd
pushd ./IDE/ARDUINO
# Set default ARDUINO_ROOT to Arduino library.
export ARDUINO_ROOT="$HOME/Arduino/libraries"
export WOLFSSL_EXAMPLES_ROOT="$GITHUB_WORK/wolfssl-examples-publish"
echo "ARDUINO_ROOT: $WOLFSSL_EXAMPLES_ROOT"
echo "WOLFSSL_EXAMPLES_ROOT: $WOLFSSL_EXAMPLES_ROOT"
bash ./wolfssl-arduino.sh INSTALL # Install wolfSSL library
popd
# ** END ** Install wolfSSL Arduino library
- name: List installed Arduino libraries
run: arduino-cli lib list
- name: Get compile-all-examples.sh
run: |
# Fetch compile script FROM THE CURRENT OWNER.
# This repo is Arduino-wolfssl; we'll fetch the script from the wolfssl-examples for the same repository owner.
echo "Repository owner: $REPO_OWNER"
echo "Current directory: $PWD"
echo "Current pwd for wolfssl-examples clone fetch: $PWD"
WOLFSSL_EXAMPLES_DIRECTORY="$ARDUINO_ROOT/wolfssl/examples"
THIS_BOARD_LIST="board_list.txt"
echo "WOLFSSL_EXAMPLES_DIRECTORY=$WOLFSSL_EXAMPLES_DIRECTORY"
# Fetch script and board list into WOLFSSL_EXAMPLES_DIRECTORY
echo "Fetching board_list.txt from REPO_OWNER=$REPO_OWNER"
curl -L "https://raw.githubusercontent.com/$REPO_OWNER/wolfssl-examples/master/Arduino/sketches/board_list.txt" \
-o "$WOLFSSL_EXAMPLES_DIRECTORY/$THIS_BOARD_LIST"
# Check if the first line is "404: Not Found" - which would indicate the curl path above is bad.
FILE="$WOLFSSL_EXAMPLES_DIRECTORY/board_list.txt"
# Ensure the file exists
if [[ ! -f "$FILE" ]]; then
echo "File not found: $FILE"
exit 1
fi
# Check if the first line is "404: Not Found"
if [[ $(head -n 1 "$FILE") == "404: Not Found" ]]; then
echo "The first line is '404: Not Found'"
exit 1
fi
# Fetch the compile script from repo: https://github.com/[$USER]/wolfssl-examples/
echo "Fetching compile-all-examples.sh from REPO_OWNER=$REPO_OWNER"
curl -L "https://raw.githubusercontent.com/$REPO_OWNER/wolfssl-examples/master/Arduino/sketches/compile-all-examples.sh" \
-o "$WOLFSSL_EXAMPLES_DIRECTORY/compile-all-examples.sh"
# Check if the first line is "404: Not Found" - which would indicate the curl path above is bad.
FILE="$WOLFSSL_EXAMPLES_DIRECTORY/compile-all-examples.sh"
# Ensure the file exists
if [[ ! -f "$FILE" ]]; then
echo "File not found: $FILE"
exit 1
fi
# Check if the first line is "404: Not Found"
if [[ $(head -n 1 "$FILE") == "404: Not Found" ]]; then
echo "The first line is '404: Not Found'"
exit 1
fi
pushd "$WOLFSSL_EXAMPLES_DIRECTORY"
echo "Current directory: $PWD"
echo "Current directory $PWD"
echo "Contents:"
ls -al
find ./ -type f | sort
# ensure we can execute the script here (permissions lost during curl fetch)
chmod +x ./compile-all-examples.sh
echo "Found compile script: $(ls -al ./compile-all-examples.sh ./$THIS_BOARD_LIST)"
popd
# ** END ** Get compile-all-examples.sh
# This will fail with Arduino published wolfSSL v5.7.6 and older
# as the examples moved. See https://github.com/wolfSSL/wolfssl/pull/8514
#
- name: Compile Arduino Sketches for Various Boards
run: |
# Call the compile-all-examples.sh script to compile all the examples for each of the fqbn names in the local copy of board_list.txt
echo "Current directory: $PWD"
echo "ARDUINO_ROOT: $ARDUINO_ROOT"
WOLFSSL_EXAMPLES_DIRECTORY="$ARDUINO_ROOT/wolfssl/examples"
echo "WOLFSSL_EXAMPLES_DIRECTORY: $WOLFSSL_EXAMPLES_DIRECTORY"
# Limit the number of jobs to 1 to avoid running out of memory
export ARDUINO_CLI_MAX_JOBS=1
echo "Change directory to Arduino examples..."
pushd "$WOLFSSL_EXAMPLES_DIRECTORY"
chmod +x ./compile-all-examples.sh
# The script expects all the examples to be in the current directory.
# Along with ./board_list.txt from examples repo
echo "Current directory: $PWD"
echo "Calling ./compile-all-examples.sh"
bash ./compile-all-examples.sh ./board_list.txt "${{ matrix.fqbn }}"
popd
# End Compile Arduino Sketches for Various Boards
- name: Cleanup to Save Disk Space
if: always()
run: |
echo "Disk usage before cleanup:"
df -h
echo ""
echo "Cleaning up build artifacts and temporary files..."
# Clean up Arduino build artifacts
find ~/Arduino -name "*.hex" -delete 2>/dev/null || true
find ~/Arduino -name "*.elf" -delete 2>/dev/null || true
find ~/Arduino -name "*.bin" -delete 2>/dev/null || true
find ~/Arduino -name "build" -type d -exec rm -rf {} + 2>/dev/null || true
rm -rf ~/.arduino15/packages/esp32/tools || true
rm -rf ~/.arduino15/packages/esp32/hardware || true
rm -rf ~/.espressif || true
# Clean up staging directories
rm -rf ~/.arduino15/staging/* || true
rm -rf ~/.cache/arduino/* || true
# Clean up git clone of wolfssl-examples
GITHUB_WORK=$(realpath "$GITHUB_WORKSPACE/../..")
rm -rf "$GITHUB_WORK/wolfssl-examples-publish" || true
# Clean up any temporary files in workspace
find "$GITHUB_WORKSPACE" -name "*.o" -delete 2>/dev/null || true
find "$GITHUB_WORKSPACE" -name "*.a" -delete 2>/dev/null || true
echo ""
echo "Disk usage after cleanup:"
df -h

View File

@@ -18,13 +18,13 @@ jobs:
matrix:
config: [
# Add new configs here
'--enable-asynccrypt --enable-all --enable-dtls13',
'--enable-asynccrypt-sw --enable-ocspstapling --enable-ocspstapling2',
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS"',
'--enable-asynccrypt --enable-all --enable-dtls13 CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT"',
'--enable-asynccrypt-sw --enable-ocspstapling --enable-ocspstapling2 CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
@@ -33,7 +33,7 @@ jobs:
- name: Test wolfSSL async
run: |
./async-check.sh install
./autogen.sh
./configure ${{ matrix.config }}
make check

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -44,10 +44,10 @@ jobs:
fail-fast: false
matrix:
# List of releases to test
ref: [ 9.18.0, 9.18.28 ]
ref: [ 9.18.0, 9.18.28, 9.18.33 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl

View File

@@ -8,7 +8,7 @@ on:
jobs:
build:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
steps:
@@ -78,7 +78,8 @@ jobs:
-DWOLFSSL_TLSX:BOOL=yes -DWOLFSSL_TPM:BOOL=yes -DWOLFSSL_CLU:BOOL=yes -DWOLFSSL_USER_SETTINGS:BOOL=no \
-DWOLFSSL_USER_SETTINGS_ASM:BOOL=no -DWOLFSSL_WOLFSSH:BOOL=ON -DWOLFSSL_X86_64_BUILD_ASM:BOOL=yes \
-DWOLFSSL_MLKEM=1 -DWOLFSSL_LMS=1 -DWOLFSSL_LMSSHA256192=1 -DWOLFSSL_EXPERIMENTAL=1 \
-DWOLFSSL_X963KDF:BOOL=yes \
-DWOLFSSL_X963KDF:BOOL=yes -DWOLFSSL_DILITHIUM:BOOL=yes -DWOLFSSL_PKCS11:BOOL=yes \
-DWOLFSSL_ECCSI:BOOL=yes -DWOLFSSL_SAKKE:BOOL=yes -DWOLFSSL_SIPHASH:BOOL=yes \
-DCMAKE_C_FLAGS="-DWOLFSSL_DTLS_CH_FRAG" \
..
cmake --build .
@@ -89,9 +90,6 @@ jobs:
cd ..
rm -rf build
# Kyber Cmake broken
# -DWOLFSSL_KYBER:BOOL=yes
# build "lean-tls" wolfssl
- name: Build wolfssl with lean-tls
working-directory: ./wolfssl
@@ -107,3 +105,22 @@ jobs:
# clean up
cd ..
rm -rf build
# CMake build with user_settings.h
- name: Build wolfssl with user_settings.h
working-directory: ./wolfssl
run: |
mkdir build
cp examples/configs/user_settings_all.h ./build/user_settings.h
cd build
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
-DWOLFSSL_USER_SETTINGS=ON -DWOLFSSL_USER_SETTINGS_ASM=ON -DWOLFSSL_EXAMPLES=ON -DWOLFSSL_CRYPT_TESTS=ON \
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -I ." \
..
cmake --build .
ctest -j $(nproc)
cmake --install .
# clean up
cd ..
rm -rf build

View File

@@ -14,7 +14,7 @@ concurrency:
jobs:
codespell:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
@@ -23,8 +23,8 @@ jobs:
check_filenames: true
check_hidden: true
# Add comma separated list of words that occur multiple times that should be ignored (sorted alphabetically, case sensitive)
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te,HSI,failT,
# The exclude_file contains lines of code that should be ignored. This is useful for individual lines which have non-words that can safely be ignored.
exclude_file: '.codespellexcludelines'
# To skip files entirely from being processed, add it to the following list:
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked'
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked,./examples/asn1/dumpasn1.cfg,./examples/asn1/oid_names.h'

View File

@@ -10,7 +10,7 @@ on:
jobs:
coverity:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:

View File

@@ -16,7 +16,7 @@ jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -40,7 +40,7 @@ jobs:
test_curl:
name: ${{ matrix.curl_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 15
needs: build_wolfssl
@@ -52,7 +52,7 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket apache2 apache2-dev
- name: Download lib
uses: actions/download-artifact@v4
@@ -68,9 +68,9 @@ jobs:
repository: curl/curl
path: curl
ref: ${{ matrix.curl_ref }}
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-test-httpd=yes
check: false
- name: Test curl
working-directory: curl
run: make -j $(nproc) test-ci
run: make -j $(nproc) test-nonflaky

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -48,7 +48,7 @@ jobs:
ref: [ 2.1.28 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl

63
.github/workflows/disable-pk-algs.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: disable-pk-algs Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-dh',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-curve25519',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc --enable-curve25519',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-curve448',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc --enable-curve448',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve25519 --enable-ed25519',
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve448 --enable-ed448',
'-enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-dh',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve25519',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ed25519',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve448',
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ed448',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

View File

@@ -15,11 +15,13 @@ jobs:
espressif_latest:
name: latest Docker container
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 12
container:
image: espressif/idf:latest
# The latest stable release is v5.5
image: espressif/idf:release-v5.5
# image: espressif/idf:latest # The "latest" has breaking changes for ESP-IDF V6
steps:
- uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
@@ -27,7 +29,7 @@ jobs:
espressif_v4_4:
name: v4.4 Docker container
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: espressif/idf:release-v4.4
steps:
@@ -37,7 +39,7 @@ jobs:
espressif_v5_0:
name: v5.0 Docker container
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: espressif/idf:release-v5.0
steps:

View File

@@ -18,7 +18,7 @@ jobs:
build_library:
name: Compile libwolfssl.so
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
container:
@@ -42,7 +42,7 @@ jobs:
compile_container:
name: Compile container
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 2
needs: build_library

47
.github/workflows/fil-c.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Fil-C Tests
env:
FIL_C_VERSION: v0.674
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
run_fil_c:
strategy:
fail-fast: false
matrix:
config: [
# Add new configs here. Don't use CPPFLAGS.
'',
'--enable-all',
]
# This should be a safe limit for the tests to run.
timeout-minutes: 30
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
name: ${{ matrix.config }}
steps:
- name: Download fil-c release
run: gh release download ${{ env.FIL_C_VERSION }} --repo pizlonator/fil-c --pattern 'filc-*'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract fil-c tarball
run: mkdir -p filc && tar -xf filc-*.tar* --strip-components=1 -C filc
- name: Build and test wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: ${{ matrix.config }} CC=$GITHUB_WORKSPACE/filc/build/bin/filcc --disable-asm CPPFLAGS=-DWC_NO_CACHE_RESISTANT
check: true

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -52,7 +52,7 @@ jobs:
h2_ssl_cert_test h2_ssl_session_reuse_test
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
needs: build_wolfssl

View File

@@ -16,7 +16,7 @@ jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -40,14 +40,14 @@ jobs:
test_haproxy:
name: ${{ matrix.haproxy_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 15
needs: build_wolfssl
strategy:
fail-fast: false
matrix:
haproxy_ref: [ 'v3.1.0' ]
haproxy_ref: [ 'v3.1.0', 'v3.2.0']
steps:
- name: Install test dependencies
run: |
@@ -82,6 +82,13 @@ jobs:
working-directory: build-dir/haproxy-${{matrix.haproxy_ref}}
run: make clean && make TARGET=linux-glibc USE_OPENSSL_WOLFSSL=1 SSL_LIB=$GITHUB_WORKSPACE/build-dir/lib SSL_INC=$GITHUB_WORKSPACE/build-dir/include ADDLIB=-Wl,-rpath,$GITHUB_WORKSPACE/build-dir/lib CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
# wlallemand/VTest used in v3.1.0 is no longer available
- name: Patch build-vtest.sh for v3.1.0
if: matrix.haproxy_ref == 'v3.1.0'
working-directory: build-dir/haproxy-${{ matrix.haproxy_ref }}/scripts
run: |
sed -i 's|https://github.com/wlallemand/VTest/archive/refs/heads/haproxy-sd_notify.tar.gz|https://github.com/vtest/VTest2/archive/main.tar.gz|' build-vtest.sh
- name: Build haproxy vtest
working-directory: build-dir/haproxy-${{matrix.haproxy_ref}}
run: ./scripts/build-vtest.sh

View File

@@ -2,10 +2,14 @@ name: hostap and wpa-supplicant Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
workflow_dispatch: # Allows people to run it manually if they want but
# disables it from running automatically when broken
# To restore this to an auto test delete the above workflow_dispatch line and
# comments and uncomment the below lines for push and pull_request
# push:
# branches: [ 'master', 'main', 'release/**' ]
# pull_request:
# branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -79,7 +83,8 @@ jobs:
lookup-only: true
- name: Checkout hostap
run: git clone git://w1.fi/hostap.git hostap
if: steps.cache.outputs.cache-hit != 'true'
run: git clone https://w1.fi/hostap.git hostap
build_uml_linux:
name: Build UML (UserMode Linux)
@@ -176,9 +181,6 @@ jobs:
key: hostap-linux-${{ env.LINUX_REF }}
fail-on-cache-miss: true
- name: show file structure
run: tree
# No way to view the full strategy in the browser (really weird)
- name: Print strategy
run: |
@@ -232,7 +234,13 @@ jobs:
- name: Update certs
working-directory: hostap/tests/hwsim/auth_serv
run: ./update.sh
run: |
./update.sh
./sha512-generate.sh
# Force regeneration of rsa3072-ca.key to get rsa3072-generate.sh to
# correctly update all the certs
rm rsa3072-ca.key
./rsa3072-generate.sh
- if: ${{ matrix.config.osp_ref }}
name: Checkout OSP
@@ -328,6 +336,10 @@ jobs:
rm -r /tmp/hwsim-test-logs
done < $GITHUB_WORKSPACE/wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/tests
- name: show errors
if: ${{ failure() && steps.testing.outcome == 'failure' }}
run: grep -riP 'fail|error' /tmp/hwsim-test-logs/latest
# The logs are quite big. It hasn't been useful so far so let's not waste
# precious gh space.
#- name: zip logs

View File

@@ -22,7 +22,7 @@ jobs:
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:

View File

@@ -16,9 +16,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -48,11 +48,11 @@ jobs:
git_ref: [ c3939dac2c060651361fc71516806f9ab8c38901 ]
name: ${{ matrix.git_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: build_wolfssl
steps:
- name: Install dependencies
run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y libreadline8
run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y libreadline-dev
- name: Download lib
uses: actions/download-artifact@v4
with:

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -47,9 +47,9 @@ jobs:
matrix:
config:
- ref: 0.7.0
runner: ubuntu-22.04
runner: ubuntu-24.04
- ref: 0.6.0
runner: ubuntu-22.04
runner: ubuntu-24.04
name: ${{ matrix.config.ref }}
runs-on: ${{ matrix.config.runner }}
needs: build_wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -43,10 +43,10 @@ jobs:
fail-fast: false
matrix:
# List of releases to test
ref: [ 3.3.0 ]
ref: [ 3.7.0 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl

View File

@@ -60,14 +60,27 @@ jobs:
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Build and test libssh2
uses: wolfSSL/actions-build-autotools-project@v1
- name: Clone libssh2
uses: actions/checkout@v4
with:
repository: libssh2/libssh2
ref: libssh2-${{ matrix.ref }}
path: libssh2
configure: --with-crypto=wolfssl --with-libwolfssl-prefix=$GITHUB_WORKSPACE/build-dir
check: true
- name: Build libssh2
working-directory: libssh2
run: |
autoreconf -fi
./configure --with-crypto=wolfssl --with-libwolfssl-prefix=$GITHUB_WORKSPACE/build-dir
- name: Update libssh2 test to use a stable version of debian
working-directory: libssh2
run: |
sed -i 's/testing-slim/oldstable-slim/' tests/openssh_server/Dockerfile
- name: Run libssh2 tests
working-directory: libssh2
run: make -j check
- name: Confirm libssh2 built with wolfSSL
run: ldd libssh2/src/.libs/libssh2.so | grep wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -47,7 +47,7 @@ jobs:
ref: [ 0.9.13, 0.9.14 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: build_wolfssl
steps:
- name: Download lib

54
.github/workflows/linuxkm.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Kernel Module Build
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_library:
strategy:
matrix:
config: [
'EXTRA_CPPFLAGS=-Werror --enable-option-checking=fatal --enable-linuxkm --enable-linuxkm-lkcapi-register=all --enable-all --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-experimental --enable-dual-alg-certs --disable-qt --disable-quic --with-sys-crypto-policy=no --disable-opensslextra --disable-testcert --enable-intelasm --disable-sp-asm --enable-crypttests --enable-linuxkm-benchmarks CFLAGS="-DWOLFSSL_LINUXKM_VERBOSE_DEBUG -Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1" --with-max-rsa-bits=16384',
'EXTRA_CPPFLAGS=-Werror --enable-option-checking=fatal --enable-linuxkm --enable-linuxkm-pie --enable-reproducible-build --enable-linuxkm-lkcapi-register=all --enable-all-crypto --enable-cryptonly --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-experimental --disable-qt --disable-quic --with-sys-crypto-policy=no --disable-opensslextra --disable-testcert --enable-intelasm --disable-sp-asm --enable-crypttests --enable-linuxkm-benchmarks CFLAGS="-DWOLFSSL_LINUXKM_VERBOSE_DEBUG -Wframe-larger-than=2048 -Wstack-usage=4096 -DBENCH_EMBEDDED -DBENCH_MIN_RUNTIME_SEC=0.01 -DBENCH_NTIMES=1 -DBENCH_AGREETIMES=1" --with-max-rsa-bits=16384'
]
name: build module
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Prepare target kernel for module builds
run: |
echo "updating linux-headers"
sudo apt-get update || $(exit 2)
sudo apt-get install linux-headers-$(uname -r) -y || $(exit 3)
echo "preparing target kernel $(uname -r)"
pushd "/lib/modules/$(uname -r)/build" || $(exit 4)
if [ -f /proc/config.gz ]; then gzip -dc /proc/config.gz > /tmp/.config && sudo mv /tmp/.config . || $(exit 5); elif [ -f "/boot/config-$(uname -r)" ]; then sudo cp -p "/boot/config-$(uname -r)" .config || $(exit 6); fi
sudo make -j 4 olddefconfig || $(exit 7)
sudo make M="$(pwd)" modules_prepare || $(exit 8)
popd >/dev/null
- name: autogen.sh
run: |
./autogen.sh || $(exit 9)
- name: Build libwolfssl.ko, targeting GitHub ubuntu-latest, with --enable-all, PQC, and smallstack and stack depth warnings
run: |
echo "running ./configure --with-linux-source=/lib/modules/$(uname -r)/build ${{ matrix.config }}"
./configure --with-linux-source=/lib/modules/$(uname -r)/build ${{ matrix.config }} || $(exit 10)
# try to remove profiling (-pg) because it leads to "_mcleanup: gmon.out: Permission denied"
make -j 4 KERNEL_EXTRA_CFLAGS_REMOVE=-pg FORCE_NO_MODULE_SIG=1 || $(exit 11)
ls -l linuxkm/libwolfssl.ko || $(exit 12)
echo "Successful linuxkm build."

View File

@@ -0,0 +1,26 @@
name: MacOS apple native cert validation tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
if: github.repository_owner == 'wolfssl'
runs-on: macos-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 5
steps:
- name: Build and configure wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
configure: CFLAGS='-DWOLFSSL_APPLE_NATIVE_CERT_VALIDATION -DWOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION -DRSA_MIN_SIZE=2048 -DNO_WOLFSSL_CIPHER_SUITE_TEST'

View File

@@ -54,10 +54,10 @@ jobs:
mbedtls_test:
name: Test interop with mbedtls
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
needs: build_mbedtls
timeout-minutes: 10
if: github.repository_owner == 'wolfssl'
steps:
- name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
@@ -48,7 +48,7 @@ jobs:
- ref: 1.6.22
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: build_wolfssl
steps:
- name: Download lib

142
.github/workflows/mono.yml vendored Normal file
View File

@@ -0,0 +1,142 @@
name: Linux Mono C# Build Test
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL C# Wrapper
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
# Build wolfSSL using the user_settings.h from the C# wrapper directory
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-usersettings CPPFLAGS=-I$GITHUB_WORKSPACE/wolfssl/wrapper/CSharp
install: true
check: false
- name: Install mono-complete
run: |
sudo apt-get update
sudo apt-get install -y mono-complete
- name: Copy wolfSSL.dll to C# wrapper directory
run: |
echo "Copying wolfSSL.dll to C# wrapper directory. $GITHUB_WORKSPACE/build-dir/lib contains:"
ls -la $GITHUB_WORKSPACE/build-dir/lib/*
cp $GITHUB_WORKSPACE/build-dir/lib/libwolfssl.so $GITHUB_WORKSPACE/wolfssl/wrapper/CSharp/wolfssl.dll
cp $GITHUB_WORKSPACE/build-dir/lib/libwolfssl.so $GITHUB_WORKSPACE/wolfssl/wrapper/CSharp/libwolfssl.so
- name: Build and run wolfCrypt test wrapper
working-directory: wolfssl/wrapper/CSharp
run: |
mcs wolfCrypt-Test/wolfCrypt-Test.cs wolfSSL_CSharp/wolfCrypt.cs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs -OUT:wolfcrypttest.exe
mono wolfcrypttest.exe
- name: Build wolfSSL client/server test
working-directory: wolfssl/wrapper/CSharp
env:
LD_LIBRARY_PATH: $GITHUB_WORKSPACE/build-dir/lib
run: |
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs -OUT:server.exe
mcs wolfSSL_CSharp/wolfCrypt.cs wolfSSL-TLS-Client/wolfSSL-TLS-Client.cs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs -OUT:client.exe
- name: Test wolfSSL client/server communication
working-directory: wolfssl/wrapper/CSharp
env:
LD_LIBRARY_PATH: $GITHUB_WORKSPACE/build-dir/lib
run: |
# Start server in background and capture its PID
timeout 10s mono server.exe > server.log 2>&1 &
SERVER_PID=$!
# Wait for server to start
sleep 2
# Run client and capture output
timeout 5s mono client.exe > client.log 2>&1
CLIENT_EXIT_CODE=$?
# Wait a moment for server to process
sleep 1
# Kill server
kill $SERVER_PID 2>/dev/null || true
# Check if client completed successfully (exit code 0)
if [ $CLIENT_EXIT_CODE -eq 0 ]; then
echo "Client completed successfully"
else
echo "Client failed with exit code $CLIENT_EXIT_CODE"
cat client.log
exit 1
fi
# Check for success indicators in logs
if grep -q "SSL version is" client.log && grep -q "SSL cipher suite is" client.log; then
echo "TLS handshake successful - SSL version and cipher suite detected"
else
echo "TLS handshake failed - no SSL version/cipher detected"
echo "Client log:"
cat client.log
echo "Server log:"
cat server.log
exit 1
fi
- name: Test SNI functionality
working-directory: wolfssl/wrapper/CSharp
env:
LD_LIBRARY_PATH: $GITHUB_WORKSPACE/build-dir/lib
run: |
# Start server with SNI support in background
timeout 10s mono server.exe -S > server_sni.log 2>&1 &
SERVER_PID=$!
# Wait for server to start
sleep 2
# Run client with SNI and capture output
timeout 5s mono client.exe -S localhost > client_sni.log 2>&1
CLIENT_EXIT_CODE=$?
# Wait a moment for server to process
sleep 1
# Kill server
kill $SERVER_PID 2>/dev/null || true
# Check if client completed successfully
if [ $CLIENT_EXIT_CODE -eq 0 ]; then
echo "SNI client completed successfully"
else
echo "SNI client failed with exit code $CLIENT_EXIT_CODE"
cat client_sni.log
exit 1
fi
# Check for SNI success indicators
if grep -q "SSL version is" client_sni.log && grep -q "SSL cipher suite is" client_sni.log; then
echo "SNI TLS handshake successful"
else
echo "SNI TLS handshake failed"
echo "Client log:"
cat client_sni.log
echo "Server log:"
cat server_sni.log
exit 1
fi

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -45,7 +45,7 @@ jobs:
ref: [ 2.0.18 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl

View File

@@ -14,27 +14,23 @@ concurrency:
jobs:
msys2:
if: github.repository_owner == 'wolfssl'
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { sys: ucrt64, compiler: mingw-w64-ucrt-x86_64-gcc }
- { sys: mingw64, compiler: mingw-w64-x86_64-gcc }
- { sys: msys, compiler: gcc }
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
msystem: msys
update: true
install: git ${{matrix.compiler}} autotools base-devel autoconf netcat
install: git gcc autotools base-devel autoconf netcat
- name: configure wolfSSL
run: ./autogen.sh && ./configure CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
run: ./autogen.sh && ./configure --disable-sys-ca-certs CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
- name: build wolfSSL
run: make
- name: run tests
run: make check
- name: Display log
if: always()

View File

@@ -30,12 +30,14 @@ jobs:
- HOST: riscv64-linux-gnu
CC: riscv64-linux-gnu-gcc
ARCH: riscv64
EXTRA_OPTS: --enable-riscv-asm
# Config to ensure CPUs without Thumb instructions compiles
- HOST: arm-linux-gnueabi
CC: arm-linux-gnueabi-gcc
CFLAGS: -marm -DWOLFSSL_SP_ARM_ARCH=6
ARCH: armel
EXTRA_OPTS: --enable-sp-asm
opts: [ '-O2', '-O3', '-O1 -UFP_ECC', '-O0', '-Os', '-Ofast' ]
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
@@ -46,12 +48,12 @@ jobs:
sudo apt update
sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
- uses: actions/checkout@v4
- name: Build
- name: Build for ${{ matrix.ARCH }} with Opt Level ${{ matrix.opts }}
env:
CC: ${{ matrix.CC }}
CFLAGS: ${{ matrix.CFLAGS }}
CFLAGS: ${{ matrix.CFLAGS }} ${{ matrix.opts }}
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples CPPFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT" ${{ matrix.EXTRA_OPTS }} && make
- name: Print errors
if: ${{ failure() }}
run: |

View File

@@ -31,18 +31,12 @@ jobs:
- CC: gcc-12
CXX: g++-12
OS: ubuntu-24.04
- CC: clang-11
CXX: clang++-11
OS: ubuntu-22.04
- CC: clang-12
CXX: clang++-12
OS: ubuntu-22.04
- CC: clang-13
CXX: clang++-13
OS: ubuntu-22.04
- CC: clang-14
CXX: clang++-14
OS: ubuntu-24.04
- CC: clang-19
CXX: clang++-19
OS: ubuntu-24.04
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.OS }}
# This should be a safe limit for the tests to run.
@@ -55,7 +49,7 @@ jobs:
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
run: ./autogen.sh && ./configure && make && make dist
run: ./autogen.sh && ./configure CFLAGS="-pedantic -Wdeclaration-after-statement" && make && make dist
- name: Show log on errors
if: ${{ failure() }}
run: |

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -48,7 +48,7 @@ jobs:
test_opts: -e 'agentxperl'
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -107,7 +107,7 @@ jobs:
stream_proxy_ssl_verify.t
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
needs: build_wolfssl
@@ -122,7 +122,28 @@ jobs:
- name: Install dependencies
run: |
sudo cpan -iT Proc::Find Net::SSLeay IO::Socket::SSL
sudo cpan -iT Proc::Find
# Locking in the version of SSLeay used with testing
- name: Download and install Net::SSLeay 1.94 manually
run: |
curl -LO https://www.cpan.org/modules/by-module/Net/CHRISN/Net-SSLeay-1.94.tar.gz
tar -xzf Net-SSLeay-1.94.tar.gz
cd Net-SSLeay-1.94
perl Makefile.PL
make
sudo make install
# SSL version 2.091 changes '' return to undef causing test case to fail.
# Locking in the test version to use as 2.090
- name: Download and install IO::Socket::SSL 2.090 manually
run: |
curl -LO https://www.cpan.org/modules/by-module/IO/IO-Socket-SSL-2.090.tar.gz
tar -xzf IO-Socket-SSL-2.090.tar.gz
cd IO-Socket-SSL-2.090
perl Makefile.PL
make
sudo make install
- name: Checkout wolfssl-nginx
uses: actions/checkout@v4

View File

@@ -18,11 +18,11 @@ jobs:
matrix:
config: [
# Add new configs here
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024"',
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024 -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:

49
.github/workflows/no-tls.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: --disable-tls Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--disable-tls --enable-all CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

View File

@@ -21,7 +21,7 @@ jobs:
build_nss:
name: Build nss
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
steps:
@@ -59,10 +59,10 @@ jobs:
nss_test:
name: Test interop with nss
runs-on: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
needs: build_nss
timeout-minutes: 10
if: github.repository_owner == 'wolfssl'
steps:
- name: Checking if we have nss in cache
uses: actions/cache/restore@v4

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -47,7 +47,7 @@ jobs:
ref: [ 4.2.8p15, 4.2.8p17 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl

View File

@@ -16,7 +16,7 @@ jobs:
ocsp_stapling:
name: ocsp stapling
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout wolfSSL

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -49,7 +50,8 @@ jobs:
- osp_ref: 2.6.7
git_ref: OPENLDAP_REL_ENG_2_6_7
name: ${{ matrix.osp_ref }}
runs-on: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 20
needs: build_wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -45,11 +45,33 @@ jobs:
fail-fast: false
matrix:
include:
# A good way to measure how much each test takes is to create a bash script
# in the openssh root like this (make it executable):
# time-measure.sh
# #!/bin/bash
# /usr/bin/time -a -o /tmp/LTESTS-times.txt -f '%e %C' /usr/bin/bash "$@"
# And invoke the openssh tests like this:
# rm -f /tmp/LTESTS-times.txt && \
# make tests TEST_SHELL=$(pwd)/time-measure.sh SKIP_UNIT=yes && \
# grep test-exec.sh /tmp/LTESTS-times.txt
- git_ref: 'V_9_6_P1'
osp_ver: '9.6'
name: ${{ matrix.ref }}
SKIP_LTESTS: >-
exit-status rekey multiplex cert-userkey forward-control integrity
channel-timeout connection-timeout
- git_ref: 'V_9_9_P2'
osp_ver: '9.9p2'
SKIP_LTESTS: >-
exit-status rekey multiplex cert-userkey forward-control integrity
channel-timeout connection-timeout
- git_ref: 'V_10_0_P2'
osp_ver: '10.0p2'
SKIP_LTESTS: >-
exit-status rekey multiplex forward-control channel-timeout
connection-timeout
name: ${{ matrix.osp_ver }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: build_wolfssl
steps:
- name: Download lib
@@ -80,5 +102,4 @@ jobs:
- name: Run tests
working-directory: ./openssh
run: |
# Run all the tests except (t-exec) as it takes too long
make file-tests interop-tests extra-tests unit
make tests SKIP_LTESTS='${{ matrix.SKIP_LTESTS }}'

View File

@@ -18,12 +18,12 @@ jobs:
matrix:
config: [
# Add new configs here
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic"',
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -DTEST_OPENSSL_COEXIST"'
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -DTEST_OPENSSL_COEXIST -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -46,7 +46,7 @@ jobs:
ref: [ release/2.6, master ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl

View File

@@ -17,12 +17,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-latest ]
os: [ ubuntu-24.04, macos-latest ]
config: [
# Add new configs here
'',
'--enable-all --enable-asn=template',
'--enable-all --enable-asn=original',
'--enable-all --enable-asn=template CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
'--enable-all --enable-asn=original CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
'--enable-harden-tls',
'--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
--enable-opensslextra --enable-sessioncerts
@@ -39,9 +41,46 @@ jobs:
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
--enable-dtls-mtu',
'--enable-dtls --enable-dtlscid --enable-dtls13 --enable-secure-renegotiation
--enable-psk --enable-aesccm --enable-nullcipher CPPFLAGS=-DWOLFSSL_STATIC_RSA',
--enable-psk --enable-aesccm --enable-nullcipher
CPPFLAGS=-DWOLFSSL_STATIC_RSA',
'--enable-ascon --enable-experimental',
'--enable-ascon CPPFLAGS=-DWOLFSSL_ASCON_UNROLL --enable-experimental',
'--enable-all CPPFLAGS=''-DNO_AES_192 -DNO_AES_256'' ',
'--enable-sniffer --enable-curve25519 --enable-curve448 --enable-enckeys
CPPFLAGS=-DWOLFSSL_DH_EXTRA',
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
--enable-dtls-mtu CPPFLAGS=-DWOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS',
'--enable-opensslall --enable-opensslextra CPPFLAGS=-DWC_RNG_SEED_CB',
'--enable-opensslall --enable-opensslextra
CPPFLAGS=''-DWC_RNG_SEED_CB -DWOLFSSL_NO_GETPID'' ',
'--enable-opensslextra CPPFLAGS=''-DWOLFSSL_NO_CA_NAMES'' ',
'--enable-opensslextra=x509small',
'CPPFLAGS=''-DWOLFSSL_EXTRA'' ',
'--enable-lms=small,verify-only --enable-xmss=small,verify-only',
'--disable-sys-ca-certs',
'--enable-all CPPFLAGS=-DWOLFSSL_DEBUG_CERTS ',
'--enable-all CPPFLAGS="-DWOLFSSL_CHECK_MEM_ZERO"',
'--enable-coding=no',
'--enable-dtls --enable-dtls13 --enable-ocspstapling --enable-ocspstapling2
--enable-cert-setup-cb --enable-sessioncerts',
'--enable-dtls --enable-dtls13 --enable-tls13
CPPFLAGS=-DWOLFSSL_TLS13_IGNORE_PT_ALERT_ON_ENC',
'--disable-sni --disable-ecc --disable-tls13 --disable-secure-renegotiation-info',
'CPPFLAGS=-DWOLFSSL_BLIND_PRIVATE_KEY',
'--enable-all --enable-certgencache',
'--enable-sessionexport --enable-dtls --enable-dtls13',
'--enable-sessionexport',
'--disable-examples CPPFLAGS=-DWOLFSSL_NO_MALLOC',
'CPPFLAGS=-DNO_WOLFSSL_CLIENT',
'CPPFLAGS=-DNO_WOLFSSL_SERVER',
'CPPFLAGS=-DWOLFSSL_NO_CLIENT_AUTH',
'CPPFLAGS=''-DNO_WOLFSSL_CLIENT -DWOLFSSL_NO_CLIENT_AUTH''',
'CPPFLAGS=''-DNO_WOLFSSL_SERVER -DWOLFSSL_NO_CLIENT_AUTH''',
'--enable-all CPPFLAGS=-DNO_WOLFSSL_CLIENT',
'--enable-all CPPFLAGS=-DNO_WOLFSSL_SERVER',
'--enable-all CPPFLAGS=-DWOLFSSL_NO_CLIENT_AUTH',
'--enable-all CPPFLAGS=''-DNO_WOLFSSL_CLIENT -DWOLFSSL_NO_CLIENT_AUTH''',
'--enable-all CPPFLAGS=''-DNO_WOLFSSL_SERVER -DWOLFSSL_NO_CLIENT_AUTH''',
]
name: make check
if: github.repository_owner == 'wolfssl'
@@ -52,14 +91,14 @@ jobs:
- name: Build and test wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
configure: ${{ matrix.config }}
configure: CFLAGS="-pedantic -Wno-overlength-strings -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" ${{ matrix.config }}
check: true
make_user_settings:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-latest ]
os: [ ubuntu-24.04, macos-latest ]
user-settings: [
# Add new user_settings.h here
'examples/configs/user_settings_all.h',
@@ -81,15 +120,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-latest ]
os: [ ubuntu-24.04, macos-latest ]
user-settings: [
# Add new user_settings.h here
# Add new user_settings.h here (alphabetical order)
'examples/configs/user_settings_ca.h',
'examples/configs/user_settings_dtls13.h',
'examples/configs/user_settings_EBSnet.h',
'examples/configs/user_settings_eccnonblock.h',
'examples/configs/user_settings_min_ecc.h',
'examples/configs/user_settings_wolfboot_keytools.h',
'examples/configs/user_settings_wolftpm.h',
'examples/configs/user_settings_wolfssh.h',
'examples/configs/user_settings_openssl_compat.h',
'examples/configs/user_settings_pkcs7.h',
'examples/configs/user_settings_rsa_only.h',
'examples/configs/user_settings_template.h',
'examples/configs/user_settings_tls12.h',
'examples/configs/user_settings_tls13.h',
'examples/configs/user_settings_wolfboot_keytools.h',
'examples/configs/user_settings_wolfssh.h',
'examples/configs/user_settings_wolftpm.h',
# Not included (require special setup):
# - user_settings_pq.h: Requires --enable-experimental
# - user_settings_baremetal.h: Requires static memory, custom platform
]
name: make user_setting.h (testwolfcrypt only)
if: github.repository_owner == 'wolfssl'
@@ -112,7 +162,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-latest ]
os: [ ubuntu-24.04, macos-latest ]
name: make user_setting.h (with sed)
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}

View File

@@ -16,7 +16,7 @@ jobs:
build_wolfssl:
name: Package wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -45,8 +45,8 @@ jobs:
- name: Confirm packages built
run: |
DEB_COUNT=$(find -name 'libwolfssl*.deb' | wc -l)
if [ "$DEB_COUNT" != "2" ]; then
echo Did not find exactly two deb packages!!!
if [ "$DEB_COUNT" != "3" ]; then
echo Did not find exactly three deb packages!!!
exit 1
fi
# disabled 20240919 -- broken target.

View File

@@ -18,7 +18,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -48,7 +48,7 @@ jobs:
git_ref: [ e4b13e6725abb178f62ee897fe1c0e81b06a9431 ]
name: ${{ matrix.git_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: build_wolfssl
steps:
- name: Install dependencies

View File

@@ -18,12 +18,19 @@ jobs:
matrix:
config: [
# Add new configs here
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++'
'--enable-intelasm --enable-sp-asm --enable-mlkem=yes,kyber,ml-kem CPPFLAGS="-DWOLFSSL_ML_KEM_USE_OLD_IDS"',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
'--enable-smallstack --enable-smallstackcache --enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFSSL_BLIND_PRIVATE_KEY"',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFSSL_BLIND_PRIVATE_KEY"',
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ"',
'--disable-intelasm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem,small --enable-lms=yes,small --enable-xmss=yes,small --enable-dilithium=yes,small --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFSSL_MLKEM_MAKEKEY_SMALL_MEM -DWOLFSSL_MLKEM_ENCAPSULATE_SMALL_MEM -DWOLFSSL_MLKEM_NO_LARGE_CODE -DWOLFSSL_DILITHIUM_SIGN_SMALL_MEM -DWOLFSSL_DILITHIUM_VERIFY_SMALL_MEM -DWOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM -DWOLFSSL_DILITHIUM_NO_LARGE_CODE"',
'--disable-intelasm --enable-smallstack --enable-smallstackcache --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-mlkem=yes,kyber,ml-kem,small --enable-lms=yes,small --enable-xmss=yes,small --enable-dilithium=yes,small --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFSSL_MLKEM_MAKEKEY_SMALL_MEM -DWOLFSSL_MLKEM_ENCAPSULATE_SMALL_MEM -DWOLFSSL_MLKEM_NO_LARGE_CODE -DWOLFSSL_DILITHIUM_SIGN_SMALL_MEM -DWOLFSSL_DILITHIUM_VERIFY_SMALL_MEM -DWOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM -DWOLFSSL_DILITHIUM_NO_LARGE_CODE"',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:

51
.github/workflows/psk.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: PSK Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--enable-psk C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-rsa --disable-ecc --disable-dh',
'--disable-oldtls --disable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all',
'--disable-oldtls --disable-tlsv12 --enable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

271
.github/workflows/renode-stm32h753.yml vendored Normal file
View File

@@ -0,0 +1,271 @@
name: Renode STM32H753 Test
# Platform-specific configuration
# To add a new platform, create a new workflow file based on this template
# and update these variables for the target MCU
env:
PLATFORM_NAME: stm32h753
PLATFORM_DISPLAY_NAME: STM32H753
CMSIS_DEVICE_REPO: cmsis-device-h7
CMSIS_DEVICE_PATH: /opt/cmsis-device-h7
CMSIS_DEVICE_CACHE_KEY: cmsis-device-h7-v1
STM32CUBE_REPO: STM32CubeH7
STM32CUBE_BRANCH: v1.11.2
STM32CUBE_PATH: /opt/STM32CubeH7
STM32CUBE_CACHE_KEY: stm32cubeh7-v1.11.2-v1
HAL_CONFIG_FILE: stm32h7xx_hal_conf.h
HAL_DRIVER_INC_PATH: STM32H7xx_HAL_Driver/Inc
HAL_DRIVER_SRC_PATH: STM32H7xx_HAL_Driver/Src
RENODE_PLATFORM_NAME: stm32h753
RENODE_REPL_PATH: platforms/cpus/stm32h753.repl
RENODE_TEST_DIR: .github/renode-test/stm32h753
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout wolfSSL
uses: actions/checkout@v4
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
ninja-build \
python3 \
git \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
wget \
unzip
- name: Cache CMSIS Device
id: cache-cmsis-device
uses: actions/cache@v4
with:
path: ${{ env.CMSIS_DEVICE_PATH }}
key: ${{ env.CMSIS_DEVICE_CACHE_KEY }}
restore-keys: |
${{ env.CMSIS_DEVICE_CACHE_KEY }}-
- name: Cache CMSIS 5
id: cache-cmsis-5
uses: actions/cache@v4
with:
path: /opt/CMSIS_5
key: cmsis-5-v1
restore-keys: |
cmsis-5-
- name: Cache STM32Cube
id: cache-stm32cube
uses: actions/cache@v4
with:
path: ${{ env.STM32CUBE_PATH }}
key: ${{ env.STM32CUBE_CACHE_KEY }}
restore-keys: |
${{ env.STM32CUBE_CACHE_KEY }}-
- name: Cache Renode
id: cache-renode
uses: actions/cache@v4
with:
path: /opt/renode
key: renode-1.15.3-v1
restore-keys: |
renode-1.15.3-
- name: Install Renode dependencies
run: |
# Install Mono and other dependencies needed for Renode (always needed, even when cached)
sudo apt-get install -y --no-install-recommends \
mono-runtime \
libmono-cil-dev \
screen \
policykit-1 || true
- name: Install Renode (if not cached)
if: steps.cache-renode.outputs.cache-hit != 'true'
run: |
# Install Renode by extracting .deb (avoids GUI dependency issues for headless use)
cd /tmp
wget -q https://github.com/renode/renode/releases/download/v1.15.3/renode_1.15.3_amd64.deb
# Extract the .deb file
dpkg-deb -x renode_1.15.3_amd64.deb /tmp/renode-extract
# Copy Renode files to system locations
sudo mkdir -p /opt/renode
sudo cp -r /tmp/renode-extract/opt/renode/* /opt/renode/ || true
sudo cp -r /tmp/renode-extract/usr/* /usr/ || true
# Create symlink for easy access
if [ -f /opt/renode/renode ]; then
sudo ln -sf /opt/renode/renode /usr/local/bin/renode
elif [ -f /usr/bin/renode ]; then
echo "Renode already in PATH at /usr/bin/renode"
fi
# Cleanup
rm -rf /tmp/renode-extract renode_1.15.3_amd64.deb
- name: Setup Renode symlinks and permissions
run: |
# When Renode is cached, we need to recreate /usr/bin/renode wrapper script
# The /usr/bin/renode is a wrapper that checks Mono and calls /opt/renode/bin/Renode.exe
if [ -d /opt/renode ] && [ ! -x /usr/bin/renode ]; then
echo "Renode cached but /usr/bin/renode wrapper missing, recreating..."
# Create the wrapper script
sudo bash -c 'cat > /usr/bin/renode << '\''SCRIPT_EOF'\''
#!/bin/sh
MONOVERSION=5.20
REQUIRED_MAJOR=5
REQUIRED_MINOR=20
LAUNCHER=mono
if ! [ -x "$(command -v $LAUNCHER)" ]
then
echo "$LAUNCHER not found. Renode requires Mono $MONOVERSION or newer. Please refer to documentation for installation instructions. Exiting!"
exit 1
fi
# Check installed mono version
INSTALLED_MONO=`$LAUNCHER --version | head -n1 | cut -d'\'' '\'' -f5`
INSTALLED_MONO_MAJOR=`echo $INSTALLED_MONO | cut -d'\''.'\'' -f1`
INSTALLED_MONO_MINOR=`echo $INSTALLED_MONO | cut -d'\''.'\'' -f2`
if [ $INSTALLED_MONO_MAJOR -lt $REQUIRED_MAJOR ] || [ $INSTALLED_MONO_MAJOR -eq $REQUIRED_MAJOR -a $INSTALLED_MONO_MINOR -lt $REQUIRED_MINOR ]
then
echo "Wrong Mono version detected: $INSTALLED_MONO. Renode requires Mono $MONOVERSION or newer. Please refer to documentation for installation instructions. Exiting!"
exit 1
fi
exec $LAUNCHER $MONO_OPTIONS /opt/renode/bin/Renode.exe "$@"
SCRIPT_EOF'
sudo chmod +x /usr/bin/renode
echo "Created /usr/bin/renode wrapper script"
fi
# Also ensure /usr/local/bin/renode symlink exists
if [ -x /usr/bin/renode ] && [ ! -x /usr/local/bin/renode ]; then
sudo ln -sf /usr/bin/renode /usr/local/bin/renode
echo "Created symlink: /usr/local/bin/renode -> /usr/bin/renode"
fi
- name: Verify Renode installation
run: |
# Verify Renode is installed and accessible
RENODE_FOUND=false
RENODE_BIN=""
# Check various possible locations
for path in /opt/renode/renode /opt/renode/bin/renode /usr/local/bin/renode /usr/bin/renode; do
if [ -x "$path" ]; then
echo "Renode found at $path"
"$path" --version || true
RENODE_BIN="$path"
RENODE_FOUND=true
break
fi
done
if [ "$RENODE_FOUND" != "true" ]; then
echo "ERROR: Renode binary not found or not executable!"
echo "Searching for renode..."
find /opt /usr -name renode -type f 2>/dev/null | head -10 || true
echo "Checking /opt/renode contents:"
ls -la /opt/renode/ 2>/dev/null | head -10 || true
if [ -d /opt/renode ]; then
echo "Checking /opt/renode subdirectories:"
find /opt/renode -type f -name "*renode*" 2>/dev/null | head -10 || true
fi
exit 1
fi
- name: Clone CMSIS Device (if not cached)
if: steps.cache-cmsis-device.outputs.cache-hit != 'true'
run: |
sudo mkdir -p /opt
sudo git clone --depth 1 https://github.com/STMicroelectronics/${{ env.CMSIS_DEVICE_REPO }}.git ${{ env.CMSIS_DEVICE_PATH }}
- name: Clone CMSIS 5 (if not cached)
if: steps.cache-cmsis-5.outputs.cache-hit != 'true'
run: |
sudo mkdir -p /opt
sudo git clone --depth 1 https://github.com/ARM-software/CMSIS_5.git /opt/CMSIS_5
- name: Clone STM32Cube (if not cached)
if: steps.cache-stm32cube.outputs.cache-hit != 'true'
run: |
sudo mkdir -p /opt
sudo git clone --depth 1 --branch ${{ env.STM32CUBE_BRANCH }} --recurse-submodules https://github.com/STMicroelectronics/${{ env.STM32CUBE_REPO }}.git ${{ env.STM32CUBE_PATH }} || \
(sudo git clone --depth 1 --branch ${{ env.STM32CUBE_BRANCH }} https://github.com/STMicroelectronics/${{ env.STM32CUBE_REPO }}.git ${{ env.STM32CUBE_PATH }} && \
cd ${{ env.STM32CUBE_PATH }} && sudo git submodule update --init --recursive --depth 1)
- name: Setup firmware build directory and helper files
run: |
sudo mkdir -p /opt/firmware
# Copy helper files from repository
sudo cp -r ${{ github.workspace }}/${{ env.RENODE_TEST_DIR }}/* /opt/firmware/
# Copy HAL config to STM32Cube directory
sudo cp /opt/firmware/${{ env.HAL_CONFIG_FILE }} ${{ env.STM32CUBE_PATH }}/Drivers/${{ env.HAL_DRIVER_INC_PATH }}/ 2>/dev/null || true
sudo chmod +x /opt/firmware/entrypoint.sh
# Create .renode-root file so Renode can find platform files
# Try to find Renode installation directory and create .renode-root with proper permissions
if [ -d "/opt/renode/platforms" ]; then
echo "/opt/renode" | sudo tee /opt/firmware/.renode-root > /dev/null
sudo chmod 644 /opt/firmware/.renode-root
elif [ -d "/usr/lib/renode/platforms" ]; then
echo "/usr/lib/renode" | sudo tee /opt/firmware/.renode-root > /dev/null
sudo chmod 644 /opt/firmware/.renode-root
elif [ -d "/usr/share/renode/platforms" ]; then
echo "/usr/share/renode" | sudo tee /opt/firmware/.renode-root > /dev/null
sudo chmod 644 /opt/firmware/.renode-root
fi
- name: Build wolfSSL firmware (NOT CACHED - rebuilds on every run)
env:
WOLFSSL_ROOT: /opt/wolfssl
run: |
# Copy wolfSSL source (this is NOT cached - fresh checkout each time)
sudo cp -r ${{ github.workspace }} /opt/wolfssl
# Build with CMake
cd /opt/firmware
sudo cmake -G Ninja \
-DWOLFSSL_USER_SETTINGS=ON \
-DUSER_SETTINGS_FILE=/opt/firmware/user_settings.h \
-DCMAKE_TOOLCHAIN_FILE=/opt/firmware/toolchain-arm-none-eabi.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DWOLFSSL_CRYPT_TESTS=OFF \
-DWOLFSSL_EXAMPLES=OFF \
-B /opt/firmware/build \
-S /opt/firmware
sudo cmake --build /opt/firmware/build
# Verify ELF file was created and copy it to expected location
if [ -f "/opt/firmware/build/wolfcrypt_test.elf" ]; then
sudo cp /opt/firmware/build/wolfcrypt_test.elf /opt/firmware/wolfcrypt_test.elf
echo "ELF file copied to /opt/firmware/wolfcrypt_test.elf"
ls -lh /opt/firmware/wolfcrypt_test.elf
else
echo "ERROR: ELF file not found at /opt/firmware/build/wolfcrypt_test.elf"
echo "Searching for ELF files..."
find /opt/firmware/build -name "*.elf" 2>/dev/null || true
exit 1
fi
- name: Run Renode test
run: |
# Ensure PATH includes standard binary locations for sudo
sudo env PATH="$PATH" /opt/firmware/entrypoint.sh

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -47,7 +47,7 @@ jobs:
ref: [ 6.16 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
@@ -101,7 +101,7 @@ jobs:
# Retry up to five times
for i in {1..5}; do
TEST_RES=0
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib make check || TEST_RES=$?
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib RNGD_JITTER_TIMEOUT=100 make check || TEST_RES=$?
if [ "$TEST_RES" -eq "0" ]; then
break
fi

74
.github/workflows/rust-wrapper.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
name: Build Rust Wrapper
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL Rust Wrapper
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: ${{ matrix.config }}
- name: Build Rust Wrapper
working-directory: wolfssl
run: make -C wrapper/rust
- name: Run Rust Wrapper Tests
working-directory: wolfssl
run: make -C wrapper/rust test
strategy:
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
config: [
# Add new configs here
'',
'--enable-all',
'--enable-cryptonly --disable-examples',
'--enable-cryptonly --disable-examples --disable-aes --disable-aesgcm',
'--enable-cryptonly --disable-examples --disable-aescbc',
'--enable-cryptonly --disable-examples --disable-aeseax',
'--enable-cryptonly --disable-examples --disable-aesecb',
'--enable-cryptonly --disable-examples --disable-aesccm',
'--enable-cryptonly --disable-examples --disable-aescfb',
'--enable-cryptonly --disable-examples --disable-aesctr',
'--enable-cryptonly --disable-examples --disable-aescts',
'--enable-cryptonly --disable-examples --disable-aesgcm',
'--enable-cryptonly --disable-examples --disable-aesgcm-stream',
'--enable-cryptonly --disable-examples --disable-aesofb',
'--enable-cryptonly --disable-examples --disable-aesxts',
'--enable-cryptonly --disable-examples --disable-cmac',
'--enable-cryptonly --disable-examples --disable-dh',
'--enable-cryptonly --disable-examples --disable-ecc',
'--enable-cryptonly --disable-examples --disable-ed25519',
'--enable-cryptonly --disable-examples --disable-ed25519-stream',
'--enable-cryptonly --disable-examples --disable-ed448',
'--enable-cryptonly --disable-examples --disable-ed448-stream',
'--enable-cryptonly --disable-examples --disable-hkdf',
'--enable-cryptonly --disable-examples --disable-hmac',
'--enable-cryptonly --disable-examples --disable-rng',
'--enable-cryptonly --disable-examples --disable-rsa',
'--enable-cryptonly --disable-examples --disable-rsapss',
'--enable-cryptonly --disable-examples --disable-sha224',
'--enable-cryptonly --disable-examples --disable-sha3',
'--enable-cryptonly --disable-examples --disable-sha384',
'--enable-cryptonly --disable-examples --disable-sha512',
'--enable-cryptonly --disable-examples --disable-shake128',
'--enable-cryptonly --disable-examples --disable-shake256',
'--enable-cryptonly --disable-examples --disable-srtp-kdf',
'--enable-cryptonly --disable-examples --disable-x963kdf',
]

53
.github/workflows/smallStackSize.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Stack Size warnings
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_library:
strategy:
matrix:
config: [
# defaults, noasm
'--disable-asm',
# defaults + native PQ, no asm
'--disable-asm --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
# all-crypto + native PQ, no asm
'--disable-asm --enable-all-crypto --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
# defaults, intelasm + sp-asm
'--enable-intelasm --enable-sp-asm',
# defaults + native PQ, intelasm + sp-asm
'--enable-intelasm --enable-sp-asm --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
# all-crypto + native PQ, intelasm + sp-asm
'--enable-intelasm --enable-sp-asm --enable-all-crypto --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium'
]
name: build library
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Build wolfCrypt with smallstack and stack depth warnings, and run testwolfcrypt
run: |
./autogen.sh || $(exit 2)
echo "running ./configure ... ${{ matrix.config }}"
./configure --enable-cryptonly --disable-cryptocb --disable-testcert --enable-smallstack --enable-smallstackcache --enable-crypttests --disable-benchmark --disable-examples --with-max-rsa-bits=16384 --enable-stacksize=verbose CFLAGS="-Wframe-larger-than=2048 -Wstack-usage=4096 -DWOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES=8192 -DTEST_ALWAYS_RUN_TO_END" ${{ matrix.config }} || $(exit 3)
make -j 4 || $(exit 4)
./wolfcrypt/test/testwolfcrypt

View File

@@ -16,7 +16,7 @@ jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 4
steps:
- name: Build wolfSSL
@@ -39,7 +39,7 @@ jobs:
socat_check:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
needs: build_wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -47,7 +47,7 @@ jobs:
ref: [ 2.6.1 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 20
needs: build_wolfssl

View File

@@ -17,7 +17,7 @@ jobs:
if: github.repository_owner == 'wolfssl'
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -40,14 +40,14 @@ jobs:
retention-days: 5
sssd_check:
if: github.repository_owner == 'wolfssl'
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 2.9.1 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
container:
image: quay.io/sssd/ci-client-devel:ubuntu-latest
env:

View File

@@ -17,7 +17,7 @@ jobs:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -46,7 +46,7 @@ jobs:
ref: [ 5.67 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl

70
.github/workflows/symbol-prefixes.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: WOLFSSL_API_PREFIX_MAP
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_and_analyze:
strategy:
matrix:
config: [
'--enable-all --enable-mlkem --enable-mldsa --enable-xmss --enable-lms --enable-acert --with-sys-crypto-policy CFLAGS=-DWOLFSSL_API_PREFIX_MAP'
]
name: make and analyze
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test --enable-opensslcoexist and TEST_OPENSSL_COEXIST
run: |
./autogen.sh || $(exit 2)
./configure ${{ matrix.config }} || $(exit 3)
make -j 4 || $(exit 4)
# ignore properly prefixed symbols, and symbols associated with asm implementations (all internal) regardless of prefix:
readelf --symbols --wide src/.libs/libwolfssl.so | \
awk '
BEGIN {
total_public_symbols = 0;
unprefixed_public_symbols = 0;
}
{
if (($5 == "GLOBAL") && ($6 != "HIDDEN") && ($7 ~ /^[0-9]+$/)) {
++total_public_symbols;
}
}
{
if (($7 !~ /^[0-9]+$/) ||
($8 ~ /^(wc_|wolf|WOLF|__pfx|fe_|sp_[a-zA-Z090-0_]*[0-9])/) ||
($8 ~ /(_avx[12]|_AVX[12]|_sse[12]|_SSE[12]|_aesni|_AESNI|_bmi2|_x64$)/))
{
next;
}
}
{
if (($4 == "FUNC") && ($5 == "GLOBAL") && ($6 == "DEFAULT")) {
++unprefixed_public_symbols;
print;
}
}
END {
if (unprefixed_public_symbols) {
print unprefixed_public_symbols " unprefixed public symbols found, of " total_public_symbols " total." >"/dev/stderr";
exit(1);
} else {
print total_public_symbols " public symbols found in libwolfssl, all OK.";
exit(0);
}
}' || $(exit 5)

57
.github/workflows/threadx.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: ThreadXBuild Test
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Cache NetXDuo bundle
id: cache-netxduo
uses: actions/cache@v3
with:
path: ./v6.4.3_rel.tar.gz
key: netxduo-bundle-v6.4.3_rel
- name: Download NetXDuo bundle if not cached
if: steps.cache-netxduo.outputs.cache-hit != 'true'
run: |
wget https://github.com/eclipse-threadx/netxduo/archive/refs/tags/v6.4.3_rel.tar.gz
- name: Extract NetXDuo bundle
run: |
mkdir -p netxduo_src
tar -xzf v6.4.3_rel.tar.gz -C netxduo_src --strip-components=1
- name: Install NetXDuo Dependencies
working-directory: ./netxduo_src
run: |
./scripts/install.sh
- name: Configure NetX with DNS Client Support
working-directory: ./netxduo_src
run: |
cp addons/dns/nxd_dns.h ./common/inc/
cp addons/dns/nxd_dns.c ./common/src/
- name: Build NetXDuo with DNS Support
working-directory: ./netxduo_src
run: |
rm -rf test/cmake/threadx
rm -rf test/cmake/filex
./scripts/build_nxd64.sh
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-enckeys --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-DTHREADX -DHAVE_NETX -DWOLFSSL_USER_IO -I${{ github.workspace }}/netxduo_src/common/inc -I${{ github.workspace }}/netxduo_src/ports/linux/gnu/inc -I${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/inc" LDFLAGS="-L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/default_build_coverage/netxduo -L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/threadx" LIBS="-lnetxduo -lthreadx"
install: false

60
.github/workflows/trackmemory.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: WOLFSSL_TRACK_MEMORY Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY"',
'--enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY"',
'--enable-smallstackcache --enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY"',
# Note the below smallstackcache tests are crucial coverage for the Linux kernel
# module, when targeting a kernel with the randomness patch (linuxkm/patches/)
# applied.
#
# Note, don't combine wolfEntropy with the full TLS cipher suite test -- the implicit wc_InitRng()s in each suite have an enormous CPU footprint.
'--enable-wolfEntropy --enable-smallstackcache --enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DNO_WOLFSSL_CIPHER_SUITE_TEST"',
'--enable-intelrdseed --enable-smallstackcache --enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DNO_WOLFSSL_CIPHER_SUITE_TEST"',
'--enable-amdrand --enable-smallstackcache --enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DNO_WOLFSSL_CIPHER_SUITE_TEST"',
'--disable-asm --enable-wolfEntropy --enable-smallstackcache --enable-smallstack --enable-all CFLAGS="-DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY -DNO_WOLFSSL_CIPHER_SUITE_TEST"'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

View File

@@ -62,6 +62,10 @@ jobs:
uses: open-watcom/setup-watcom@v0
with:
version: ${{ matrix.platform.owimage }}
# Currently fixed to a monthly build because of historical instability with daily releases.
# See https://github.com/wolfSSL/wolfssl/pull/9167
# Pin to monthly release as needed:
tag: 2025-11-03-Build
- name: Checkout wolfSSL
uses: actions/checkout@v4

View File

@@ -22,17 +22,24 @@ jobs:
'--enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-smallstack --disable-asm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-smallstack --enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion -DNO_INT128"'
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion -DNO_INT128"',
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wdeclaration-after-statement -Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion" --enable-32bit CFLAGS=-m32'
]
name: build library
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: install_multilib
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y gcc-multilib
- name: Build wolfCrypt with extra type conversion warnings
run: |
./autogen.sh || $(exit 2)

89
.github/workflows/xcode.yml vendored Normal file
View File

@@ -0,0 +1,89 @@
name: Xcode Build Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build:
if: github.repository_owner == 'wolfssl'
runs-on: macos-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 10
strategy:
matrix:
include:
# macOS builds
- target: wolfssl_osx
arch: arm64
config: Release
sdk: macosx
name: macOS (ARM64, Release)
- target: wolfssl_osx
arch: x86_64
config: Release
sdk: macosx
name: macOS (x86_64, Release)
- target: wolfssl_osx
arch: arm64
config: Debug
sdk: macosx
name: macOS (ARM64, Debug)
- target: wolfssl_osx
arch: x86_64
config: Debug
sdk: macosx
name: macOS (x86_64, Debug)
# Universal build (both architectures)
- target: wolfssl_osx
arch: arm64
arch2: x86_64
config: Release
sdk: macosx
name: macOS (Universal, Release)
universal: true
# tvOS builds
- target: wolfssl_tvos
arch: arm64
config: Release
sdk: appletvos
name: tvOS (ARM64, Release)
- target: wolfssl_tvos
arch: arm64
config: Release
sdk: appletvsimulator
name: tvOS Simulator (ARM64, Release)
steps:
- uses: actions/checkout@v4
- name: Build wolfSSL with Xcode (${{ matrix.name }})
working-directory: ./IDE/XCODE
run: |
if [ "${{ matrix.universal }}" == "true" ]; then
xcodebuild -project wolfssl.xcodeproj \
-target ${{ matrix.target }} \
-configuration ${{ matrix.config }} \
-arch ${{ matrix.arch }} \
-arch ${{ matrix.arch2 }} \
-sdk ${{ matrix.sdk }} \
SYMROOT=build \
OBJROOT=build \
build
else
xcodebuild -project wolfssl.xcodeproj \
-target ${{ matrix.target }} \
-configuration ${{ matrix.config }} \
-arch ${{ matrix.arch }} \
-sdk ${{ matrix.sdk }} \
SYMROOT=build \
OBJROOT=build \
build
fi

View File

@@ -42,7 +42,7 @@ jobs:
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 \
autoconf automake bison build-essential ca-certificates cargo ccache chrpath cmake \
cpio device-tree-compiler dfu-util diffstat dos2unix doxygen file flex g++ gawk gcc \
gcovr git git-core gnupg gperf gtk-sharp2 help2man iproute2 lcov libcairo2-dev \
gcovr git git-core gnupg gperf gtk-sharp3 help2man iproute2 lcov libcairo2-dev \
libglib2.0-dev libgtk2.0-0 liblocale-gettext-perl libncurses5-dev libpcap-dev \
libpopt0 libsdl1.2-dev libsdl2-dev libssl-dev libtool libtool-bin locales make \
net-tools ninja-build openssh-client parallel pkg-config python3-dev python3-pip \

28
.gitignore vendored
View File

@@ -3,7 +3,6 @@ ctaocrypt/src/src/
*.lo
*.la
*.o
*.patch
*.deps
*.d
*.libs
@@ -34,7 +33,7 @@ aclocal.m4
aminclude.am
lt*.m4
Makefile.in
Makefile
/Makefile
depcomp
missing
libtool
@@ -51,16 +50,6 @@ wolfcrypt_first.c
wolfcrypt_last.c
selftest.c
fipsv2.c
src/async.c
wolfssl/async.h
wolfcrypt/src/async.c
wolfssl/wolfcrypt/async.h
wolfcrypt/src/port/intel/quickassist.c
wolfcrypt/src/port/intel/quickassist_mem.c
wolfcrypt/src/port/cavium/cavium_nitrox.c
wolfssl/wolfcrypt/port/intel/quickassist.h
wolfssl/wolfcrypt/port/intel/quickassist_mem.h
wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
ctaocrypt/benchmark/benchmark
ctaocrypt/test/testctaocrypt
wolfcrypt/benchmark/benchmark
@@ -246,7 +235,16 @@ linuxkm/libwolfssl.mod.c
linuxkm/libwolfssl.lds
linuxkm/module_exports.c
linuxkm/linuxkm/get_thread_size
linuxkm/linuxkm
linuxkm/src
linuxkm/patches/src
*.nds
bsdkm/export_syms
bsdkm/i386
bsdkm/libwolfssl.ko
bsdkm/machine
bsdkm/opt_global.h
bsdkm/x86
# autotools generated
scripts/unit.test
@@ -447,6 +445,7 @@ MagicCrypto
# debian packaging
debian/changelog
debian/control
debian/rules
*.deb
# Ada/Alire files
@@ -455,6 +454,9 @@ wrapper/Ada/config/
wrapper/Ada/lib/
wrapper/Ada/obj/
# Rust wrapper files
/wrapper/rust/*/target/
# PlatformIO
/**/.pio
/**/.vscode/.browse.c_cpp.db*
@@ -466,3 +468,5 @@ wrapper/Ada/obj/
# Autogenerated debug trace headers
wolfssl/debug-trace-error-codes.h
wolfssl/debug-untrace-error-codes.h
AGENTS.md

View File

@@ -2,6 +2,7 @@ AES_GCM_GMULT_NCT
AFX_RESOURCE_DLL
AFX_TARG_ENU
ALLOW_BINARY_MISMATCH_INTROSPECTION
ALLOW_SELFSIGNED_INVALID_CERTSIGN
ALLOW_V1_EXTENSIONS
ANDROID
APP_ESP_HTTP_CLIENT
@@ -16,9 +17,14 @@ ARDUINO_ARCH_NRF52
ARDUINO_ARCH_RP2040
ARDUINO_ARCH_SAMD
ARDUINO_ARCH_STM32
ARDUINO_AVR_ETHERNET
ARDUINO_AVR_LEONARDO_ETH
ARDUINO_SAMD_MKR1000
ARDUINO_SAMD_NANO_33_IOT
ARDUINO_SAMD_ZERO
ARDUINO_SAM_DUE
ARDUINO_SEEED_XIAO
ARDUINO_TEENSY40
ARDUINO_TEENSY41
ASN_DUMP_OID
ASN_TEMPLATE_SKIP_ISCA_CHECK
@@ -29,6 +35,7 @@ BASE64_NO_TABLE
BLAKE2B_SELFTEST
BLAKE2S_SELFTEST
BLOCKING
BSDKM_EXPORT_SYMS
BSP_DEFAULT_IO_CHANNEL_DEFINED
BSP_LED_0
BSP_LED_1
@@ -45,6 +52,7 @@ CONFIG_ARCH_CHIP_STM32F746ZG
CONFIG_ARCH_CHIP_STM32H743ZI
CONFIG_ARCH_CHIP_STM32L552ZE
CONFIG_ARCH_POSIX
CONFIG_ARCH_TEGRA
CONFIG_ARM
CONFIG_ARM64
CONFIG_BOARD_NATIVE_POSIX
@@ -52,8 +60,26 @@ CONFIG_COMPILER_OPTIMIZATION_DEFAULT
CONFIG_COMPILER_OPTIMIZATION_NONE
CONFIG_COMPILER_OPTIMIZATION_PERF
CONFIG_COMPILER_OPTIMIZATION_SIZE
CONFIG_CRYPTO_AES
CONFIG_CRYPTO_CBC
CONFIG_CRYPTO_CTR
CONFIG_CRYPTO_DH
CONFIG_CRYPTO_DH_RFC7919_GROUPS
CONFIG_CRYPTO_DRBG
CONFIG_CRYPTO_ECB
CONFIG_CRYPTO_ECDH
CONFIG_CRYPTO_ECDSA
CONFIG_CRYPTO_FIPS
CONFIG_CRYPTO_GCM
CONFIG_CRYPTO_HMAC
CONFIG_CRYPTO_MANAGER
CONFIG_CRYPTO_RSA
CONFIG_CRYPTO_SELFTESTS_FULL
CONFIG_CRYPTO_SHA1
CONFIG_CRYPTO_SHA256
CONFIG_CRYPTO_SHA3
CONFIG_CRYPTO_SHA512
CONFIG_CRYPTO_XTS
CONFIG_CSPRNG_ENABLED
CONFIG_ESP32C2_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
@@ -79,8 +105,10 @@ CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
CONFIG_FREERTOS_HZ
CONFIG_FREERTOS_UNICORE
CONFIG_HAVE_KPROBES
CONFIG_IDF_TARGET
CONFIG_IDF_TARGET_ARCH_RISCV
CONFIG_IDF_TARGET_ARCH_XTENSA
@@ -95,6 +123,7 @@ CONFIG_IDF_TARGET_ESP32S3
CONFIG_IDF_TARGET_ESP8266
CONFIG_IDF_TARGET_ESP8684
CONFIG_KASAN
CONFIG_KPROBES
CONFIG_MAIN_TASK_STACK_SIZE
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
CONFIG_MBEDTLS_PSA_CRYPTO_C
@@ -107,7 +136,9 @@ CONFIG_PICOLIBC
CONFIG_POSIX_API
CONFIG_POSIX_THREADS
CONFIG_PREEMPT_COUNT
CONFIG_PREEMPT_RT
CONFIG_PTHREAD_IPC
CONFIG_SCHED_INFO
CONFIG_SMP
CONFIG_SNTP_TIME_SYNC_METHOD_SMOOTH
CONFIG_TIMER_TASK_STACK_DEPTH
@@ -153,6 +184,7 @@ CONFIG_WOLFTPM_EXAMPLE_NAME_ESPRESSIF
CONFIG_X86
CONV_WITH_DIV
CPA_CY_API_VERSION_NUM_MAJOR
CPA_CY_API_VERSION_NUM_MINOR
CPU_MIMXRT1176DVMAA_cm7
CPU_MK82FN256VLL15
CRLDP_VALIDATE_DATA
@@ -174,6 +206,10 @@ DILITHIUM_MUL_QINV_SLOW
DILITHIUM_MUL_Q_SLOW
DILITHIUM_MUL_SLOW
DILITHIUM_USE_HINT_CT
DONT_HAVE_KVMALLOC
DONT_HAVE_KVREALLOC
DONT_USE_KVMALLOC
DONT_USE_KVREALLOC
DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER
ECCSI_ORDER_MORE_BITS_THAN_PRIME
ECC_DUMP_OID
@@ -182,15 +218,21 @@ ENABLE_SECURE_SOCKETS_LOGS
ESP32
ESP8266
ESP_ENABLE_WOLFSSH
ESP_IDF_VERSION
ESP_IDF_VERSION_MAJOR
ESP_IDF_VERSION_MINOR
ESP_PLATFORM
ESP_TASK_MAIN_STACK
ETHERNET_AVAILABLE
ETHERNET_H
EV_TRIGGER
EXTERNAL_LOADER_APP
FIPS_OPTEST_FULL_RUN_AT_MODULE_INIT
FORCE_FAILURE_GETRANDOM
FP_ECC_CONTROL
FREERTOS_TCP_WINSIM
FREESCALE
FREESCALE_MQX
FREESCALE_RNGB
FREESCALE_USE_MMCAU_CLASSIC
FSL_FEATURE_HAS_L1CACHE
@@ -268,6 +310,7 @@ INTIMEVER
IOTSAFE_NO_GETDATA
IOTSAFE_SIG_8BIT_LENGTH
KCAPI_USE_XMALLOC
KERNEL_ROOT
K_SERIES
LIBWOLFSSL_VERSION_GIT_BRANCH
LIBWOLFSSL_VERSION_GIT_HASH
@@ -275,7 +318,7 @@ LIBWOLFSSL_VERSION_GIT_HASH_DATE
LIBWOLFSSL_VERSION_GIT_ORIGIN
LIBWOLFSSL_VERSION_GIT_SHORT_HASH
LIBWOLFSSL_VERSION_GIT_TAG
LINUXKM_FPU_STATES_FOLLOW_THREADS
LINUXKM_DONT_FORCE_FIPS_ENABLED
LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
LINUX_CYCLE_COUNT
LINUX_RUSAGE_UTIME
@@ -286,6 +329,7 @@ MAXQ10XX_PRODUCTION_KEY
MAXQ_EXPORT_TLS_KEYS
MAXQ_SHA1
MAXSEG_64K
MAX_OID_SZ
MAX_WOLFSSL_FILE_SIZE
MDK_CONF_BARE_METAL
MDK_CONF_FS
@@ -348,6 +392,8 @@ NO_GETENV
NO_HANDSHAKE_DONE_CB
NO_IMX6_CAAM_AES
NO_IMX6_CAAM_HASH
NO_KEEP_PEER_CERT
NO_LINUXKM_DRBG_GET_RANDOM_BYTES
NO_OLD_NAMES
NO_OLD_POLY1305
NO_OLD_TIMEVAL_NAME
@@ -372,6 +418,7 @@ NO_PKCS7_STREAM
NO_POLY1305_ASM
NO_PUBLIC_CCM_SET_NONCE
NO_PUBLIC_GCM_SET_IV
NO_QAT_RNG
NO_RESUME_SUITE_CHECK
NO_RNG
NO_RNG_MUTEX
@@ -382,6 +429,7 @@ NO_STDIO_FGETS_REMAP
NO_TKERNEL_MEM_POOL
NO_TLSX_PSKKEM_PLAIN_ANNOUNCE
NO_VERIFY_OID
NO_WC_DHGENERATEPUBLIC
NO_WC_SSIZE_TYPE
NO_WOLFSSL_ALLOC_ALIGN
NO_WOLFSSL_AUTOSAR_CRYIF
@@ -389,6 +437,7 @@ NO_WOLFSSL_AUTOSAR_CRYPTO
NO_WOLFSSL_AUTOSAR_CSM
NO_WOLFSSL_BASE64_DECODE
NO_WOLFSSL_BN_CTX
NO_WOLFSSL_CURVE25519_BLINDING
NO_WOLFSSL_MSG_EX
NO_WOLFSSL_RENESAS_FSPSM_AES
NO_WOLFSSL_RENESAS_FSPSM_HASH
@@ -398,6 +447,7 @@ NO_WOLFSSL_SHA256_INTERLEAVE
NO_WOLFSSL_SHA512_INTERLEAVE
NO_WOLFSSL_SKIP_TRAILING_PAD
NO_WOLFSSL_SMALL_STACK_STATIC
NO_WOLFSSL_USE_ASM_CERT
NO_WOLFSSL_XILINX_TAG_MALLOC
NRF52
NRF52_SERIES
@@ -427,10 +477,13 @@ REDIRECTION_OUT1_KEYID
REDIRECTION_OUT2_KEYELMID
REDIRECTION_OUT2_KEYID
RENESAS_T4_USE
RHEL_MAJOR
RHEL_RELEASE_CODE
RTC_ALARMSUBSECONDMASK_ALL
RTE_CMSIS_RTOS_RTX
RTOS_MODULE_NET_AVAIL
RTPLATFORM
SAL_IOMMU_CODE
SA_INTERRUPT
SCEKEY_INSTALLED
SHA256_MANY_REGISTERS
@@ -449,6 +502,7 @@ SL_SE_KEY_TYPE_ECC_P521
SL_SE_KEY_TYPE_ECC_X25519
SL_SE_KEY_TYPE_ECC_X448
SL_SE_PRF_HMAC_SHA1
SNIFFER_SINGLE_SESSION_CACHE
SOFTDEVICE_PRESENT
SO_NOSIGPIPE
SO_REUSEPORT
@@ -465,6 +519,7 @@ STM32F217xx
STM32F401xE
STM32F407xx
STM32F437xx
STM32F439xx
STM32F756xx
STM32F777xx
STM32G071xx
@@ -480,6 +535,7 @@ STM32L4A6xx
STM32L552xx
STM32L562xx
STM32MP135Fxx
STM32N657xx
STM32U575xx
STM32U585xx
STM32U5A9xx
@@ -489,6 +545,11 @@ STM32WL55xx
STM32_AESGCM_PARTIAL
STM32_HW_CLOCK_AUTO
STM32_NUTTX_RNG
STSAFE_HOST_KEY_CIPHER
STSAFE_HOST_KEY_MAC
STSAFE_I2C_BUS
STSE_CONF_ECC_BRAINPOOL_P_256
STSE_CONF_ECC_BRAINPOOL_P_384
TASK_EXTRA_STACK_SIZE
TCP_NODELAY
TFM_ALREADY_SET
@@ -498,8 +559,14 @@ TIF_NEED_FPU_LOAD
TIME_T_NOT_LONG
TI_DUMMY_BUILD
TLS13_RSA_PSS_SIGN_CB_NO_PREHASH
TSIP_AES_128_CTR
TSIP_AES_256_CTR
TSIP_ECDSA_P256
TSIP_ECDSA_P384
TSIP_RSAES_1024
TSIP_RSAES_2048
TSIP_RSASSA_1024
TSIP_RSASSA_2048
UNICODE
USER_CA_CB
USER_CUSTOM_SNIFFX
@@ -508,50 +575,60 @@ USE_ALT_MPRIME
USE_ANY_ADDR
USE_CERT_BUFFERS_25519
USE_CERT_BUFFERS_3072
USE_CONTESTMUTEX
USE_ECDSA_KEYSZ_HASH_ALGO
USE_FULL_ASSERT
USE_HAL_DRIVER
USE_LAC_SESSION_FOR_STRUCT_OFFSET
USE_NXP_LTC
USE_NXP_MMCAU
USE_QAE_STATIC_MEM
USE_QAE_THREAD_LS
USE_SECRET_CALLBACK
USE_STSAFE_RNG_SEED
USE_STSAFE_VERBOSE
USE_TLSV13
USE_WINDOWS_API
USE_WOLF_STRNSTR
USS_API
WC_AESXTS_STREAM_NO_REQUEST_ACCOUNTING
WC_AES_BS_WORD_SIZE
WC_AES_GCM_DEC_AUTH_EARLY
WC_ASN_HASH_SHA256
WC_ASYNC_ENABLE_3DES
WC_ASYNC_ENABLE_AES
WC_ASYNC_ENABLE_ARC4
WC_ASYNC_ENABLE_DH
WC_ASYNC_ENABLE_ECC
WC_ASN_RUNTIME_DATE_CHECK_CONTROL
WC_ASYNC_ENABLE_ECC_KEYGEN
WC_ASYNC_ENABLE_HMAC
WC_ASYNC_ENABLE_MD5
WC_ASYNC_ENABLE_RSA
WC_ASYNC_ENABLE_RSA_KEYGEN
WC_ASYNC_ENABLE_SHA
WC_ASYNC_ENABLE_SHA224
WC_ASYNC_ENABLE_SHA256
WC_ASYNC_ENABLE_SHA3
WC_ASYNC_ENABLE_SHA384
WC_ASYNC_ENABLE_SHA512
WC_ASYNC_NO_3DES
WC_ASYNC_NO_AES
WC_ASYNC_NO_ARC4
WC_ASYNC_NO_CRYPT
WC_ASYNC_NO_HASH
WC_ASYNC_NO_DH
WC_ASYNC_NO_ECC
WC_ASYNC_NO_HMAC
WC_ASYNC_NO_MD5
WC_ASYNC_NO_PKI
WC_ASYNC_NO_RNG
WC_ASYNC_NO_RSA
WC_ASYNC_NO_RSA_KEYGEN
WC_ASYNC_NO_SHA
WC_ASYNC_NO_SHA224
WC_ASYNC_NO_SHA256
WC_ASYNC_NO_SHA3
WC_ASYNC_NO_SHA384
WC_ASYNC_NO_SHA512
WC_ASYNC_THREAD_BIND
WC_CACHE_RESISTANT_BASE64_TABLE
WC_DILITHIUM_CACHE_PRIV_VECTORS
WC_DILITHIUM_CACHE_PUB_VECTORS
WC_DILITHIUM_FIXED_ARRAY
WC_DISABLE_RADIX_ZERO_PAD
WC_ECC_NONBLOCK_ONLY
WC_KDF_NIST_SP_800_56C
WC_FLAG_DONT_USE_AESNI
WC_FORCE_LINUXKM_FORTIFY_SOURCE
WC_LMS_FULL_HASH
WC_NO_ASYNC_SLEEP
WC_NO_RNG_SIMPLE
WC_NO_STATIC_ASSERT
WC_NO_VERBOSE_RNG
WC_PKCS11_FIND_WITH_ID_ONLY
WC_PROTECT_ENCRYPTED_MEM
WC_RNG_BLOCKING
@@ -559,28 +636,35 @@ WC_RSA_DIRECT
WC_RSA_NONBLOCK
WC_RSA_NONBLOCK_TIME
WC_RSA_NO_FERMAT_CHECK
WC_RWLOCK_OPS_INLINE
WC_SHA384
WC_SHA384_DIGEST_SIZE
WC_SHA512
WC_SKIP_INCLUDED_C_FILES
WC_SSIZE_TYPE
WC_STRICT_SIG
WC_WANT_FLAG_DONT_USE_AESNI
WC_USE_PIE_FENCEPOSTS_FOR_FIPS
WC_WANT_FLAG_DONT_USE_VECTOR_OPS
WC_XMSS_FULL_HASH
WIFIESPAT
WIFI_101
WIFI_AVAILABLE
WIFI_NINA
WIN_REUSE_CRYPT_HANDLE
WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
WOLFSENTRY_H
WOLFSENTRY_NO_JSON
WOLFSSL_32BIT_MILLI_TIME
WOLFSSL_AARCH64_PRIVILEGE_MODE
WOLFSSL_AESNI_BY4
WOLFSSL_AESNI_BY6
WOLFSSL_AES_CTR_EXAMPLE
WOLFSSL_AFTER_DATE_CLOCK_SKEW
WOLFSSL_ALGO_HW_MUTEX
WOLFSSL_ALLOW_AKID_SKID_MATCH
WOLFSSL_ALLOW_BAD_TLS_LEGACY_VERSION
WOLFSSL_ALLOW_CRIT_AIA
WOLFSSL_ALLOW_CRIT_AKID
WOLFSSL_ALLOW_CRIT_SKID
WOLFSSL_ALLOW_ENCODING_CA_FALSE
WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST
WOLFSSL_ALLOW_NO_CN_IN_SAN
WOLFSSL_ALLOW_NO_SUITES
@@ -588,6 +672,7 @@ WOLFSSL_ALLOW_SERVER_SC_EXT
WOLFSSL_ALLOW_TLS_SHA1
WOLFSSL_ALTERNATIVE_DOWNGRADE
WOLFSSL_ALT_NAMES_NO_REV
WOLFSSL_ARMASM_NEON_NO_TABLE_LOOKUP
WOLFSSL_ARM_ARCH_NEON_64BIT
WOLFSSL_ASCON_UNROLL
WOLFSSL_ASNC_CRYPT
@@ -610,27 +695,20 @@ WOLFSSL_BIGINT_TYPES
WOLFSSL_BIO_NO_FLOW_STATS
WOLFSSL_BLAKE2B_INIT_EACH_FIELD
WOLFSSL_BLAKE2S_INIT_EACH_FIELD
WOLFSSL_BLIND_PRIVATE_KEY
WOLFSSL_BYTESWAP32_ASM
WOLFSSL_CAAM_BLACK_KEY_AESCCM
WOLFSSL_CAAM_BLACK_KEY_SM
WOLFSSL_CAAM_NO_BLACK_KEY
WOLFSSL_CALLBACKS
WOLFSSL_CHECK_DESKEY
WOLFSSL_CHECK_MEM_ZERO
WOLFSSL_CHIBIOS
WOLFSSL_CLANG_TIDY
WOLFSSL_CLIENT_EXAMPLE
WOLFSSL_COMMERCIAL_LICENSE
WOLFSSL_CONTIKI
WOLFSSL_CRL_ALLOW_MISSING_CDP
WOLFSSL_CURVE25519_BLINDING
WOLFSSL_CUSTOM_CONFIG
WOLFSSL_DILITHIUM_ASSIGN_KEY
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
WOLFSSL_DILITHIUM_NO_ASN1
WOLFSSL_DILITHIUM_NO_CHECK_KEY
WOLFSSL_DILITHIUM_NO_LARGE_CODE
WOLFSSL_DILITHIUM_NO_MAKE
WOLFSSL_DILITHIUM_REVERSE_HASH_OID
WOLFSSL_DILITHIUM_SIGN_CHECK_W0
@@ -638,10 +716,9 @@ WOLFSSL_DILITHIUM_SIGN_CHECK_Y
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC_A
WOLFSSL_DILITHIUM_SMALL_MEM_POLY64
WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC
WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
WOLFSSL_DISABLE_EARLY_SANITY_CHECKS
WOLFSSL_DTLS_DISALLOW_FUTURE
WOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS
WOLFSSL_DTLS_RESEND_ONLY_TIMEOUT
WOLFSSL_DUMP_MEMIO_STREAM
WOLFSSL_DUP_CERTPOL
@@ -653,13 +730,13 @@ WOLFSSL_ECDHX_SHARED_NOT_ZERO
WOLFSSL_ECDSA_MATCH_HASH
WOLFSSL_ECDSA_SET_K_ONE_LOOP
WOLFSSL_EC_POINT_CMP_JACOBIAN
WOLFSSL_ED448_NO_LARGE_CODE
WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
WOLFSSL_EMNET
WOLFSSL_ESPWROOM32
WOLFSSL_EVP_PRINT
WOLFSSL_EXPORT_INT
WOLFSSL_EXPORT_SPC_SZ
WOLFSSL_EXTRA
WOLFSSL_FORCE_OCSP_NONCE_CHECK
WOLFSSL_FRDM_K64
WOLFSSL_FRDM_K64_JENKINS
@@ -689,6 +766,9 @@ WOLFSSL_KYBER_NO_DECAPSULATE
WOLFSSL_KYBER_NO_ENCAPSULATE
WOLFSSL_KYBER_NO_MAKE_KEY
WOLFSSL_LIB
WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES
WOLFSSL_LINUXKM_USE_GET_RANDOM_USER_KRETPROBE
WOLFSSL_LINUXKM_USE_MUTEXES
WOLFSSL_LMS_CACHE_BITS
WOLFSSL_LMS_FULL_HASH
WOLFSSL_LMS_LARGE_CACHES
@@ -701,16 +781,14 @@ WOLFSSL_MAKE_SYSTEM_NAME_LINUX
WOLFSSL_MAKE_SYSTEM_NAME_WSL
WOLFSSL_MDK5
WOLFSSL_MEM_FAIL_COUNT
WOLFSSL_MLKEM_ENCAPSULATE_SMALL_MEM
WOLFSSL_MLKEM_INVNTT_UNROLL
WOLFSSL_MLKEM_MAKEKEY_SMALL_MEM
WOLFSSL_MLKEM_NO_LARGE_CODE
WOLFSSL_MLKEM_NO_MALLOC
WOLFSSL_MLKEM_NTT_UNROLL
WOLFSSL_MONT_RED_CT
WOLFSSL_MP_COND_COPY
WOLFSSL_MP_INVMOD_CONSTANT_TIME
WOLFSSL_MULTICIRCULATE_ALTNAMELIST
WOLFSSL_NEW_PRIME_CHECK
WOLFSSL_NONBLOCK_OCSP
WOLFSSL_NOSHA3_384
WOLFSSL_NOT_WINDOWS_API
@@ -721,13 +799,14 @@ WOLFSSL_NO_COPY_CERT
WOLFSSL_NO_COPY_KEY
WOLFSSL_NO_CRL_DATE_CHECK
WOLFSSL_NO_CRL_NEXT_DATE
WOLFSSL_NO_CT_MAX_MIN
WOLFSSL_NO_DEBUG_CERTS
WOLFSSL_NO_DECODE_EXTRA
WOLFSSL_NO_DER_TO_PEM
WOLFSSL_NO_DH186
WOLFSSL_NO_DTLS_SIZE_CHECK
WOLFSSL_NO_ETM_ALERT
WOLFSSL_NO_FENCE
WOLFSSL_NO_FSEEK
WOLFSSL_NO_INIT_CTX_KEY
WOLFSSL_NO_ISSUERHASH_TDPEER
WOLFSSL_NO_KCAPI_AES_CBC
@@ -740,7 +819,6 @@ WOLFSSL_NO_KCAPI_SHA224
WOLFSSL_NO_OCSP_DATE_CHECK
WOLFSSL_NO_OCSP_ISSUER_CHAIN_CHECK
WOLFSSL_NO_OCSP_OPTIONAL_CERTS
WOLFSSL_NO_PUBLIC_FFDHE
WOLFSSL_NO_RSA_KEY_CHECK
WOLFSSL_NO_SERVER_GROUPS_EXT
WOLFSSL_NO_SESSION_STATS
@@ -750,6 +828,7 @@ WOLFSSL_NO_SPHINCS
WOLFSSL_NO_STRICT_CIPHER_SUITE
WOLFSSL_NO_TICKET_EXPIRE
WOLFSSL_NO_TRUSTED_CERTS_VERIFY
WOLFSSL_NO_WORD64_OPS
WOLFSSL_NO_XOR_OPS
WOLFSSL_NRF51_AES
WOLFSSL_OLDTLS_AEAD_CIPHERSUITES
@@ -773,7 +852,6 @@ WOLFSSL_PSK_IDENTITY_ALERT
WOLFSSL_PSK_ID_PROTECTION
WOLFSSL_PSK_MULTI_ID_PER_CS
WOLFSSL_PSK_TLS13_CB
WOLFSSL_PSOC6_CRYPTO
WOLFSSL_PYTHON
WOLFSSL_RENESAS_FSPSM_CRYPT_ONLY
WOLFSSL_RENESAS_RA6M3
@@ -783,6 +861,7 @@ WOLFSSL_RENESAS_RZN2L
WOLFSSL_RENESAS_TLS
WOLFSSL_RENESAS_TSIP_IAREWRX
WOLFSSL_REQUIRE_TCA
WOLFSSL_RNG_USE_FULL_SEED
WOLFSSL_RSA_CHECK_D_ON_DECRYPT
WOLFSSL_RSA_DECRYPT_TO_0_LEN
WOLFSSL_RW_THREADED
@@ -799,6 +878,7 @@ WOLFSSL_SERVER_EXAMPLE
WOLFSSL_SETTINGS_FILE
WOLFSSL_SH224
WOLFSSL_SHA256_ALT_CH_MAJ
WOLFSSL_SHA512_HASHTYPE
WOLFSSL_SHUTDOWNONCE
WOLFSSL_SILABS_TRNG
WOLFSSL_SM4_EBC
@@ -808,7 +888,7 @@ WOLFSSL_SP_FAST_NCT_EXPTMOD
WOLFSSL_SP_INT_SQR_VOLATILE
WOLFSSL_STACK_CHECK
WOLFSSL_STM32F427_RNG
WOLFSSL_STM32_RNG_NOLIB
WOLFSSL_STM32U5_DHUK
WOLFSSL_STRONGEST_HASH_SIG
WOLFSSL_STSAFE_TAKES_SLOT
WOLFSSL_TELIT_M2MB
@@ -825,21 +905,24 @@ WOLFSSL_TICKET_ENC_HMAC_SHA512
WOLFSSL_TI_CURRTIME
WOLFSSL_TLS13_DRAFT
WOLFSSL_TLS13_IGNORE_AEAD_LIMITS
WOLFSSL_TLS13_IGNORE_PT_ALERT_ON_ENC
WOLFSSL_TLS13_SHA512
WOLFSSL_TLS13_TICKET_BEFORE_FINISHED
WOLFSSL_TLSX_PQC_MLKEM_STORE_PRIV_KEY
WOLFSSL_TRACK_MEMORY_FULL
WOLFSSL_TRAP_MALLOC_SZ
WOLFSSL_UNALIGNED_64BIT_ACCESS
WOLFSSL_USER_DEFINED_ATOMICS
WOLFSSL_USER_FILESYSTEM
WOLFSSL_USER_LOG
WOLFSSL_USER_MUTEX
WOLFSSL_USER_THREADING
WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW
WOLFSSL_USE_FLASHMEM
WOLFSSL_USE_FORCE_ZERO
WOLFSSL_USE_OPTIONS_H
WOLFSSL_USE_POPEN_HOST
WOLFSSL_VALIDATE_DH_KEYGEN
WOLFSSL_WC_LMS_SERIALIZE_STATE
WOLFSSL_WC_XMSS_NO_SHA256
WOLFSSL_WC_XMSS_NO_SHAKE256
WOLFSSL_WICED_PSEUDO_UNIX_EPOCH_TIME
@@ -868,6 +951,8 @@ _ABIO64
_ARCH_PPC64
_COMPILER_VERSION
_INTPTR_T_DECLARED
_LINUX_REFCOUNT_H
_LINUX_REFCOUNT_TYPES_H
_LP64
_MSC_VER
_MSVC_LANG
@@ -877,6 +962,7 @@ _NETOS
_POSIX_C_SOURCE
_SDCC_VERSION_PATCHLEVEL
_SH3
_SILICON_LABS_32B_SERIES_3_CONFIG_301
_SILICON_LABS_SECURITY_FEATURE
_SOCKLEN_T
_SYS_DEVCON_LOCAL_H
@@ -901,12 +987,15 @@ __ARCH_STRSTR_NO_REDIRECT
__ARM_ARCH_7M__
__ARM_FEATURE_CRYPTO
__ASSEMBLER__
__ATOMIC_CONSUME
__ATOMIC_RELAXED
__AVR_ARCH__
__AVR__
__BCPLUSPLUS__
__BIG_ENDIAN__
__BORLANDC__
__CCRX__
__CC_ARM
__COMPILER_VER__
__COUNTER__
__CYGWIN__
@@ -934,6 +1023,7 @@ __LINUX__
__LP64
__LP64__
__MACH__
__MEGAAVR__
__MICROBLAZE__
__MINGW32__
__MINGW64_VERSION_MAJOR
@@ -942,6 +1032,7 @@ __MWERKS__
__NT__
__OS2__
__OpenBSD__
__PIC__
__PIE__
__POWERPC__
__PPC__
@@ -956,12 +1047,15 @@ __SAM3X4C__
__SAM3X4E__
__SAM3X8C__
__SAM3X8E__
__SAMD21__
__SAMD51__
__SANITIZE_ADDRESS__
__SDCC_VERSION_MAJOR
__SDCC_VERSION_MINOR
__SDCC_VERSION_PATCH
__SIZEOF_INT128__
__SIZEOF_LONG_LONG__
__STDC_NO_ATOMICS__
__STDC_VERSION__
__STDC__
__STM32__
@@ -979,6 +1073,7 @@ __WATCOMC__
__WATCOM_INT64__
__XC32
__XTENSA__
__ZEPHYR__
__aarch64__
__alpha__
__arch64__
@@ -1009,6 +1104,7 @@ __svr4__
__thumb__
__ti__
__x86_64__
__xtensa__
byte
configTICK_RATE_HZ
fallthrough

View File

@@ -34,7 +34,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
You must delete them, or cmake will refuse to work.")
endif()
project(wolfssl VERSION 5.8.0 LANGUAGES C ASM)
project(wolfssl VERSION 5.8.4 LANGUAGES C ASM)
# Set WOLFSSL_ROOT if not already defined
if ("${WOLFSSL_ROOT}" STREQUAL "")
@@ -49,16 +49,16 @@ endif()
# shared library versioning
# increment if interfaces have been removed or changed
set(WOLFSSL_LIBRARY_VERSION_FIRST 43)
set(WOLFSSL_LIBRARY_VERSION_FIRST 44)
# increment if interfaces have been added
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
set(WOLFSSL_LIBRARY_VERSION_SECOND 1)
set(WOLFSSL_LIBRARY_VERSION_SECOND 0)
# increment if source code has changed
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
# WOLFSSL_LIBRARY_VERSION_SECOND is incremented
set(WOLFSSL_LIBRARY_VERSION_THIRD 0)
set(WOLFSSL_LIBRARY_VERSION_THIRD 1)
set(LIBTOOL_FULL_VERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}.${WOLFSSL_LIBRARY_VERSION_SECOND}.${WOLFSSL_LIBRARY_VERSION_THIRD})
@@ -66,6 +66,9 @@ set(WOLFSSL_DEFINITIONS)
set(WOLFSSL_LINK_LIBS)
set(WOLFSSL_INCLUDE_DIRS)
# Initialize pkg-config private variables
set(PC_LIBS_PRIVATE "")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/functions.cmake)
@@ -124,6 +127,7 @@ check_function_exists("memset" HAVE_MEMSET)
check_function_exists("socket" HAVE_SOCKET)
check_function_exists("strftime" HAVE_STRFTIME)
check_function_exists("__atomic_fetch_add" HAVE_C___ATOMIC)
check_function_exists("getpid" HAVE_GETPID)
include(CheckSymbolExists)
check_symbol_exists(isascii "ctype.h" HAVE_ISASCII)
@@ -280,7 +284,28 @@ add_option("WOLFSSL_DEBUG"
"no" "yes;no")
if(WOLFSSL_DEBUG)
set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}")
# Optional variable inspection
if (0)
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
message(STATUS "")
message(STATUS "ALL VARIABLES BEGIN")
message(STATUS "")
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
message(STATUS "")
message(STATUS "ALL VARIABLES END")
message(STATUS "")
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Watcom" OR CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom" OR CMAKE_GENERATOR STREQUAL "Watcom WMake")
# Open Watcom v2 does not support -g debugging
message(STATUS "Detected Watcom compiler, using CMAKE_C_FLAGS_DEBUG -d2")
set(CMAKE_C_FLAGS_DEBUG "-d2 ${CMAKE_C_FLAGS_DEBUG}")
else()
set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}")
endif()
list(APPEND WOLFSSL_DEFINITIONS
"-DDEBUG_WOLFSSL"
"-DDEBUG")
@@ -434,6 +459,7 @@ if(WOLFSSL_CURL)
set(WOLFSSL_MD4 "yes")
set(WOLFSSL_DES3 "yes")
set(WOLFSSL_ALPN "yes")
set(WOLFSSL_EX_DATA "yes")
set(WOLFSSL_WOLFSSH "yes")
set(WOLFSSL_OPENSSLEXTRA "yes")
set(WOLFSSL_CRL "yes")
@@ -577,6 +603,11 @@ add_option(WOLFSSL_MLKEM
"Enable the wolfSSL PQ ML-KEM library (default: disabled)"
"no" "yes;no")
# Dilithium
add_option(WOLFSSL_DILITHIUM
"Enable the wolfSSL PQ Dilithium (ML-DSA) implementation (default: disabled)"
"no" "yes;no")
# LMS
add_option(WOLFSSL_LMS
"Enable the PQ LMS Stateful Hash-based Signature Scheme (default: disabled)"
@@ -674,6 +705,29 @@ if (WOLFSSL_EXPERIMENTAL)
message(STATUS "Looking for WOLFSSL_LMS - not found")
endif()
# Checking for experimental feature: Dilithium
message(STATUS "Looking for WOLFSSL_DILITHIUM")
if (WOLFSSL_DILITHIUM)
set(WOLFSSL_FOUND_EXPERIMENTAL_FEATURE 1)
message(STATUS "Automatically set related requirements for Dilithium:")
add_definitions("-DHAVE_DILITHIUM")
add_definitions("-DWOLFSSL_WC_DILITHIUM")
add_definitions("-DWOLFSSL_SHA3")
add_definitions("-DWOLFSSL_SHAKE128")
add_definitions("-DWOLFSSL_SHAKE256")
message(STATUS "Automatically set related requirements for Dilithium:")
set_wolfssl_definitions("HAVE_DILITHIUM" RESULT)
set_wolfssl_definitions("WOLFSSL_WC_DILITHIUM" RESULT)
set_wolfssl_definitions("WOLFSSL_SHA3" RESULT)
set_wolfssl_definitions("WOLFSSL_SHAKE128" RESULT)
set_wolfssl_definitions("WOLFSSL_SHAKE256" RESULT)
message(STATUS "Looking for WOLFSSL_DILITHIUM - found")
else()
message(STATUS "Looking for WOLFSSL_DILITHIUM - not found")
endif()
# Other experimental feature detection can be added here...
# Were any experimental features found? Display a message.
@@ -687,7 +741,9 @@ if (WOLFSSL_EXPERIMENTAL)
if(WOLFSSL_OQS AND WOLFSSL_MLKEM)
message(FATAL_ERROR "Error: cannot enable both WOLFSSL_OQS and WOLFSSL_MLKEM at the same time.")
endif()
if(WOLFSSL_OQS AND WOLFSSL_DILITHIUM)
message(FATAL_ERROR "Error: cannot enable both WOLFSSL_OQS and WOLFSSL_DILITHIUM at the same time.")
endif()
else()
# Experimental mode not enabled, but were any experimental features enabled? Error out if so:
message(STATUS "Looking for WOLFSSL_EXPERIMENTAL - not found")
@@ -697,6 +753,9 @@ else()
if(WOLFSSL_MLKEM)
message(FATAL_ERROR "Error: WOLFSSL_MLKEM requires WOLFSSL_EXPERIMENTAL at this time.")
endif()
if(WOLFSSL_DILITHIUM)
message(FATAL_ERROR "Error: WOLFSSL_DILITHIUM requires WOLFSSL_EXPERIMENTAL at this time.")
endif()
endif()
# LMS
@@ -1011,6 +1070,41 @@ if(WOLFSSL_ECC)
endif()
endif()
# ECCSI
add_option("WOLFSSL_ECCSI"
"Enable ECCSI (default: disabled)"
"no" "yes;no")
if(WOLFSSL_ECCSI)
if (NOT WOLFSSL_ECC)
message(FATAL_ERROR "cannot enable ECCSI without enabling ECC.")
endif()
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFCRYPT_HAVE_ECCSI -DWOLFSSL_PUBLIC_MP")
endif()
# SAKKE
add_option("WOLFSSL_SAKKE"
"Enable SAKKE (default: disabled)"
"no" "yes;no")
if(WOLFSSL_SAKKE)
if (NOT WOLFSSL_ECC)
message(FATAL_ERROR "cannot enable SAKKE without enabling ECC.")
endif()
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFCRYPT_HAVE_SAKKE")
endif()
# SipHash
add_option("WOLFSSL_SIPHASH"
"Enable SipHash (default: disabled)"
"no" "yes;no")
if(WOLFSSL_SIPHASH)
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_SIPHASH")
endif()
# TODO: - Compressed key
# - FP ECC, fixed point cache ECC
# - ECC encrypt
@@ -1155,8 +1249,8 @@ endif()
# Old TLS
add_option("WOLFSSL_OLD_TLS"
"Enable old TLS versions < 1.2 (default: enabled)"
"yes" "yes;no")
"Enable old TLS versions < 1.2 (default: disabled)"
"no" "yes;no")
if(NOT WOLFSSL_OLD_TLS)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_OLD_TLS")
@@ -1407,17 +1501,25 @@ if(WOLFSSL_OPENSSH OR WOLFSSL_WPAS)
endif()
# MD5
set(WOLFSSL_MD5_HELP_STRING "Enable MD5 (default: enabled)")
add_option("WOLFSSL_MD5" ${WOLFSSL_MD5_HELP_STRING} "yes" "yes;no")
set(WOLFSSL_MD5_HELP_STRING "Enable MD5 (default: disabled)")
add_option("WOLFSSL_MD5" ${WOLFSSL_MD5_HELP_STRING} "no" "yes;no")
if(WOLFSSL_WPAS OR
WOLFSSL_HAPROXY OR
WOLFSSL_NGINX OR
WOLFSSL_OPENSSH OR
WOLFSSL_OPENSSLEXTRA OR
WOLFSSL_OPENVPN OR
WOLFSSL_OLD_TLS OR
WOLFSSL_FORTRESS OR
WOLFSSL_LIGHTY OR
WOLFSSL_DES3 OR
WOLFSSL_OPENSSLALL)
override_cache(WOLFSSL_MD5 "yes")
endif()
if(NOT WOLFSSL_MD5)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_MD5" "-DNO_OLD_TLS")
else()
# turn off MD5 if leanpsk or leantls on
if(WOLFSSL_LEAN_PSK OR WOLFSSL_LEAN_TLS)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_MD5" "-DNO_OLD_TLS")
override_cache(WOLFSSL_MD5 "no")
endif()
endif()
# SHA
@@ -1594,6 +1696,14 @@ if(NOT WOLFSSL_INLINE)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_INLINE")
endif()
add_option("WOLFSSL_ARMASM_INLINE"
"Enable ARM assembly inline functions (default: disabled)"
"no" "yes;no")
if (WOLFSSL_ARMASM_INLINE)
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ARMASM_INLINE")
endif()
# TODO:
# - CRL monitor
# - User crypto
@@ -1824,6 +1934,16 @@ if(NOT WOLFSSL_PKCS12)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_PKCS12")
endif()
# PKCS#11
add_option("WOLFSSL_PKCS11"
"Enable PKCS#11 (default: disabled)"
"no" "yes;no")
if(WOLFSSL_PKCS11 AND NOT WIN32)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PKCS11 -DHAVE_WOLF_BIGINT")
list(APPEND WOLFSSL_LINK_LIBS ${CMAKE_DL_LIBS})
endif()
# PWDBASED has to come after certservice since we want it on w/o explicit on
# PWDBASED
@@ -1922,7 +2042,6 @@ add_option("WOLFSSL_CRYPT_TESTS_HELP"
"no" "yes;no")
# TODO: - LIBZ
# - PKCS#11
# - Cavium
# - Cavium V
# - Cavium Octeon
@@ -2021,10 +2140,7 @@ add_option("WOLFSSL_SYS_CA_CERTS"
"yes" "yes;no")
if(WOLFSSL_SYS_CA_CERTS)
if(NOT WOLFSSL_FILESYSTEM)
message("Can't enable system CA certs without a filesystem.")
override_cache(WOLFSSL_SYS_CA_CERTS "no")
elseif(APPLE)
if(APPLE)
# Headers used for MacOS default system CA certs behavior. Only MacOS SDK will have this header
check_include_file("Security/SecTrustSettings.h" HAVE_SECURITY_SECTRUSTSETTINGS_H)
# Headers used for Apple native cert validation. All device SDKs should have these headers
@@ -2058,6 +2174,9 @@ if(WOLFSSL_SYS_CA_CERTS)
else()
message(FATAL_ERROR "Can't enable system CA certs without Apple Security.framework headers.")
endif()
elseif(NOT WIN32 AND NOT WOLFSSL_FILESYSTEM)
message("Can't enable system CA certs without a filesystem.")
override_cache(WOLFSSL_SYS_CA_CERTS "no")
endif()
@@ -2084,6 +2203,7 @@ if(WOLFSSL_TPM)
override_cache(WOLFSSL_CERTEXT "yes")
override_cache(WOLFSSL_PKCS7 "yes")
override_cache(WOLFSSL_AESCFB "yes")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ALLOW_ENCODING_CA_FALSE")
endif()
if(WOLFSSL_CLU)
@@ -2633,6 +2753,43 @@ if(WOLFSSL_EXAMPLES)
tests/api/test_ocsp.c
tests/api/test_evp.c
tests/api/test_tls_ext.c
tests/api/test_tls.c
tests/api/test_x509.c
tests/api/test_asn.c
tests/api/test_pkcs7.c
tests/api/test_pkcs12.c
tests/api/test_ossl_asn1.c
tests/api/test_ossl_bio.c
tests/api/test_ossl_bn.c
tests/api/test_ossl_cipher.c
tests/api/test_ossl_dh.c
tests/api/test_ossl_dgst.c
tests/api/test_ossl_dsa.c
tests/api/test_ossl_ec.c
tests/api/test_ossl_ecx.c
tests/api/test_ossl_mac.c
tests/api/test_ossl_rsa.c
tests/api/test_ossl_sk.c
tests/api/test_ossl_x509.c
tests/api/test_ossl_x509_ext.c
tests/api/test_ossl_x509_name.c
tests/api/test_ossl_x509_pk.c
tests/api/test_ossl_x509_vp.c
tests/api/test_ossl_x509_io.c
tests/api/test_ossl_x509_crypto.c
tests/api/test_ossl_x509_acert.c
tests/api/test_ossl_x509_info.c
tests/api/test_ossl_x509_str.c
tests/api/test_ossl_x509_lu.c
tests/api/test_ossl_pem.c
tests/api/test_ossl_rand.c
tests/api/test_ossl_obj.c
tests/api/test_ossl_p7p12.c
tests/api/test_evp_digest.c
tests/api/test_evp_cipher.c
tests/api/test_evp_pkey.c
tests/api/test_certman.c
tests/api/test_tls13.c
tests/srp.c
tests/suites.c
tests/w64wrapper.c
@@ -2912,6 +3069,16 @@ if(WOLFSSL_INSTALL)
endif()
endif()
# Add required frameworks for static linking on Apple platforms
if(APPLE AND NOT BUILD_SHARED_LIBS)
if(WOLFSSL_SYS_CA_CERTS)
list(APPEND PC_LIBS_PRIVATE "-framework CoreFoundation" "-framework Security")
endif()
endif()
# Convert lists to space-separated strings for pkg-config
string(JOIN " " PC_LIBS_PRIVATE ${PC_LIBS_PRIVATE})
configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

20
CMakePresets.json Normal file
View File

@@ -0,0 +1,20 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 22,
"patch": 0
},
"configurePresets": [
{
"name": "vs2022-x64",
"displayName": "Visual Studio 2022 x64",
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
}
]
}

9
CMakeSettings.json Normal file
View File

@@ -0,0 +1,9 @@
{
"configurations": [
{
"name": "No-CMake",
"generator": "Ninja",
"buildCommandArgs": "echo 'No build command'"
}
]
}

833
COPYING
View File

@@ -1,281 +1,622 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Version 3, 29 June 2007
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
TERMS AND CONDITIONS
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
0. Definitions.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
"This License" refers to version 3 of the GNU General Public License.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
A "covered work" means either the unmodified Program or a work based
on the Program.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
1. Source Code.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
The Corresponding Source for a work in source code form is that
same work.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
2. Basic Permissions.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
13. Use with the GNU Affero General Public License.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
14. Revised Versions of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
NO WARRANTY
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
15. Disclaimer of Warranty.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,3 +1,291 @@
# wolfSSL Release 5.8.4 (Nov. 20, 2025)
Release 5.8.4 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
NOTE: * --enable-heapmath is deprecated
* MD5 is now disabled by default
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request number where the code change was added.
## Vulnerabilities
* [Low CVE-2025-12888] Vulnerability in X25519 constant-time cryptographic implementations due to timing side channels introduced by compiler optimizations and CPU architecture limitations, specifically with the Xtensa-based ESP32 chips. If targeting Xtensa it is recommended to use the low memory implementations of X25519, which is now turned on as the default for Xtensa. Thanks to Adrian Cinal for the report. Fixed in PR 9275.
* [Med. CVE-2025-11936] Potential DoS vulnerability due to a memory leak through multiple KeyShareEntry with the same group in malicious TLS 1.3 ClientHello messages. This affects users who are running wolfSSL on the server side with TLS 1.3. Thanks to Jaehun Lee and Kyungmin Bae, Pohang University of Science and Technology (POSTECH) for the report. Fixed in PR 9117.
* [Low CVE-2025-11935] PSK with PFS (Perfect Forward Secrecy) downgrades to PSK without PFS during TLS 1.3 handshake. If the client sends a ClientHello that has a key share extension and the server responds with a ServerHello that does not have a key share extension the connection would previously continue on without using PFS. Thanks to Jaehun Lee from Pohang University of Science and Technology (POSTECH) for the report. Fixed in PR 9112.
* [Low CVE-2025-11934] Signature Algorithm downgrade from ECDSA P521 to P256 during TLS 1.3 handshake. When a client sends ECDSA P521 as the supported signature algorithm the server previously could respond as ECDSA P256 being the accepted signature algorithm and the connection would continue with using ECDSA P256. Thanks to Jaehun Lee from Pohang University of Science and Technology (POSTECH) for the report. Fixed in PR 9113.
* [Low CVE-2025-11933] DoS Vulnerability in wolfSSL TLS 1.3 CKS extension parsing. Previously duplicate CKS extensions were not rejected leading to a potential memory leak when processing a ClientHello. Thanks to Jaehun Lee from Pohang University of Science and Technology (POSTECH) for the report. Fixed in PR 9132.
* [Low CVE-2025-11931] Integer Underflow Leads to Out-of-Bounds Access in XChaCha20-Poly1305 Decrypt. This issue is hit specifically with a call to the function wc_XChaCha20Poly1305_Decrypt() which is not used with TLS connections, only from direct calls from an application. Thanks to Luigino Camastra from Aisle Research for the report. Fixed in PR 9223.
* [Low CVE-2025-11932] Timing Side-Channel in PSK Binder Verification. The server previously verified the TLS 1.3 PSK binder using a non-constant time method which could potentially leak information about the PSK binder. Thanks to Luigino Camastra from Aisle Research for the report. Fixed in PR 9223.
* [Low CVE-2025-12889] With TLS 1.2 connections a client can use any digest, specifically a weaker digest, rather than those in the CertificateRequest. Thanks to Jaehun Lee from Pohang University of Science and Technology (POSTECH) for the report. Fixed in PR 9395
* [Low CVE-2025-13912] When using the Clang compiler, various optimization levels or flags could result in non-constant-time compiled code. Assembly implementations of the functions in wolfSSL were not affected. The report was done specifically with Clang version 18 but there was shown to be similarities in timing variations when using the optimization levels with Clang 14 and Clang 20.
On the following architectures, the expected constant-time functions were found to have potential timing variations when specific compiler flags or optimization levels were used.
AArch64: Using O3, Ofast, or --enable-nontrivial-unswitch with O1/O2 flags leads to possible timing variations with the software implementations of sp_read_radix, sp_div_2_mod_ct, and sp_addmod_ct. Using O3, O2, Ofast, Os, or Oz with --unroll-force-peel-count=50 leads to possible timing variations with wc_AesGcmDecrypt.
RISC-V: TLS HMAC update/final operations, RSA unpad operations, and DH key pair generation with O1, O2, O3, Ofast, Oz, or Os. wc_AesGcmDecrypt and wc_Chacha_Process with O1, O2, O3, Os, or Ofast. Also SP software operations sp_div_2_mod_ct and sp_addmod_ct using O3 or Ofast.
X86_64: TLS HMAC update/final operations and TimingVerifyPad used with verifying the TLS MAC with --fast-isel or --x86-cmov-converter-force-all compile flags. RSA unpad operations, ECC mulmod, and wc_Chacha_Process with the --x86-cmov-converter-force-all flag. DH key agreement, sp_div_2_mod_ct and sp_addmod_ct with O1, O2, O3, Os, or Ofast. wc_AesGcmDecrypt with the compiler flags O2, O3, Os, Ofast, Oz --x86-cmov-converter-force-all | --unroll-force-peel-count=50, or O1 --x86-cmov-converter-force-all.
Thanks to Jing Liu, Zhiyuan Zhang, LUCÍA MARTÍNEZ GAVIER, Gilles Barthe, Marcel Böhme from Max Planck Institute for Security and Privacy (MPI-SP) for the report. Fixed in PR 9148.
## New Features
* New ML-KEM / ML-DSA APIs and seed/import PKCS8 support; added _new/_delete APIs for ML-KEM/ML-DSA. (PR 9039, 9000, 9049)
* Initial wolfCrypt FreeBSD kernel module support (PR 9392)
* Expanded PKCS7/CMS capabilities: decode SymmetricKeyPackage / OneSymmetricKey, add wc_PKCS7_GetEnvelopedDataKariRid, and allow PKCS7 builds with AES keywrap unset. (PR 9018, 9029, 9032)
* Add custom AES key wrap/unwrap callbacks and crypto callback copy/free operations. (PR 9002, 9309)
* Add support for certificate_authorities extension in ClientHello and certificate manager CA-type selection/unloading. (PR 9209, 9046)
* Large expansion of Rust wrapper modules: random, aes, rsa, ecc, dh, sha, hmac, cmac, ed25519/ed448, pbkdf2/PKCS#12, kdf/prf, SRTP KDFs, and conditional compilation options. (PR 9191, 9212, 9273, 9306, 9320, 9328, 9368, 9389, 9357, 9433)
* Rust: support optional heap and dev_id parameters and enable conditional compilation based on C build options. (PR 9407, 9433)
* STM32 fixes (benchmarking and platform fixes) and PSoC6 hardware acceleration additions. (PR 9228, 9256, 9185)
* STM32U5 added support for SAES and DHUK. (PR 9087)
* Add --enable-curl=tiny option for a smaller build when used with cURL. (PR 9174)
## Improvements / Optimizations
* Regression test fixes and expansion: TLS 1.3/1.2 tests, ARDUINO examples, libssh2 tests, hostap workflows, and nightly test improvements. (PR 9096, 9141, 9091, 9122, 9388)
* Improved test ordering and CI test stability (random tests run order changes, FIPS test fixes). (PR 9204, 9257)
* Docs and readme fixes, docstring updates, AsconAEAD comment placement, and example certificate renewals. (PR 9131, 9293, 9262, 9429)
* Updated GPL exception lists (GPLv2 and GPLv3 exception updates: add Fetchmail and OpenVPN). (PR 9398, 9413)
* Introduced WOLFSSL_DEBUG_CERTS and additional debug/logging refinements. (PR 8902, 9055)
* Expanded crypto-callback support (SHA family, HKDF, SHA-224, sha512_family digest selection) and improved crypto-only build cases. (PR 9070, 9252, 9271, 9100, 9194)
* AES & HW offload improvements including AES-CTR support in PKCS11 driver and AES ECB offload sizing fix. (PR 9277, 9364)
* ESP32: PSRAM allocator support and SHA HW fixes for ESP-IDF v6/v5. (PR 8987, 9225, 9264)
* Renesas FSP / RA examples updated and security-module TLS context improvements. (PR 9047, 9010, 9158, 9150)
* Broad configure/CMake/Autotools workflow improvements (Apple options tracking, Watcom pinning, Debian packaging, ESP-IDF pinning). (PR 9037, 9167, 9161, 9264)
* New assembly introspection / performance helpers for RISC-V and PPC32; benchmarking enhancements (cycle counts). (PR 9101, 9317)
* Update to SGX build for using assembly optimizations. (PR 8463, 9138)
* Testing with Fil-C compiler version to 0.674 (PR 9396)
* Refactors and compressing of small stack code (PR 9153)
## Bug Fixes
* Removed the test feature using popen when defining the macro WOLFSSL_USE_POPEN_HOST and not having HAVE_GETADDRINFO defined, along with having the macro HAVE_HTTP_CLIENT set. There was the potential for vulnerable behavior with the use of popen when the API wolfSSL_BIO_new_connect() was called with this specific build. This exact build configuration is only intended for testing with QEMU and is not enabled with any autoconf/cmake flags. Thanks to linraymond2006 for the report. (PR 9038)
* Fix for C# wrapper Ed25519 potential crash and heap overwrite with raw public key import when using the API Ed25519ImportPublic.This was a broken API with the C# wrapper that would crash on use. Thanks to Luigino Camastra from Aisle Research for the bug report. (PR 9291)
* Coverity, cppcheck, MISRA, clang-tidy, ZeroPath and other static-analysis driven fixes across the codebase. (PR 9006, 9078, 9068, 9265, 9324)
* TLS 1.2/DTLS improvements: client message order checks, DTLS cookie/exchange and replay protections, better DTLS early-data handling. (PR 9387, 9253, 9205, 9367)
* Improved X.509 & cert handling: allow larger pathLen in Basic Constraints, restore inner server name for ECH, retrying cert candidate chains. (PR 8890, 9234, 8692)
* Sniffer robustness: fix infinite recursion, better handling of OOO appData and partial overlaps, and improved retransmission detection. (PR 9051, 9106, 9140, 9094)
* Numerous linuxkm (kernel-mode) fixes, relocation/PIE normalization, and FIPS-related build tweaks across many iterations. (PR 9025, 9035, 9067, 9111, 9121)
* ML-KEM/Kyber and ML-DSA fixes for out-of-bounds and seed-import correctness; multiple ML-related safety fixes. (PR 9142, 9105, 9439)
* Avoid uninitialized-variable and GCC warnings; several fixes for undefined-shift/overflow issues. (PR 9020, 9372, 9195)
* Memory & leak fixes in X509 verification and various struct sizing fixes for WOLFSSL_NO_MALLOC usage. (PR 9258, 9036)
* Fixed RSA / signing / verify-only warnings allowing WOLFSSL_NO_CT_OPS when WOLFSSL_RSA_VERIFY_ONLY is used and API cleanups for using const. (PR 9031, 9263)
# wolfSSL Release 5.8.2 (July 17, 2025)
Release 5.8.2 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
NOTE: * wolfSSL is now GPLv3 instead of GPLv2
* --enable-heapmath is deprecated
* MD5 is now disabled by default
PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request number where the code change was added.
## Vulnerabilities
* [Low] There is the potential for a fault injection attack on ECC and Ed25519 verify operations. In versions of wolfSSL 5.7.6 and later the --enable-faultharden option is available to help mitigate against potential fault injection attacks. The mitigation added in wolfSSL version 5.7.6 is to help harden applications relying on the results of the verify operations, such as when used with wolfBoot. If doing ECC or Ed25519 verify operations on a device at risk for fault injection attacks then --enable-faultharden could be used to help mitigate it. Thanks to Kevin from Fraunhofer AISEC for the report.
Hardening option added in PR https://github.com/wolfSSL/wolfssl/pull/8289
* [High CVE-2025-7395] When using WOLFSSL_SYS_CA_CERTS and WOLFSSL_APPLE_NATIVE_CERT_VALIDATION on an Apple platform, the native trust store verification routine overrides errors produced elsewhere in the wolfSSL certificate verification process including failures due to hostname matching/SNI, OCSP, CRL, etc. This allows any trusted cert chain to override other errors detected during chain verification that should have resulted in termination of the TLS connection. If building wolfSSL on versions after 5.7.6 and before 5.8.2 with use of the system CA support and the apple native cert validation feature enabled on Apple devices (on by default for non-macOS Apple targets when using autotools or CMake) we recommend updating to the latest version of wolfSSL. Thanks to Thomas Leong from ExpressVPN for the report.
Fixed in PR https://github.com/wolfSSL/wolfssl/pull/8833
* [Med. CVE-2025-7394] In the OpenSSL compatibility layer implementation, the function RAND_poll() was not behaving as expected and leading to the potential for predictable values returned from RAND_bytes() after fork() is called. This can lead to weak or predictable random numbers generated in applications that are both using RAND_bytes() and doing fork() operations. This only affects applications explicitly calling RAND_bytes() after fork() and does not affect any internal TLS operations. Although RAND_bytes() documentation in OpenSSL calls out not being safe for use with fork() without first calling RAND_poll(), an additional code change was also made in wolfSSL to make RAND_bytes() behave similar to OpenSSL after a fork() call without calling RAND_poll(). Now the Hash-DRBG used gets reseeded after detecting running in a new process. If making use of RAND_bytes() and calling fork() we recommend updating to the latest version of wolfSSL. Thanks to Per Allansson from Appgate for the report.
Fixed in the following PRs
https://github.com/wolfSSL/wolfssl/pull/8849
https://github.com/wolfSSL/wolfssl/pull/8867
https://github.com/wolfSSL/wolfssl/pull/8898
* [Low CVE-2025-7396] In wolfSSL 5.8.0 the option of hardening the C implementation of Curve25519 private key operations was added with the addition of blinding support (https://www.wolfssl.com/curve25519-blinding-support-added-in-wolfssl-5-8-0/). In wolfSSL release 5.8.2 that blinding support is turned on by default in applicable builds. The blinding configure option is only for the base C implementation of Curve25519. It is not needed, or available with; ARM assembly builds, Intel assembly builds, and the small Curve25519 feature. While the attack would be very difficult to execute in practice, enabling blinding provides an additional layer of protection for devices that may be more susceptible to physical access or side-channel observation. Thanks to Arnaud Varillon, Laurent Sauvage, and Allan Delautre from Telecom Paris for the report.
Blinding enabled by default in PR https://github.com/wolfSSL/wolfssl/pull/8736
## New Features
* Multiple sessions are now supported in the sniffer due to the removal of a cached check. (PR #8723)
* New API ssl_RemoveSession() has been implemented for sniffer cleanup operations. (PR #8768)
* The new ASN X509 API, `wc_GetSubjectPubKeyInfoDerFromCert`, has been introduced for retrieving public key information from certificates. (PR #8758)
* `wc_PKCS12_create()` has been enhanced to support PBE_AES(256|128)_CBC key and certificate encryptions. (PR #8782, PR #8822, PR #8859)
* `wc_PKCS7_DecodeEncryptedKeyPackage()` has been added for decoding encrypted key packages. (PR #8976)
* All AES, SHA, and HMAC functionality has been implemented within the Linux Kernel Module. (PR #8998)
* Additions to the compatibility layer have been introduced for X.509 extensions and RSA PSS. Adding the API i2d_PrivateKey_bio, BN_ucmp and X509v3_get_ext_by_NID. (PR #8897)
* Added support for STM32N6. (PR #8914)
* Implemented SHA-256 for PPC 32 assembly. (PR #8894)
## Improvements / Optimizations
### Linux Kernel Module (LinuxKM) Enhancements
* Registered DH and FFDHE for the Linux Kernel Module. (PR #8707)
* Implemented fixes for standard RNG in the Linux Kernel Module. (PR #8718)
* Added an ECDSA workaround for the Linux Kernel Module. (PR #8727)
* Added more PKCS1 pad SHA variants for RSA in the Linux Kernel Module. (PR #8730)
* Set default priority to 100000 for LKCAPI in the Linux Kernel Module. (PR #8740)
* Ensured ECDH never has FIPS enabled in the Linux Kernel Module. (PR #8751)
* Implemented further Linux Kernel Module and SP tweaks. (PR #8773)
* Added sig_alg support for Linux 6.13 RSA in the Linux Kernel Module. (PR #8796)
* Optimized wc_linuxkm_fpu_state_assoc. (PR #8828)
* Ensured DRBG is multithread-round-1 in the Linux Kernel Module. (PR #8840)
* Prevented toggling of fips_enabled in the Linux Kernel Module. (PR #8873)
* Refactored drbg_ctx clear in the Linux Kernel Module. (PR #8876)
* Set sig_alg max_size and digest_size callbacks for RSA in the Linux Kernel Module. (PR #8915)
* Added get_random_bytes for the Linux Kernel Module. (PR #8943)
* Implemented distro fix for the Linux Kernel Module. (PR #8994)
* Fixed page-flags-h in the Linux Kernel Module. (PR #9001)
* Added MODULE_LICENSE for the Linux Kernel Module. (PR #9005)
### Post-Quantum Cryptography (PQC) & Asymmetric Algorithms
* Kyber has been updated to the MLKEM ARM file for Zephyr (PR #8781)
* Backward compatibility has been implemented for ML_KEM IDs (PR #8827)
* ASN.1 is now ensured to be enabled when only building PQ algorithms (PR #8884)
* Building LMS with verify-only has been fixed (PR #8913)
* Parameters for LMS SHA-256_192 have been corrected (PR #8912)
* State can now be saved with the private key for LMS (PR #8836)
* Support for OpenSSL format has been added for ML-DSA/Dilithium (PR #8947)
* `dilithium_coeff_eta2[]` has been explicitly declared as signed (PR #8955)
### Build System & Portability
* Prepared for the inclusion of v5.8.0 in the Ada Alire index. (PR #8714)
* Introduced a new build option to allow reuse of the Windows crypt provider handle. (PR #8706)
* Introduced general fixes for various build configurations. (PR #8763)
* Made improvements for portability using older GCC 4.8.2. (PR #8753)
* Macro guards updated to allow tests to build with opensslall and no server. (PR #8776)
* Added a check for STDC_NO_ATOMICS macro before use of atomics. (PR #8885)
* Introduced CMakePresets.json and CMakeSettings.json. (PR #8905)
* Added an option to not use constant time code with min/max. (PR #8830)
* Implemented proper MacOS dispatch for conditional signal/wait. (PR #8928)
* Disabled MD5 by default for both general and CMake builds. (PR #8895, PR #8948)
* Improved to allow building OPENSSL_EXTRA without KEEP_PEER_CERT. (PR #8926)
* Added introspection for Intel and ARM assembly speedups. (PR #8954)
* Fixed cURL config to set HAVE_EX_DATA and HAVE_ALPN. (PR #8973)
* Moved FREESCALE forced algorithm HAVE_ECC to IDE/MQX/user_settings.h. (PR #8977)
### Testing & Debugging
* Fixed the exit status for testwolfcrypt. (PR #8762)
* Added WOLFSSL_DEBUG_PRINTF and WOLFSSL_DEBUG_CERTIFICATE_LOADS for improved debugging output. (PR #8769, PR #8770)
* Guarded some benchmark tests with NO_SW_BENCH. (PR #8760)
* Added an additional unit test for wolfcrypt PKCS12 file to improve code coverage. (PR #8831)
* Added an additional unit test for increased DH code coverage. (PR #8837)
* Adjusted for warnings with NO_TLS build and added GitHub actions test. (PR #8851)
* Added additional compatibility layer RAND tests. (PR #8852)
* Added an API unit test for checking domain name. (PR #8863)
* Added bind v9.18.33 testing. (PR #8888)
* Fixed issue with benchmark help options and descriptions not lining up. (PR #8957)
### Certificates & ASN.1
* Changed the algorithm for sum in ASN.1 OIDs. (PR #8655)
* Updated PKCS7 to use X509 STORE for internal verification. (PR #8748)
* Improved handling of temporary buffer size for X509 extension printing. (PR #8710)
* Marked IP address as WOLFSSL_V_ASN1_OCTET_STRING for ALT_NAMES_OID. (PR #8842)
* Fixed printing empty names in certificates. (PR #8880)
* Allowed CA:FALSE on wolftpm. (PR #8925)
* Fixed several inconsistent function prototype parameter names in wc/asn. (PR #8949)
* Accounted for custom extensions when creating a Cert from a WOLFSSL_X509. (PR #8960)
### TLS/DTLS & Handshake
* Checked group correctness outside of TLS 1.3 too for TLSX_UseSupportedCurve. (PR #8785)
* Dropped records that span datagrams in DTLS. (PR #8642)
* Implemented WC_NID_netscape_cert_type. (PR #8800)
* Refactored GetHandshakeHeader/GetHandShakeHeader into one function. (PR #8787)
* Correctly set the current peer in dtlsProcessPendingPeer. (PR #8848)
* Fixed set_groups for TLS. (PR #8824)
* Allowed trusted_ca_keys with TLSv1.3. (PR #8860)
* Moved Dtls13NewEpoch into DeriveTls13Keys. (PR #8858)
* Cleared tls1_3 on downgrade. (PR #8861)
* Always sent ACKs on detected retransmission for DTLS1.3. (PR #8882)
* Removed DTLS from echo examples. (PR #8889)
* Recalculated suites at SSL initialization. (PR #8757)
* No longer using BIO for ALPN. (PR #8969)
* Fixed wolfSSL_BIO_new_connect's handling of IPV6 addresses. (PR #8815)
* Memory Management & Optimizations
* Performed small stack refactors, improved stack size with mlkem and dilithium, and added additional tests. (PR #8779)
* Implemented FREE_MP_INT_SIZE in heap math. (PR #8881)
* Detected correct MAX_ENCODED_SIG_SZ based on max support in math lib. (PR #8931)
* Fixed improper access of sp_int_minimal using sp_int. (PR #8985)
### Cryptography & Hash Functions
* Implemented WC_SIPHASH_NO_ASM for not using assembly optimizations with siphash. (PR #8789, PR #8791)
* Added missing DH_MAX_SIZE define for FIPS and corrected wolfssl.rc FILETYPE to VFT_DLL. (PR #8794)
* Implemented WC_SHA3_NO_ASM for not using assembly with SHA3. (PR #8817)
* Improved Aarch64 XFENCE. (PR #8832)
* Omitted frame pointer for ARM32/Thumb2/RISC-V 64 assembly. (PR #8893)
* Fixed branch instruction in ARMv7a ASM. (PR #8933)
* Enabled EVP HMAC to work with WOLFSSL_HMAC_COPY_HASH. (PR #8944)
* Platform-Specific & Hardware Integration
* Added HAVE_HKDF for wolfssl_test and explicit support for ESP32P4. (PR #8742)
* Corrected Espressif default time setting. (PR #8829)
* Made wc_tsip_* APIs public. (PR #8717)
* Improved PlatformIO Certificate Bundle Support. (PR #8847)
* Fixed the TSIP TLS example program. (PR #8857)
* Added crypto callback functions for TROPIC01 secure element. (PR #8812)
* Added Renesas RX TSIP AES CTR support. (PR #8854)
* Fixed TSIP port using crypto callback. (PR #8937)
### General Improvements & Refactoring
* Attempted wolfssl_read_bio_file in read_bio even when XFSEEK is available. (PR #8703)
* Refactored GetHandshakeHeader/GetHandShakeHeader into one function. (PR #8787)
* Updated libspdm from 3.3.0 to 3.7.0. (PR #8906)
* Fixed missing dashes on the end of header and footer for Falcon PEM key. (PR #8904)
* Fixed minor code typos for macos signal and types.h max block size. (PR #8934)
* Make the API wolfSSL_X509_STORE_CTX_get_error accessible to more build configurations for ease of getting the "store" error code and depth with certificate failure callback implementations. (PR #8903)
## Bug Fixes
* Fixed issues to support _WIN32_WCE (VS 2008 with WinCE 6.0/7.0). (PR #8709)
* Fixed STM32 Hash with IRQ enabled. (PR #8705)
* Fixed raw hash when using crypto instructions on RISC-V 64-bit. (PR #8733)
* Fixed ECDH decode secret in the Linux Kernel Module. (PR #8729)
* Passed in the correct hash type to wolfSSL_RSA_verify_ex. (PR #8726)
* Fixed issues for Intel QuickAssist latest driver (4.28). (PR #8728)
* Speculative fix for CodeSonar overflow issue in ssl_certman.c. (PR #8715)
* Fixed Arduino progmem print and AVR WOLFSSL_USER_IO. (PR #8668)
* Correctly advanced the index in wc_HKDF_Expand_ex. (PR #8737)
* Fixed STM32 hash status check logic, including NO_AES_192 and NO_AES_256. (PR #8732)
* Added missing call to wolfSSL_RefFree in FreeCRL to prevent memory leaks. (PR #8750)
* Fixed sanity check on --group with unit test app and null sanity check with des decrypt. (PR #8711)
* Fixed Curve25519 and static ephemeral issue with blinding. (PR #8766)
* Fixed edge case issue with STM32 AES GCM auth padding. (PR #8745)
* Removed redefinition of MlKemKey and fixed build issue in benchmark. (PR #8755)
* Used proper heap hint when freeing CRL in error case. (PR #8713)
* Added support for no malloc with wc_CheckCertSigPubKey. (PR #8725)
* Fixed C# wrapper Release build. (PR #8802)
* Handled malformed CCS and CCS before CH in TLS1.3. (PR #8788)
* Fixed ML-DSA with WOLFSSL_DILITHIUM_NO_SIGN. (PR #8798)
* Fixed AesGcmCrypt_1 no-stream in the Linux Kernel Module. (PR #8814)
* Fixed return value usage for crypto_sig_sign in the Linux Kernel Module. (PR #8816)
* Fixed issue with CSharp and Windows CE with conversion of ASCII and Unicode. (PR #8799)
* Fixed Renesas SCE on RA6M4. (PR #8838)
* Fixed tests for different configs for ML-DSA. (PR #8865)
* Fixed bug in ParseCRL_Extensions around the size of a CRL number handled and CRL number OID. (PR #8587)
* Fixed uninitialized wc_FreeRng in prime_test. (PR #8886)
* Fixed ECC configuration issues with ECC verify only and no RNG. (PR #8901)
* Fixed issues with max size, openssl.test netcat, and clang-tidy. (PR #8909)
* Fixed for casting down and uninit issues in Dilithium/ML-DSA. (PR #8868)
* Fixed memory allocation failure testing and related unit test cases. (PR #8945, PR #8952)
* Fixed build issue with ML-DSA 44 only. (PR #8981)
* Fixed possible memory leak with X509 reference counter when using x509small. (PR #8982)
# wolfSSL Release 5.8.0 (Apr 24, 2025)
Release 5.8.0 has been developed according to wolfSSL's development and QA
@@ -6,7 +294,7 @@ https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assur
NOTE: * --enable-heapmath is deprecated
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request
number where the code change was added.
@@ -222,7 +510,7 @@ NOTE:
user_settings.h.
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request
number where the code change was added.
@@ -342,7 +630,7 @@ https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assur
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
PR stands for Pull Request, and PR (NUMBER) references a GitHub pull request
number where the code change was added.

View File

@@ -2,5 +2,4 @@ FROM debian:latest
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y build-essential autoconf gawk debhelper lintian
RUN apt-get install -y build-essential autoconf gawk debhelper lintian dpkg-dev

View File

@@ -1,18 +1,18 @@
# wolfSSL with Arduino
See the [example sketches](./sketches/README.md):
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
See the [example sketches](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino):
Bare-bones templates:
- [sketches/wolfssl_version](./sketches/wolfssl_version/README.md) single file.
- [sketches/template](./sketches/template/README.md) multiple file example.
- [sketches/wolfssl_version](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_version/README.md) single file.
- [sketches/template](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/template/README.md) multiple file example.
Functional examples:
- [sketches/wolfssl_AES_CTR](./sketches/wolfssl_AES_CTR/README.md) AES CTR Encrypt / decrypt.
- [sketches/wolfssl_client](./sketches/wolfssl_client/README.md) TLS Client.
- [sketches/wolfssl_server](./sketches/wolfssl_server/README.md) TLS Server.
- [sketches/wolfssl_AES_CTR](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_AES_CTR/README.md) AES CTR Encrypt / decrypt.
- [sketches/wolfssl_client](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_client/README.md) TLS Client.
- [sketches/wolfssl_server](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_server/README.md) TLS Server.
- [sketches/wolfssl_client_dtls](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_client_dtls/README.md) DTLS Client.
- [sketches/wolfssl_server_dtls](https://github.com/wolfSSL/wolfssl-examples/tree/master/Arduino/sketches/wolfssl_server_dtls/README.md) DTLS Server.
Both the `template` and `wolfssl_AES_CTR` examples include VisualGDB project files.

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
@@ -25,9 +25,33 @@
/* Function to allow wolfcrypt to use Arduino Serial.print for debug messages.
* See wolfssl/wolfcrypt/logging.c */
#if defined(__AVR__)
#include <avr/pgmspace.h> /* Required for PROGMEM handling on AVR */
#endif
int wolfSSL_Arduino_Serial_Print(const char* const s)
{
/* Reminder: Serial.print is only available in C++ */
Serial.println(F(s));
int is_progmem = 0;
#if defined(__AVR__)
const char* t;
t = s;
/* Safely check if `s` is in PROGMEM, 0x8000 is typical for AVR flash */
if (reinterpret_cast<uint16_t>(t) >= 0x8000) {
while (pgm_read_byte(t)) {
Serial.write(pgm_read_byte(t++));
}
Serial.println();
is_progmem = 1;
}
#endif
/* Print normally for non-AVR boards or RAM-stored strings */
if (!is_progmem) {
Serial.println(s);
}
return 0;
};

View File

@@ -26,6 +26,9 @@
# The Arduino library include file is "wolfssl.h" (all lower case)
# The Published wolfSSL Arduino Registry is at https://github.com/wolfSSL/Arduino-wolfSSL.git
# See https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/
#
echo "wolfssl-arduino.sh v5.8.2 rev B"
ROOT_DIR="/wolfssl"
# The Arduino Version will initially have a suffix appended during fine tuning stage.
@@ -70,18 +73,24 @@ if [ "$ROOT_DIR" = "" ]; then
exit 1
fi
if [ "$ARDUINO_ROOT" = "" ]; then
echo "No ARDUINO_ROOT export... detecting..."
ARDUINO_ROOT="$HOME/Arduino/libraries"
ARDUINO_ROOT="$HOME/Arduino/libraries"
# Check environment
if [ -n "$WSL_DISTRO_NAME" ]; then
# we found a non-blank WSL environment distro name
current_path="$(pwd)"
pattern="/mnt/?"
if echo "$current_path" | grep -Eq "^$pattern"; then
# if we are in WSL and shared Windows file system, 'ln' does not work.
ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries"
# Check environment
if [ -n "$WSL_DISTRO_NAME" ]; then
# we found a non-blank WSL environment distro name
echo "Found WSL: $WSL_DISTRO_NAME"
current_path="$(pwd)"
pattern="/mnt/?"
if echo "$current_path" | grep -Eq "^$pattern"; then
# if we are in WSL and shared Windows file system, 'ln' does not work.
ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries"
echo "ARDUINO_ROOT set to $ARDUINO_ROOT"
fi
fi
else
echo "Using export ARDUINO_ROOT"
fi
echo "The Arduino library root is: $ARDUINO_ROOT"
@@ -173,7 +182,7 @@ THIS_DIR=${PWD##*/}
if [ "$THIS_DIR" = "ARDUINO" ]; then
# mkdir ./wolfssl
if [ -d ".${ROOT_DIR}" ]; then
echo "ERROR: $(realpath ".${ROOT_DIR}") is not empty"
echo "ERROR: $(realpath ".${ROOT_DIR}") is not empty; failed prior install? Please remove."
exit 1
else
echo "Step 01: mkdir .${ROOT_DIR}"
@@ -262,6 +271,12 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then
# Copy examples
mkdir -p ".${ROOT_SRC_DIR}"/examples
EXAMPLES_DIR_REAL_PATH=$(realpath ".${EXAMPLES_DIR}")
echo "Source WOLFSSL_EXAMPLES_ROOT=$WOLFSSL_EXAMPLES_ROOT"
echo "Destination EXAMPLES_DIR=.${EXAMPLES_DIR}"
echo "EXAMPLES_DIR_REAL_PATH=${EXAMPLES_DIR_REAL_PATH}"
# Only explicit source code is copied to the Arduino library. Edit with caution, no automation:
if [ -n "$WOLFSSL_EXAMPLES_ROOT" ]; then
echo "Copy template example...."
mkdir -p ".${EXAMPLES_DIR}"/template/wolfssl_library/src
@@ -274,26 +289,39 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then
echo "Copy wolfssl_AES_CTR example...."
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_AES_CTR
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/wolfssl_AES_CTR.ino ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/wolfssl_AES_CTR.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/README.md ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/README.md || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/wolfssl_AES_CTR.ino ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/wolfssl_AES_CTR.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/README.md ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/README.md || exit 1
echo "Copy wolfssl_client example...."
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1
echo "Copy wolfssl_client_dtls example...."
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client_dtls
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client_dtls/wolfssl_client_dtls.ino ".${EXAMPLES_DIR}"/wolfssl_client_dtls/wolfssl_client_dtls.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client_dtls/README.md ".${EXAMPLES_DIR}"/wolfssl_client_dtls/README.md || exit 1
echo "Copy wolfssl_server example...."
mkdir -p .${EXAMPLES_DIR}/wolfssl_server
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1
echo "Copy wolfssl_server_dtls example...."
mkdir -p .${EXAMPLES_DIR}/wolfssl_server_dtls
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server_dtls/wolfssl_server_dtls.ino ".${EXAMPLES_DIR}"/wolfssl_server_dtls/wolfssl_server_dtls.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server_dtls/README.md ".${EXAMPLES_DIR}"/wolfssl_server_dtls/README.md || exit 1
echo "Copy wolfssl_version example...."
mkdir -p .${EXAMPLES_DIR}/wolfssl_version
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1
else
NO_ARDUINO_EXAMPLES=1
fi
echo "Examples copied to .${EXAMPLES_DIR}"
echo "ls ${EXAMPLES_DIR_REAL_PATH}"
ls "${EXAMPLES_DIR_REAL_PATH}"
else
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
exit 1
@@ -356,27 +384,39 @@ if [ "$THIS_OPERATION" = "INSTALL" ]; then
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
# Show the user_settings.h revision string:
echo "This user_settings.h revision string:"
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
echo ""
if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then
echo "Installing to GitHub directory: $THIS_INSTALL_DIR"
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
echo "Removing workspace library directory: .$ROOT_DIR"
rm -rf ".$ROOT_DIR"
rm -rf ".$ROOT_DIR" || exit 1
else
echo "Installing to local directory:"
if [ "$THIS_INSTALL_DIR" = "" ]; then
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
if [ -n "$WSL_DISTRO_NAME" ]; then
# setfattr not installed by default
# echo "Set system.wsl_case_sensitive .$ROOT_DIR"
# setfattr -x system.wsl_case_sensitive .$ROOT_DIR
#
# use copy instead of move to avoid possible system.wsl_case_sensitive warnings
echo "cp -r .\"$ROOT_DIR\" \"$ARDUINO_ROOT\""
cp -r ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
echo "rm -rf .\"$ROOT_DIR\""
rm -rf ."$ROOT_DIR" || exit 1
else
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
fi
echo "Arduino wolfSSL Version: $WOLFSSL_VERSION$WOLFSSL_VERSION_ARUINO_SUFFIX"
else
echo "cp -r .\"$ROOT_DIR\"/* \"$THIS_INSTALL_DIR\""
mkdir -p "$THIS_INSTALL_DIR" || exit 1
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
mkdir -p "$THIS_INSTALL_DIR" || exit 1
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
fi
fi
fi

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

View File

@@ -6,7 +6,7 @@
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,

Some files were not shown because too many files have changed in this diff Show More