Commit Graph

28687 Commits

Author SHA1 Message Date
David Garske e673316f80 Merge pull request #10177 from julek-wolfssl/add-missing-bwrap
Add bwrap network namespace isolation to scripts with listening ports
2026-04-10 14:24:07 -07:00
David Garske ddf4666031 Merge pull request #10077 from Frauschi/pkcs11-mlkem
Add ML-KEM support for PKCS#11
2026-04-10 14:22:47 -07:00
David Garske 4b7ff29b2b Merge pull request #10185 from JacobBarthelmeh/docs
update changelog notes
2026-04-10 11:51:13 -07:00
David Garske 9c7257bb7c Merge pull request #10146 from Frauschi/ci_tests
Remove some duplicate CI tests
2026-04-10 09:54:28 -07:00
David Garske 51cd66d0e8 Merge pull request #10106 from BrianAker/fix/remove-unused-m4
Remove unused m4 macros and update AX_PTHREAD
2026-04-10 08:56:24 -07:00
Tobias Frauenschläger 9c2dbac668 os-check: split platform-agnostic configs to Linux-only job
Split make_check into two jobs to reduce CI time:

- make_check: 37 configs that interact with platform-specific features
  (sys-ca-certs, Apple Security.framework, OpenSSL compat, networking)
  continue to run on both Ubuntu and macOS.

- make_check_linux: 17 configs testing pure crypto algorithms,
  preprocessor guards, or features with no macOS-specific code paths
  now run on Linux only.

Also change make_user_settings_testwolfcrypt to Linux-only since
testwolfcrypt runs pure crypto tests with no platform-specific features.

Saves ~33 CI jobs with no loss of test coverage.
2026-04-10 12:50:24 +02:00
Tobias Frauenschläger 585a1ecaaf CI script improvements
* ensure make -j is called everywhere
* shallow clones where possible
* set fixed ubuntu version for linux tests
2026-04-10 12:50:24 +02:00
Tobias Frauenschläger 062ef3e93b Remove some duplicate CI tests 2026-04-10 12:50:24 +02:00
Tobias Frauenschläger 85dd923355 cryptocb: always run software cleanup in key Free functions
The WOLF_CRYPTO_CB_FREE path in wc_MlKemKey_Free, wc_dilithium_free,
and wc_ecc_free returned early when the crypto callback succeeded,
skipping local cleanup: ForceZero on private key material, PRF/hash
object frees (ML-KEM), SHAKE free and cached vector frees (ML-DSA),
and mp_forcezero on the private scalar and all hardware port frees
(ECC).

Any non-PKCS#11 callback returning 0 would silently leave key material
in memory. The PKCS#11 backend worked around this by returning
CRYPTOCB_UNAVAILABLE on success to force the fallthrough — a fragile
contract that is not part of the documented callback interface.

Fix by always continuing to software cleanup after invoking the
callback.

Remove the CRYPTOCB_UNAVAILABLE workaround from the three PKCS#11 free
dispatchers (ECC, ML-DSA, ML-KEM); they now return the real result of
C_DestroyObject.
2026-04-10 12:23:57 +02:00
Tobias Frauenschläger 21f1587c26 PKCS#11: add ML-KEM support
Add PKCS#11 integration for ML-KEM with key generation,
encapsulation and decapsulation support through the crypto
callback path.

Includes ML-KEM PKCS#11 constants/types, key store handling,
token object lifecycle management, and ML-KEM key init helpers
for private-key ID/label workflows.

Align implementation details with current upstream conventions
and review feedback:
- internal wolfCrypt ML-KEM path only for PKCS#11
- inline ML-KEM key-type/flag checks in PKCS#11 code
- proper key template formatting and enum placement
- ensure TLS ML-KEM object storage behavior is compatible with
  PKCS#11 ephemeral-key decapsulation flow
