Commit Graph

9429 Commits

Author SHA1 Message Date
Daniel Pouzzner 0a61997059 Merge pull request #10045 from embhorn/zd21385
Fix IAR warning about volatile access
2026-03-30 13:42:14 -05:00
Daniel Pouzzner 5b2e8b1376 Merge pull request #10065 from dgarske/async_nb_leak
Fix possible leak for ecc non-blocking crypto
2026-03-30 11:40:02 -05:00
Daniel Pouzzner 18111b1252 Merge pull request #10092 from anhu/hkex-ticket
Fix PQC hybrid KeyShare pointer sanity.
2026-03-30 11:36:11 -05:00
Daniel Pouzzner df055976ed Merge pull request #10079 from rlm2002/ghi10063
Various GI and ZD fixes
2026-03-30 11:34:05 -05:00
Daniel Pouzzner e3d4d220c3 src/conf.c, src/ssl.c, wolfcrypt/src/asn.c, wolfssl/wolfcrypt/asn.h: fixes for invalid-pointer-pair memory errors reported by clang sanitizer with detect_invalid_pointer_pairs=2 in ASAN_OPTIONS. 2026-03-27 16:40:05 -05:00
Anthony Hu 46f6320380 Fix PQC hybrid KeyShare pointer sanity.
Also add tests for it and SetTicket
2026-03-27 14:33:41 -04:00
Ruby Martin a827a82ed3 return null if len<=0 2026-03-26 16:11:19 -06:00
Ruby Martin ce7b81b6ee break when idx greater than MAX_CHAIN_DEPTH 2026-03-26 11:28:36 -06:00
Ruby Martin a963c5fc47 add check to prevent integer underflow 2026-03-26 11:28:36 -06:00
Ruby Martin a696d11519 if len is 0, do not subtract 1 when calling XMALLOC 2026-03-26 11:28:36 -06:00
Ruby Martin 1766b91dc2 check idx before accessing certificate list 2026-03-26 11:28:36 -06:00
Ruby Martin 3bc72b5d27 bounds check when parsing dual-algo cert sigs 2026-03-26 11:28:36 -06:00
Ruby Martin 14695fb9cd zeroize ssl->encrypt after transferring ownership to dup 2026-03-26 11:28:36 -06:00
Ruby Martin 50448ef7c6 add guard for integer underflow in DecryptTls13 2026-03-25 10:22:10 -06:00
Eric Blankenhorn 1a1bdb2cfe Address review feedback 2026-03-25 07:48:16 -05:00
David Garske 6cc94b07a4 Fix possible leak for ecc non-blocking crypto 2026-03-24 14:44:28 -07:00
David Garske 73bea906be Merge pull request #10034 from sebastian-carpenter/GH-10016
verify ciphersuite in CH2 matches HRR
2026-03-24 09:31:45 -07:00
David Garske bddeac1d72 Merge pull request #9952 from julek-wolfssl/zd/21324
wolfSSL_X509_verify_cert: add host check from `ctx->param`
2026-03-24 09:26:12 -07:00
David Garske 051b83b517 Merge pull request #9999 from sebastian-carpenter/hpke-fix
Fix: Improved support for combinations of HPKE algos
2026-03-24 08:47:01 -07:00
Daniel Pouzzner 812161cec2 Revert "Re-enable hostap tests and remove some flaky tests"
This reverts commit 4498e12805.

see #9841 and #10052.
2026-03-23 17:22:35 -05:00
David Garske 54d6555194 Merge pull request #9841 from julek-wolfssl/hostap-ec-generate.sh
Re-enable hostap tests and remove some flaky tests
2026-03-23 11:48:32 -07:00
David Garske 02bd0753b1 Merge pull request #10006 from julek-wolfssl/zd/21329
DTLS 1.3 write dup support
2026-03-23 09:55:24 -07:00
David Garske 6bd1785925 Merge pull request #10004 from julek-wolfssl/zd/21318
Add custom BIO callback dispatching
2026-03-23 09:54:30 -07:00
Juliusz Sosinowicz 99ae809e08 Improve ctx->param handling
- wolfSSL_X509_verify_cert: add host check from `ctx->param`
- wolfSSL_X509_verify_cert: Set `ctx->error_depth` on error
- Use WOLFSSL_-prefixed error constants (always available) instead of
  OPENSSL_COEXIST-guarded macros, fixing error code mismatch in
  coexist builds
