Commit Graph

1615 Commits (master)

Author SHA1 Message Date
JacobBarthelmeh e2ee66c64b
Merge pull request #11480 from SparkiDev/crypto_fixes_1
Cryptography implementation fixes
2026-09-18 16:26:37 -06:00
JacobBarthelmeh 8632c499ae
Merge pull request #11458 from kareem-wolfssl/zd22448_tls
Only process CCS after CKE is sent.  Fix verification logic for RPK.  Clear legacy_session_id when using TLS 1.3.  Forbid Certificate messages for PSK.
2026-09-18 16:07:54 -06:00
JacobBarthelmeh f48ee13d9f
Merge pull request #11175 from embhorn/zd22291
Fix AES-GCM nonce reuse in the async encrypt path
2026-09-18 12:05:14 -06:00
JacobBarthelmeh 1ebd9c1492
Merge pull request #11211 from kareem-wolfssl/zd22352_3_4
Correct reassembly logic in sniffer.  Fix handshake message size in BuildCertificateStatus.  Ensure MTU is set properly when using SCTP with DTLS.  Improve SCTP examples.
2026-09-18 10:54:54 -06:00
JacobBarthelmeh 8ead25835b
Merge pull request #11459 from kareem-wolfssl/zd22448_pkcs
Preserve noDegenerate state in PKCS7_VerifySignedData for bundles with certs. Fix size checks in PKCS12 GetSafeContent.
2026-09-18 10:20:03 -06:00
Kareem 8e0a9890ee Fix test_tls13_feat_psk_unsolicited_client_cert link error. 2026-09-17 08:40:28 -07:00
Kareem de8c31c3c1 Ensure Certificate messages are forbidden for PSK operations. 2026-09-17 08:37:49 -07:00
Kareem 81c0fe51fc Clear sessionID when using TLS 1.3 to prevent using legacy_session_id. 2026-09-17 08:37:48 -07:00
Kareem 3ae6889e93 Fix verification logic for RPK. 2026-09-17 08:37:48 -07:00
Kareem caaedc578f Forbid processing the ChangeCipherSpec until after ClientKeyExchange is sent. 2026-09-17 08:37:48 -07:00
jordan 0323bed2a8 ssl_api_cert: handle cmp_peer_cert gracefully when no peer cert. 2026-09-17 09:25:54 -05:00
Sean Parkinson 1445c701dd Cryptography implementation fixes
fe_448.c: small code corner case in reductions
eccsi.c: don't modify ssk field of key on verify
wc_mlkem_poly.c: When compiled for Intel assembly but not AVX2 - no assembly code used - the initialization of the SHAKE is needed in derive secret. Always initialize as it doesn't cost much.
sp_c32.c/sp_c64.c: corner case of div - when r1 is negative is really is going meant to be 0
sp_c32.c: Fix TOOM-3 mul and sqr to handle over large inputs.
ed448.c: check non-canonical keys better
2026-09-17 17:42:23 +10:00
JacobBarthelmeh 0ed32f958f
Merge pull request #11433 from embhorn/zd22432
Fix non-minimal DER encoding of caller-supplied certificate serials
2026-09-15 14:51:05 -06:00
JacobBarthelmeh fad92fa095
Merge pull request #11399 from night1rider/ecies-dev-id-change
Ecies dev id change
2026-09-15 14:31:49 -06:00
Kareem 7e18ed94d1 Add another bundle to allow PKCS12 test to run without ASN_BER_TO_DER defined. Disable PKCS tests when NO_SHA256 is defined. 2026-09-15 13:27:47 -07:00
JacobBarthelmeh 35233fb23e
Merge pull request #10978 from kareem-wolfssl/zd21980
Add Enable/DisableNormalMasterSecret APIs to enforce EMS requirement at runtime.  Disable server EMS when DisableExtendedMasterSecret is called, not just client EMS.
2026-09-15 13:51:51 -06:00
Kareem 854756e768 Preserve noDegenerate state in PKCS7_VerifySignedData for bundles with certs. 2026-09-15 11:30:06 -07:00
Kareem e2311af477 Fix size checks in GetSafeContent. 2026-09-15 11:30:06 -07:00
Kareem a3965fa8be Code review feedback 2026-09-15 11:26:06 -07:00
Kareem 1563dc765d Code review feedback:
Fix max MTU logic in added test
Fix client and server SCTP argument.  They should not be setting UDP.  This was causing ./configure --enable-sctp --enable-dtls-mtu to fail on master.
2026-09-15 11:26:06 -07:00
Kareem 02a16bb15c Code review feedback 2026-09-15 11:26:06 -07:00
Kareem cbe035a85b Ensure MTU is set properly when using SCTP with DTLS. Add return code checks and fix wolfSSL_shutdown handling in SCTP examples. 2026-09-15 11:26:06 -07:00
Kareem 38bce9dd3f Fix handshake message size in BuildCertificateStatus and add test.
This was causing issues when using OCSP stapling with secure_renegotiation and renegotiating a connection.
Thanks to 007bsd for the report.
2026-09-15 11:26:06 -07:00
night1rider 184e167811 ECIES: test the WOLF_CRYPTO_CB_FIND path and build it in CI
A new API test registers a finder and checks that a context with no device id is routed to the device by the finder and not routed once the finder is gone, and the os-check matrix gains an ECIES entry with the finder on so the test runs.
2026-09-15 11:59:32 -06:00
JacobBarthelmeh 5a59a56e36
Merge pull request #11269 from aidankeefe2022/fenrir-10736
Fix: Unchecked buffer overrun when adding Cert Directory
2026-09-15 10:42:20 -06:00
Eric Blankenhorn 25f31a557d Fix from review 2026-09-15 11:42:19 -05:00
night1rider 2ed567c29c ECIES: take the device id from the context instead of the ECC key
A context starts in software and only wc_ecc_ctx_set_dev_id() sends the ECIES callback and the KDF, AES and HMAC steps to a device; tests, benchmark, docs and the os-check matrix are updated to match.
2026-09-15 10:18:02 -06:00
JacobBarthelmeh 1b6326271d
Merge pull request #11461 from philljj/fix_test_ssl_ext
test_ssl_ext: use NO_CLIENT_CACHE define guard.
2026-09-15 10:13:31 -06:00
JacobBarthelmeh 34292f741c
Merge pull request #11256 from julek-wolfssl/x509-auth-level-ssl-tlsext-debug-cb
Add SSL_set_tlsext_debug_callback compat API
2026-09-15 10:09:10 -06:00
JacobBarthelmeh 6fac3806ce
Merge pull request #11186 from embhorn/zd22288
Fix heap overflow in TLS compression receive path
2026-09-15 09:59:39 -06:00
JacobBarthelmeh 4a9d559022
Merge pull request #11404 from SparkiDev/asn_templ_depth_fix
ASN template depth fix
2026-09-15 09:31:59 -06:00
Eric Blankenhorn 5c9de0f979 Fix from review 2026-09-15 10:12:54 -05:00
Eric Blankenhorn 2efbed81c4 Fix from review 2026-09-15 09:21:08 -05:00
Eric Blankenhorn aefd3d54c1 Fix non-minimal DER encoding of caller-supplied certificate serials 2026-09-15 09:21:07 -05:00
jordan 0a012ae638 test_ssl_ext: fix typo. 2026-09-15 09:16:10 -05:00
jordan 7970cd3655 test_ssl_ext: fix and cleanup define guards. 2026-09-15 08:05:43 -05:00
jordan 19d60752d9 test_ssl_ext: use NO_CLIENT_CACHE define guard. 2026-09-15 07:32:36 -05:00
Juliusz Sosinowicz dd5ab54af1 Address review: drop the function-pointer cast from SSL_set_tlsext_debug_callback
The compat macro cast the caller's callback to WOLFSSL_TLSEXT_DEBUG_CB.
Calling a function through an incompatible pointer type is undefined
(C17 6.3.2.3 p8), and the cast silenced the diagnostic that would have
caught a mismatch.