2026-04-10 12:23:37 +02:00
JacobBarthelmeh 43f06851f1 update changelog notes 2026-04-09 20:45:59 -06:00
Sean Parkinson abfff1ec2f Merge pull request #10167 from embhorn/zd21571
Fix ETM on resumption
2026-04-10 07:45:20 +10:00
David Garske 8059fbdbe8 Merge pull request #10129 from rlm2002/coverity_fix
03042026 Coverity tests fix
2026-04-09 13:35:36 -07:00
David Garske 9e199f3ae7 Merge pull request #10165 from rlm2002/coverity
Coverity fix
2026-04-09 13:34:26 -07:00
David Garske cc72851694 Merge pull request #10026 from LinuxJedi/actions-composite-caching
Composite GHA action with caching
2026-04-09 12:01:24 -07:00
David Garske a91096501f Merge pull request #10153 from sebastian-carpenter/GH-10067
do not enable TLSX with --enable-ech
2026-04-09 11:43:52 -07:00
David Garske a3ef93567e Merge pull request #10147 from julek-wolfssl/ocsp-responder-docs
Add documentation for new OCSP responder and cert accessor APIs
2026-04-09 11:42:03 -07:00
Eric Blankenhorn 31eb54f950 Fix from review 2026-04-09 11:32:47 -05:00
JacobBarthelmeh 044a5f8b81 Merge pull request #10143 from dgarske/qat_aes_gcm
Improve QAT AES GCM tag checking
2026-04-09 09:40:25 -06:00
Eric Blankenhorn 191b827579 Fix from review 2026-04-09 10:14:45 -05:00
Juliusz Sosinowicz fd63d6c20e Add bwrap network namespace isolation to scripts with listening ports
Add NETWORK_UNSHARE_HELPER/bwrap wrapping to benchmark.test,
openssl_srtp.test, and sniffer-gen.sh to isolate network namespaces and
prevent port collisions when tests run concurrently. sniffer-gen.sh uses
--cap-add ALL (like dtls.test) since it runs tcpdump. ocsp-stapling.test
is excluded because it connects to external servers (login.live.com).
2026-04-09 13:56:14 +02:00
Sean Parkinson 3e0679ee17 Merge pull request #10156 from douzzer/20260407-SHA3-unaligned-access
20260407-SHA3-unaligned-access
2026-04-09 18:47:06 +10:00
Sean Parkinson 6617863249 Merge pull request #10145 from Frauschi/ecc_follow_up
ECC curve validation follow-up
2026-04-09 18:35:56 +10:00
Sean Parkinson 2a064607e4 Merge pull request #10150 from julek-wolfssl/enable-ocsp-responder-disable-tls13
Guard OCSP signature params with WC_RSA_PSS ifdef
2026-04-09 18:13:00 +10:00
Sean Parkinson 139042e6d5 Merge pull request #10159 from Frauschi/dual_alg_fix
Fix build failure for DUAL_ALG_CERTS
2026-04-09 18:00:47 +10:00
Eric Blankenhorn b218b29403 Fix from review 2026-04-08 16:13:23 -05:00
Eric Blankenhorn af5369636a Fix ETM on resumption 2026-04-08 15:06:11 -05:00
David Garske 1d363f3adc Merge pull request #10163 from JacobBarthelmeh/release
prepare for release 5.9.1
2026-04-08 10:40:06 -07:00
Juliusz Sosinowicz bfad5398b1 MSVC: replace UINT32_MAX with WOLFSSL_MAX_32BIT in dilithium.c 2026-04-08 10:00:52 -07:00
Ruby Martin 5e87b82dfa initialize key and rng in test_DhAgree_rejects_p_minus_1() 2026-04-08 09:48:06 -06:00
JacobBarthelmeh 719e98f717 prepare for release 5.9.1 2026-04-08 07:34:41 -06:00
Juliusz Sosinowicz 78e5ae3978 Address review comments 2026-04-08 11:35:48 +02:00
Tobias Frauenschläger 178d2f61f4 Fix build with WOLFSSL_DUAL_ALG_CERTS and HAVE_PK_CALLBACKS 2026-04-08 10:18:00 +02:00
Daniel Pouzzner 750f3b119e Merge pull request #10088 from anhu/new_various
Various security fixes and tests
2026-04-07 22:13:18 -05:00
JacobBarthelmeh 4fd0df42e7 add adjustment for review 2026-04-07 21:08:11 -06:00
JacobBarthelmeh 9a79c412a5 Merge pull request #10154 from douzzer/20260407-fips-ready-WC_FIPS_186_4
20260407-fips-ready-WC_FIPS_186_4
2026-04-07 16:46:16 -06:00
JacobBarthelmeh 7f84fb2624 Merge pull request #10152 from douzzer/20260407-BLAKE-gating
20260407-BLAKE-gating
2026-04-07 16:18:09 -06:00
JacobBarthelmeh d1c6423b82 make the padding check constant time and move evp exponent print size macro to local file 2026-04-07 16:09:52 -06:00
David Garske 852ddcb37d Improve QAT AES GCM tag checking 2026-04-07 13:53:41 -07:00
Daniel Pouzzner 296148b4e6 wolfcrypt/src/sha3.c: fix Load64Unaligned() implementation with unaligned integer access when WC_SHA3_FAULT_HARDEN && !BIG_ENDIAN_ORDER. 2026-04-07 15:39:31 -05:00
JacobBarthelmeh ecfd1174bb refactor sanity pointer set of session and clean up macro guards 2026-04-07 14:10:25 -06:00
Daniel Pouzzner 5fa8b1535a wolfssl/wolfcrypt/settings.h: for fips-ready, set WC_FIPS_186_4, not _5, to match v5/v6. 2026-04-07 14:35:15 -05:00
sebastian-carpenter faf93cba85 do not enable TLSX with --enable-ech 2026-04-07 12:40:38 -06:00
Daniel Pouzzner 60d1e222b2 globally fix all "BLAKE2" references (implicit BLAKE2B) to explicit "BLAKE2B":
* implement legacy compatibility in settings.h and configure.ac (adds --enable-blake2b while retaining --enable-blake2);
* fix incorrect Blake2 gates in wolfcrypt/src/hash.c wc_HashGetDigestSize() and wc_HashGetBlockSize();
* in wolfcrypt/test/test.c hash_test(), backfill missing Blake2 test coverage and separate blake2b from blake2s in typesHashBad[];
* in tests/api/test_hash.c, separate blake2b from blake2s in notCompiledHash[], sizeSupportedHash[], and sizeNotCompiledHash[].
2026-04-07 13:18:53 -05:00
JacobBarthelmeh ad1cc4e87f adjust test case return value check after rebase 2026-04-07 10:26:16 -06:00
Paul Adelsbach c335f7dd6f Remove UTF-8 chars
Get rid of weird character