- Set ctx->current_cert = orig on hostname/IP mismatch so error
  reporting aligns with error_depth = 0 (leaf cert)
- Add IP address verification test cases (match + mismatch)
2026-03-23 16:55:07 +01:00
Juliusz Sosinowicz 4498e12805 Re-enable hostap tests and remove some flaky tests
Set suites->setSuites to 1 in ParseCipherList function
2026-03-23 15:28:04 +01:00
Eric Blankenhorn b553e7485f Fix IAR warning about volatile access 2026-03-23 08:20:04 -05:00
Juliusz Sosinowicz 1f9b999553 Consistently fail on mutex error 2026-03-23 12:21:40 +01:00
Juliusz Sosinowicz 9dbd35dc7c DTLS 1.3 write dup support
- Copy TLS 1.3 traffic secrets and DTLS 1.3 epoch/cipher state to the
  write-dup side in DupSSL so key updates can be performed.
- Delegate KeyUpdate responses from the read side to the write side via
  the shared WriteDup struct, for both peer-initiated and local key
  updates.
- Delegate DTLS 1.3 ACK sending from the read side to the write side.
- Track DTLS 1.3 KeyUpdate ACKs: write side records the in-flight
  KeyUpdate epoch/seq, read side sets keyUpdateAcked when the matching
  ACK arrives.
- Delegate post-handshake certificate authentication (CertificateRequest
  processing) from the read side to the write side, transferring
  transcript hashes, cert context, and signature parameters.
- Reset prevSent/plainSz to prevent stale values from SendData to think
  that data was already sent.
- Refactor FreeHandshakeHashes into Free_HS_Hashes for reuse.
- Move DTLS 1.3 epoch initialization earlier in InitSSL so the
  write-dup early-return path has valid epoch state.
- Add tests for write dup with all protocol versions, key update,
  post-handshake auth, and WANT_WRITE recovery.
- Add --enable-all --enable-writedup to CI os-check matrix.
2026-03-23 12:21:40 +01:00
Daniel Pouzzner 678660e26d src/keys.c and src/tls13.c: add WC_NO_ERR_TRACE() annotations for various initializations.
wolfssl/ssl.h, examples/client/client.c, examples/server/server.c, src/bio.c, tests/api.c: add error tracing for WOLFSSL_SHUTDOWN_NOT_DONE.