WOLFSSL_TLSEXT_DEBUG_CB already matches OpenSSL's callback, which takes
const unsigned char *data, so the macro can be a plain alias. A callback
spelled the OpenSSL way now compiles unchanged and a mismatched one is a
compile error instead of undefined behaviour at run time.

Test a callback declared with OpenSSL's spelling through the macro.
2026-09-15 05:52:12 +00:00
Sean Parkinson 3278128661 ASN template depth fix
Track the actual depth and compare to expected.
Added tests for this.
2026-09-15 13:00:26 +10:00
Kareem 9f78becb1d Fix resuming EMS ticket when EMS is disabled. Ticket is now rejected as expected. 2026-09-14 17:40:00 -07:00
Kareem b8f3617325 Enforce EMS requirement for secret callback as well. Add test for this case, and for --enable-all + HAVE_SECRET_CALLBACK. 2026-09-14 17:15:38 -07:00
Kareem eec8b18896 EMS: Fix test failure under WOLFSSL_BLIND_PRIVATE_KEY. 2026-09-14 17:15:38 -07:00
Kareem a219b2f2be Fix test failures due to not re-arming DH params 2026-09-14 17:15:38 -07:00
Kareem b0acc953d8 EMS code review feedback:
Ensure wolfSSL_clear resets EMS state
Prevent EMS APIs from being called after handshake
Return on EMS error in wolfSSL_SetSession
Update tests
2026-09-14 17:15:38 -07:00
Kareem b960ffdf93 Code review feedback 2026-09-14 17:15:37 -07:00
Kareem a7d5b0db09 EMS code review feedback:
Disable peerAuthGood when rejecting ticket due to EMS being disabled
Ensure that if EMS is disabled, sessions with EMS are not used
Add client resumption test and extend server resumption test to optionally use session tickets
2026-09-14 17:15:37 -07:00
Kareem c26842949d EMS code review feedback:
Check as early in the connection as possible
Abort resumption rather than fully aborting connection when EMS is disabled
Make version check around haveEMS consistent
Clear premaster secret when EMS check fails
Update documentation
2026-09-14 17:15:37 -07:00
Kareem 15bd0bb841 Code review feedback 2026-09-14 17:15:37 -07:00
Kareem 93ec1aedbf Code review feedback 2026-09-14 17:15:37 -07:00
Kareem 636cb34bd7 Code review feedback 2026-09-14 17:15:36 -07:00