Fix warning found by CI

Style changes

Addressed 1 and 2.
2026-04-07 10:07:12 -06:00
Anthony Hu 2e32094545 Add regression tests for fixes 2026-04-07 10:05:56 -06:00
Anthony Hu 5bd5f36dff Fix RSA exponent printing (ZD 21426)
Increase buff size from 8 to 24 bytes in PrintPubKeyRSA and related
EVP PKEY print functions.
2026-04-07 10:05:48 -06:00
Anthony Hu 985cceaa97 Fix session cache restore dangling pointer (ZD 21423)
Reinitialize pointer fields in WOLFSSL_SESSION after raw XMEMCPY or
XFREAD in wolfSSL_memrestore_session_cache and
wolfSSL_restore_session_cache. After restore, ticket is reset to
staticTicket, ticketLenAlloc to 0, and peer to NULL.
2026-04-07 10:05:31 -06:00
Anthony Hu c563f3932a Fix PKCS7 CBC padding oracle in EnvelopedData and EncryptedData (ZD 21422)
Replace single last-byte padding check with full PKCS#5/PKCS#7
validation: verify padLen is non-zero and within block size.
Both wc_PKCS7_DecodeEnvelopedData and wc_PKCS7_DecodeEncryptedData
paths are fixed.
2026-04-07 10:05:21 -06:00