1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Commit Graph

31726 Commits

Author SHA1 Message Date
Juliusz Sosinowicz
3a0da7013e Fix CI: expand the openssl.test timeout prefix under IFS=:
openssl.test sets IFS=: around its cipher suite loops, so an unquoted
$TIMEOUT_KILL_2M inside them did not split back into separate words and
the shell looked for a command literally named "timeout -s KILL 2m".
Every wolfSSL client run in do_wolfssl_client() then died with "command
not found", which the script reported as a failing cipher suite.

Use an array, whose expansion does not depend on IFS, and keep a
flattened copy for the two eval call sites, where the shell re-parses the
string and IFS does not apply.
2026-08-14 13:50:06 +00:00
Juliusz Sosinowicz
1fa1228ba1 Address review: make the hang guards actually fire
Three ways the bounds added here failed to do their job:

- get_first_free_port ended the scan cap with 'exit 1', but every caller
  runs it in a command substitution, so only the subshell died. The port
  variable came back empty, the next $((port + 1)) evaluated to 1, and the
  run limped on to a confusing wait_for_readyFile failure. Forcing the cap
  on ocsp-stapling.test: before, the script ran on and hung until an outer
  timeout killed it; now it exits 1 at the error. Return instead, and check
  the status at all 25 call sites across the six scripts.

- The macOS timeout shim was a shell function. Backgrounding a function
  forks a subshell, so $! was the subshell and cleanup killed that while
  the server it was meant to stop leaked. Use a prefix variable that
  expands to nothing when timeout(1) is absent, keeping $! the real pid.

- timeout -s KILL exits 137, not 124. Sites that read $? and treat any
  non-zero as 'feature not compiled in' turned a hang into exit 0, so the
  bound made a hang less visible than before. Add timed_out() and check it
  before those skip branches; use it for the version probes too, which
  matched any status >= 124.
2026-08-13 15:52:17 +00:00
Juliusz Sosinowicz
44b1341119 Detect timeout separately in version-probe pipes
The 'Bad SSL version' probes branch on grep's status, so a client
killed by the 2m timeout read as 'TLS v1.2 supported' and ran the
wrong branch. Take both statuses from PIPESTATUS and fail loudly on
a probe timeout.
2026-08-13 15:52:17 +00:00
Juliusz Sosinowicz
d46d95ffe0 Address review feedback
- tls13.test: take the client's exit status from PIPESTATUS[0]; $? after
  the pipe was tee's status, hiding a client failure or 2m-timeout kill.
- ocsp-responder-openssl-interop.test: only escalate to SIGKILL if the
  responder is still running, and make the reap counter local.