tests/api.c: in test_wolfSSL_read_write_ex(), use WOLFSSL_SUCCESS rather than 1 for expected-success wolfSSL_shutdown()s, and add note that the wrong value is being returned (the test currently always fails, which is masked by an always-success retval).
2026-03-22 13:17:47 -05:00
sebastian-carpenter 406f5033c6 verify ciphersuite in CH2 matches HRR 2026-03-20 16:07:27 -06:00
sebastian-carpenter 25dcc0082d small changes:
- better ifdef's in hpke api.c tests
- updated ssl_ech.c to use wc_HpkeKemGetEncLen in both locations
- removed Ndh check in hpke.c, made it inline with the ecc cases
2026-03-20 14:39:29 -06:00
Daniel Pouzzner 15dcd1e3bd src/ssl.c: fixes for -Wsign-compares in wolfSSL_ERR_GET_REASON(). 2026-03-20 14:53:05 -05:00
David Garske 9877bec7b7 Merge pull request #9997 from JacobBarthelmeh/qt
add back WOLFSSL_QT macro guard for get cipher name behavior
2026-03-20 09:46:40 -07:00
Juliusz Sosinowicz 431ee9e2d8 Implement wolfSSL_BIO_set_init 2026-03-20 17:03:35 +01:00
David Garske d49df869d9 Merge pull request #9935 from padelsbach/padelsbach/san-ip-addr-test
Add IP SAN matching
2026-03-20 08:15:00 -07:00
David Garske 2c030ddb0d Merge pull request #10017 from embhorn/zd21388
Fix ssl_DecodePacketInternal chain processing
2026-03-20 08:07:54 -07:00
Juliusz Sosinowicz 84da6d22c8 Address code review 2026-03-20 15:42:50 +01:00
JacobBarthelmeh 5b9d0a13bf Merge pull request #9992 from dgarske/macro_docs
Add inline documentation for missing macros and fix spelling errors
2026-03-19 17:08:33 -06:00
Paul Adelsbach 041bb185c6 Add IP SAN matching 2026-03-19 15:10:21 -07:00
Eric Blankenhorn a66e29473e Fix ssl_DecodePacketInternal chain processing 2026-03-19 14:56:24 -05:00
David Garske 255f14bab9 Merge pull request #9732 from Frauschi/pqc_first
Enable and use ML-KEM by default
2026-03-19 12:38:36 -07:00
David Garske 679366a5a4 Merge pull request #9991 from kareem-wolfssl/zd21354_2
Disallow wildcard partial domains when using MatchDomainName.
2026-03-19 12:35:14 -07:00
David Garske 3e8338dbc7 Merge pull request #9993 from kojo1/brainpool
Brainpool to set1_sigalgs_list
2026-03-19 12:34:54 -07:00
David Garske 42581e4c05 Merge pull request #9982 from julek-wolfssl/DoTls13CertificateRequest-certsetup
DoTls13CertificateRequest: call CertSetupCbWrapper only once
2026-03-19 12:32:39 -07:00
David Garske 533e9b0859 Merge pull request #9995 from julek-wolfssl/zd/21341
Handle OCSP_WANT_READ returned from DoTls13HandShakeMsgType
2026-03-19 12:27:38 -07:00
sebastian-carpenter fcedc91d38 touch-ups:
- shrink ech interop workflow
- x448 macro now unused in hpke WOLFSSL_LOCAL functions
- bug fixes in added tests
2026-03-18 15:47:52 -06:00
Juliusz Sosinowicz 056ed9e52e Add custom BIO callback dispatching
- Route BIO_ctrl_pending, BIO_reset, and BIO_get_mem_data through the custom method's ctrlCb when set, enabling fully custom BIO types to handle these operations.
- Add test_wolfSSL_BIO_custom_method that exercises a custom BIO with all callbacks (create, destroy, read, write, puts, gets, ctrl) and verifies each callback is invoked via bitfield tracking.
2026-03-18 18:29:27 +01:00
Tobias Frauenschläger c3289f8aa9 Enable and use ML-KEM by default
* Enable ML-KEM by default in build systems (autoconf and CMake)
* Only allow three to-be-standardized hybrid PQ/T combinations by
  default
* Use X25519MLKEM768 as the default KeyShare in the ClientHello (if user
  does not override that). When Curve25519 is disabled, then either
  WOLFSSL_SECP384R1MLKEM1024 or WOLFSSL_SECP256R1MLKEM768 is used as
  default depending on the ECC configuration
* Disable standalone ML-KEM in supported groups by default (enable with
  --enable-tls-mlkem-standalone)
* Disable extra OQS-based hybrid PQ/T curves by default and gate
  behind --enable-experimental (enable with --enable-extra-pqc-hybrids)
* Reorder the SupportedGroups extension to reflect the preferences
* Reorder the preferredGroup array to also reflect the same preferences
* Add async support for ML-KEM hybrids
2026-03-18 10:48:16 +01:00
JacobBarthelmeh c952b694f7 add back WOLFSSL_QT macro guard for order of cipher suites 2026-03-17 17:46:13 -06:00
sebastian-carpenter 36580b0ae8 move hpke-esque code out of tls 2026-03-17 14:43:06 -06:00