2026-08-13 15:52:17 +00:00
Juliusz Sosinowicz
fb3c892931 Bound remaining hangable operations in test scripts
A test script that blocks forever burns the CI job's full
timeout-minutes with no logs. e82ecdff93 and 5c5cbd3094 bounded the
waited-on servers; this covers the remaining hang classes in
scripts/*.test:

- Wrap foreground example client/server, openssl s_client, and
  openssl ocsp invocations in "timeout -s KILL 2m". A client wedged
  before or without a live peer (e.g. blocked in first-seed entropy
  gathering, or DTLS with no reset from a dead peer) is not bounded
  by its peer's timeout.
- Add the macOS timeout() fallback shim to scripts that now use
  timeout.
- Bound the get_first_free_port scan loops (nc -w 1, 100-port cap).
- Add -w 1 to the remaining nc probes and dtls.test UDP pcap markers.
- ocsp-responder-openssl-interop.test: bound the responder reap in
  cleanup: give each responder 5 s to exit after SIGTERM, then
  SIGKILL before waiting, so a wedged responder cannot hang the EXIT
  trap.
- benchmark.test: bound the clients but leave the -i servers
  unwrapped: the script ends them with kill -6, which timeout(1)
  does not forward, so wrapping would orphan the server.
- trusted_peer/tls13: kill the server with SIGTERM instead of
  SIGKILL in cleanup so the signal forwards through the timeout
  wrapper to the wrapped server.
2026-08-13 15:52:17 +00:00
philljj
142a7799f3 Merge pull request #11150 from yosuke-wolfssl/fix/f_7073
ascon: re-initialize the context in Final so it can be reused
2026-08-12 21:40:38 -05:00
JacobBarthelmeh
6a7e7be7ad Merge pull request #11004 from rizlik/ecb_fixes
aes: do not ignore ECB return value when used in other modes
2026-08-12 16:45:47 -06:00
JacobBarthelmeh
b4ee0bcecb Merge pull request #11021 from kareem-wolfssl/zd22223
Remove carry over of old buffers/sizes in X509 ext function.
2026-08-12 16:38:35 -06:00
JacobBarthelmeh
0bcda7efa2 Merge pull request #10755 from kareem-wolfssl/zd22010
Reject certificates with trailing data.  Avoid copying trailing data to WOLFSSL_X509 structs.
2026-08-12 15:03:24 -06:00
philljj
cccf984700 Merge pull request #11152 from yosuke-wolfssl/fix/f_7074
Require a trusted TSA certificate in wc_TspResponse_Verify
2026-08-12 14:18:48 -05:00
Sameeh Jubran
65559843b5 Merge pull request #11050 from MarkAtwood/fix/test-dh-group-loop-underflow
fix(tests): avoid unsigned underflow in DH group loop
2026-08-12 15:15:44 +03:00
Yosuke Shimizu
4a5809bc3e Require a trusted TSA certificate in wc_TspResponse_Verify 2026-08-12 15:34:47 +09:00
Yosuke Shimizu
e7ec0f8df3 ascon: re-initialize the context in Final so it can be reused 2026-08-12 14:54:29 +09:00
JacobBarthelmeh
14a8ed2dbb Merge pull request #11141 from philljj/ecc_mutex_ret
ecc: check return of wc_InitMutex ecc_oid_cache_lock.
2026-08-11 17:01:06 -06:00
JacobBarthelmeh
a453077818 Merge pull request #11017 from miyazakh/f7302_pkcs7_verify
Fix truncation and noDegenerate bypasses in wc_PKCS7_VerifySignedData
2026-08-11 16:54:17 -06:00
JacobBarthelmeh
5451b2e787 Merge pull request #11124 from dgarske/cross_library_deepen_race
cross-library: recover the break-check scan base when the PR merge ref moves
2026-08-11 13:50:56 -06:00
David Garske
0a47c62ed8 Merge pull request #10718 from night1rider/AES-Key-wrap_with_padding
Aes key wrap with padding
2026-08-11 10:20:54 -07:00
David Garske
1be3c25f5c Merge pull request #11009 from kareem-wolfssl/zd22229
Fix multiple reported issues.
2026-08-11 10:19:21 -07:00
David Garske
e0feaa36e9 Merge pull request #10940 from SparkiDev/chacha20_poly1305_avx512
ChaCha20/Poly1305 ASM: AVX512 and improvements to other Intel x64
2026-08-11 10:18:18 -07:00
JacobBarthelmeh
8a31663c54 Merge pull request #10592 from MarkAtwood/fix/ecc-double-free-invalid-format-byte
ecc: fix double-free in wc_ecc_import_point_der_ex on invalid format byte
2026-08-11 10:55:59 -06:00
JacobBarthelmeh
8f4fcf5dad Merge pull request #10720 from MarkAtwood/fix/license-metadata-gplv3
fix: update license identifiers and copyright years to GPL-3.0+
2026-08-11 10:55:30 -06:00
jordan
8fc16f75e7 ecc: check return of wc_InitMutex ecc_oid_cache_lock. 2026-08-11 11:48:23 -05:00
JacobBarthelmeh
fcf11af7a0 Merge pull request #11000 from kareem-wolfssl/zd22213
Fix multiple issues with WOLFSSL_CHECK_SIG_FAULTS + HAVE_PK_CALLBACKS.
2026-08-11 10:36:50 -06:00
philljj
d565da071b Merge pull request #11111 from cconlon/eccOidLockInit
Fix ECC OID cache lock being re-initialized
2026-08-11 11:27:41 -05:00
JacobBarthelmeh
72802102c9 Merge pull request #10256 from MarkAtwood/fix/rsa-pss-unpad-bits-zero
fix: guard RsaUnPad_PSS masking when bits==0
2026-08-11 09:49:51 -06:00
JacobBarthelmeh
b065653b96 Merge pull request #10736 from philljj/bsdkm_rdseed
bsdkm: fix bsdkm build with rdseed.
2026-08-11 09:03:18 -06:00
JacobBarthelmeh
66d182b362 Merge pull request #11123 from dgarske/toradex_nxp_imx95
arm64: runtime-dispatch ML-KEM SHA-3 crypto extension to fix SIGILL
2026-08-11 08:54:59 -06:00
Sean Parkinson
3717560a01 ChaCha20/Poly1305 ASM: AVX512 and improvements to other Intel x64
Add AVX512 implementations of ChaCha20 and Poly1305.
Add fused asm implementations of ChaCha20-Poly1305.
Wire the fused APIs into new API.
Use new API in TLS 1.2 and TLS 1.3.
2026-08-11 18:05:58 +10:00
Kareem
5fb8a29bd0 Code review feedback 2026-08-10 16:55:00 -07:00
Kareem
8009964ae8 Code review feedback 2026-08-10 16:55:00 -07:00
Kareem
03a81d8181 Code review feedback 2026-08-10 16:55:00 -07:00
Kareem
c25168179b Remove WOLFSSL_CERT_REJECT_TRAILING. Reject certs with trailing data by default, allow opt-out via WOLFSSL_NO_ASN_STRICT. 2026-08-10 16:55:00 -07:00
Kareem
13f9194e61 Gate new cert trailing rejection logic behind an opt-in macro to avoid breaking existing use cases. 2026-08-10 16:55:00 -07:00
Kareem
7193765f84 Reject certificates with trailing data, except for trusted certificates.
In addition, only copy the certificate itself to WOLFSSL_X509, omitting trailing bytes.

Thanks to Lucca Hirschi (Inria, France) and the tlspuffin team for the report.
2026-08-10 16:55:00 -07:00
Kareem
04625b2f24 Fix DER buffer size in test_wc_CheckCertSigPubKey. 2026-08-10 16:55:00 -07:00
Kareem
2cad68a931 Fix test failure for WOLFSSL_OLD_OID_SUM 2026-08-10 16:46:36 -07:00
Kareem
754b220617 Remove carry over of old buffer in wolfSSL_X509_set_ext.
Thanks to Kushal Khemka & Mayank Jangid (OpenSec Intelligence) for the report.
2026-08-10 16:46:36 -07:00
Daniel Pouzzner
067c10d71e Merge pull request #10819 from lealem47/input_validation
Crypto layer: Add missing input validation
2026-08-10 18:29:11 -05:00
David Garske
a8cb129088 arm64: runtime-dispatch ML-KEM SHA-3 crypto extension to fix SIGILL 2026-08-10 16:11:22 -07:00
David Garske
1e0fa211d0 Merge pull request #10886 from night1rider/cryptocb-hooks-rsapss-ed448-cmac
Cryptocb hooks rsapss ed448 cmac
2026-08-10 15:49:05 -07:00
night1rider
5c6112c634 Pass -m32 at make time too for the NO_64BIT key wrap build 2026-08-10 16:32:27 -06:00
night1rider
26a8ae690a Add a 32-bit NO_64BIT key wrap build to the os-check matrix 2026-08-10 15:10:46 -06:00
night1rider
c0c6398f86 Drop the extra braces and line up the comments in the key wrap IV check 2026-08-10 15:10:46 -06:00
night1rider
102111e2c7 Give the key wrap tests unused device IDs and fix the comment 2026-08-10 15:10:46 -06:00
night1rider
68aa9cc8d2 Reject a key wrap length the device reports beyond the output buffer 2026-08-10 15:10:46 -06:00
night1rider
1c79abc53a Do not free an Aes that wc_AesInit never initialized 2026-08-10 15:10:46 -06:00
night1rider
2fcc341072 Add AES key wrap with padding (RFC 5649) and crypto callback support
Adds wc_AesKeyWrap_Pad/wc_AesKeyUnWrap_Pad and their _ex variants plus crypto
callback dispatch, routing blocks through wc_AesEcb* so an ECB only callback works.
2026-08-10 15:10:46 -06:00
jordan
263cc7d6c8 bsdkm: fix rdseed build. 2026-08-10 15:45:34 -05:00
David Garske
0aa7c7c94d cross-library: recover the break-check scan base when the PR merge ref moves 2026-08-10 13:05:00 -07:00
night1rider
73298a7f63 Share one helper between the RSA-PSS verify crypto callback paths 2026-08-10 14:02:21 -06:00