32235 Commits
Author SHA1 Message Date
philljj 59308f930a Merge pull request #11259 from gasbytes/pem-parser-new-line
Fix off-by-one in pem_find_pattern rejecting PEM without a trailing newline
2026-08-28 09:19:12 -05:00
philljj 34213711b8 Merge pull request #11138 from sameehj/fix/mem-fail-ecc-x509-ext
Fix nightly-mem-fail-test (jenkins-supervisor #501): ECC/X509 tests and RPK
2026-08-28 08:55:27 -05:00
philljj e68ef1a047 Merge pull request #11294 from dgarske/des3_ecb_keyset
Require a key for 3DES ECB operations
2026-08-27 21:15:52 -05:00
Sean Parkinson 2a4d6151c0 Merge pull request #11251 from kareem-wolfssl/zd22364
Correct verification of cert in ESP example.
2026-08-28 09:19:09 +10:00
Sean Parkinson 4f7e4807c9 Merge pull request #11247 from holtrop-wolfssl/f-11237
Return error code from atmel_get_random_number for unknown targets
2026-08-28 08:54:04 +10:00
philljj 71abab4087 Merge pull request #11229 from aidangarske/fenrir-fixes-10613
Check GrowAnOutputBuffer result in threaded crypt SendData
2026-08-27 13:13:43 -05:00
philljj 4ab251b84d Merge pull request #11284 from embhorn/zd22377
Fix C++ guards in SE050 header
2026-08-27 09:44:30 -05:00
Reda Chouk a71e104bb8 fix off-by-one in pem_find_pattern that rejected PEM data ending at the footers's final dash 2026-08-27 14:28:44 +02:00
JacobBarthelmeh 480e16303a Merge pull request #11252 from night1rider/asu-2026.1
Asu 2026.1
2026-08-26 17:03:46 -06:00
David Garske 918a8b7e47 Require a key for 3DES ECB operations on all backends 2026-08-26 15:46:31 -07:00
philljj 227a840dae Merge pull request #11286 from miyazakh/f10115_ecdsa_nonce
fix overflow in wc_ecc_sign_hash_hw
2026-08-26 15:57:01 -05:00
philljj fc2c631a7e Merge pull request #11274 from SparkiDev/sp_armv3_fix
SP ARMv3 assembly: fix for Montogmery Multiply
2026-08-26 15:36:52 -05:00
philljj 0e498b1d32 Merge pull request #11276 from SparkiDev/chacha20_be_arm_thumb
ChaCha20 ARM32/Thumb2 BE asm: remove start of support
2026-08-26 14:32:00 -05:00
David Garske 5e2ccef835 Merge pull request #11090 from rizlik/global_rng_fixes
benchmark: fix: extends guards for algo that needs them
2026-08-26 15:23:06 -04:00
Kareem 59e24ff7d4 Code review feedback 2026-08-26 12:11:21 -07:00
Kareem ce018ff4d4 Correct verification of cert in ESP example.
Thanks to Arthur Chan for the report.
2026-08-26 12:11:21 -07:00
philljj 464577912a Merge pull request #11285 from danielinux/ocsp-free-fix
Free every OCSP chain request in TLSX_CSR_Free
2026-08-26 13:06:19 -05:00
philljj 996591340b Merge pull request #11195 from holtrop-wolfssl/zd22329
asn.c: check the OCSP responder certificate's signature
2026-08-26 12:50:49 -05:00
philljj 3f9f17e010 Merge pull request #11281 from danielinux/fenrir-stsafe-2026-08-26
[STSAFE] Normalize the digest to field size in ECDSA verify
2026-08-26 11:01:41 -05:00
night1rider e1167e22f7 Xilinx Versal Gen2 ASU: support the Vitis 2026.1 xilasu client API
The 2026.1 release renamed and reshaped parts of the xilasu client API, so a
new asu_compat.h maps the changed names to WC_ASU_ names and the engine files
read the same against either release. Set WOLFSSL_VERSAL_GEN2_ASU_XILASU_2026_1
for a 2026.1 BSP; the port assumes 2025.2 otherwise and stops the build with a
clear message when the macro and the BSP do not match. 2026.1 also offloads
work the older release could not, so this turns on P-521, X25519, X448, RSA
OAEP decrypt, SHAKE output past 64 bytes, and CCM on data that is not a whole
number of blocks, each with a macro to opt back out.
2026-08-26 09:59:19 -06:00
Hideki Miyazaki 185bda6443 fix overflow in wc_ecc_sign_hash_hw 2026-08-26 09:22:39 -04:00
Daniele Lacamera c29a49922d Free every OCSP chain request, not just the first csr->requests
ProcessChainOCSPRequest() stores each request at the certificate's position
in the chain, counting from 1 for the first intermediate, while csr->requests
is a count of successful calls. TLSX_CSR_Free() bounded the free by that
count, so any entry written at an index at or above it was never released:
valgrind reports the serial and URL buffers InitOcspRequest() allocated as
definitely lost.

Walk the whole array instead. FreeOcspRequest() is a no-op on a request that
was never populated, and the array is sized MAX_CERT_EXTENSIONS.
2026-08-26 14:30:50 +02:00
Eric Blankenhorn bc2350b57b Fix C++ guards in SE050 header 2026-08-26 07:28:34 -05:00
Daniele Lacamera 5f25d46345 CI: pin STSAFE-A120 simulators ref to the merged F-11238 test
wolfSSL/simulators#17 (P-256 + 28-byte-digest verify case in
wolfcrypt-test) merged to main as c827ac7. Pin the workflow to that
merge commit so the STSAFE job exercises the regression test against
the digest normalization fixed on this branch.
2026-08-26 10:49:03 +02:00
Sean Parkinson 123674c013 ChaCha20 ARM32/Thumb2 BE asm: remove start of support
Support for big-endian was never done for ARM32/Thumb2.
Removing fragements that are incomplete
2026-08-26 18:05:00 +10:00
Sean Parkinson 751c0a4a98 SP ARMv3 assembly: fix for Montogmery Multiply
Code never worked and crashed.
Fixed and passes tests now.
2026-08-26 18:04:13 +10:00
Daniele Lacamera 5c6f5a5a9f F-11238: validate arguments before use in the A100 verify path
The A100/A110 stsafe_verify wrote *pResult before validating any of
its arguments, unlike the A120 variant which rejects NULL inputs.
Move the argument validation (pointers plus hashSz) ahead of the
*pResult write and the buffer allocation, so a NULL argument returns
BAD_FUNC_ARG instead of dereferencing, and the early return happens
before the SMALL_STACK buffers are allocated.

Addresses the PR review note on *pResult before validation.
2026-08-26 09:26:24 +02:00
Daniele Lacamera 2b1d12f871 F-11238: clamp hashSz to key_sz before the int conversion
hashSz is a caller-supplied word32 (the public wc_ecc_verify_hash API
passes its length straight through to the crypto-cb). Converting it to
int before clamping lets values above INT_MAX wrap negative, and the
normalized-copy pointer arithmetic then writes out of bounds of the
field-size digest buffer. Clamp in the word32 domain first; the int
conversion then only happens for values bounded by key_sz.

Both variants (A120, A100/A110) carry the same fix. Both call sites
already reject key_sz <= 0, so no key_sz check is added here.

Addresses the PR review note on the copy_sz cast.
2026-08-26 09:26:08 +02:00
Daniele Lacamera 1740c3bcb1 CI: bump STSAFE-A120 simulators ref for the F-11238 regression test
The pinned wolfSSL/simulators ref gains the P-256 + 28-byte-digest
verify case in wolfcrypt-test, which exercises the digest
normalization fixed in the previous commit. The simulators branch
carrying 9f9900295 (PR wolfSSL/simulators#17) must be pushed/merged before this ref is reachable.
2026-08-26 09:19:27 +02:00
Daniele Lacamera 68888746b7 F-11238: normalize the digest to field size in STSAFE ECDSA verify
stsafe_verify copied key_sz bytes from the caller's digest buffer and
told the SE the digest was key_sz bytes long. For a digest shorter than
the field size (P-256 with a 28-byte SHA-224 hash, P-384 with SHA-256)
that reads past the end of the buffer and submits a wrong digest, so a
valid signature fails to verify.

The A120 expects a field-size prehash on the wire, so the digest is
normalized host-side before submission: truncate if longer, left-pad if
shorter - the same convention the sign path already applies. The SE
still receives key_sz bytes, so the wire contract is unchanged; only
the buffer contents for short digests are corrected.

Both variants (A120 STSELib, A100/A110 legacy SDK) and both call sites
(crypto-cb, TLS verify-peer callback) now use the real digest length.

Verification:
- Built: host x86_64, --enable-stsafe=a120, STSELib v1.1.7 + Rust
  A120 simulator.
- Tested: wolfCrypt STSAFE-A120 sim test (wolfSSL/simulators
  wolfcrypt-test): new P-256 + 28-byte-digest verify case fails on the
  pre-fix build (valid signature rejected) and passes post-fix; rng,
  on-device keygen, sign and 32-byte verify round-trip unchanged.
- A100/A110 variant not runnable here (closed SDK, no silicon); change
  mirrors the A120 logic on the existing buffer and keeps Length=key_sz.
2026-08-26 09:06:54 +02:00
David Garske 63b02a1586 CI: assert test-lib exit status in the wolfBoot host-smoke job 2026-08-26 07:55:01 +02:00
philljj b83f5d60f3 Merge pull request #11216 from dgarske/rng_seed_device
random: add WC_RNG_SEED_DEVICE to seed from a nominated device
2026-08-25 14:20:57 -05:00
philljj 7afd4a2c68 Merge pull request #11236 from JacobBarthelmeh/netscape
Restrict duplicate netscape certificate type extensions f-10626
2026-08-25 14:12:11 -05:00
philljj a417ee3a4c Merge pull request #11038 from gasbytes/dupcrl_entry-copies-fix
Deep copy revoked cert entry extensions in DupCRL_Entry()
2026-08-25 13:36:51 -05:00
David Garske fcb31dea21 random: add WC_RNG_SEED_DEVICE to seed from a nominated device 2026-08-25 08:19:24 -07:00
philljj 514af438d7 Merge pull request #11156 from gasbytes/x509_store_ctx_verify_cb_fix
Report X509_VERIFY_PARAM hostname/IP mismatches to the verify callback so applications can inspect or override them
2026-08-25 09:38:08 -05:00
Reda Chouk 53647f9dcd Deep copy revoked cert entry extensions in DupCRL_Entry() when CRL_STATIC_REVOKED_LIST and OPENSSL_EXTRA are enabled, and add a regression test for the X509_CRL_dup path. 2026-08-25 16:04:26 +02:00
philljj 33824d8053 Merge pull request #11006 from rlm2002/coverity
20260729 Coverity fixes
2026-08-25 08:46:03 -05:00
Marco Oliverio 98176d9380 benchmark: extends guards 2026-08-25 11:45:47 +02:00
Sean Parkinson 94dca6fdd4 Merge pull request #11228 from aidangarske/fenrir-fixes-9961
Encode default cert validity as UTCTime through 2049
2026-08-25 17:16:56 +10:00
Sean Parkinson feca5c4247 Merge pull request #11249 from night1rider/Expand-AES-Benchmark
Expand aes benchmark and fix leak in benchmark
2026-08-25 16:19:57 +10:00
Sean Parkinson 6c36c71c5f Merge pull request #11237 from holtrop-wolfssl/f-7106
wolfssl_local_MatchBaseName: fix 1-byte read out of bounds looking for "@"
2026-08-25 16:09:06 +10:00
Sean Parkinson df727d6b90 Merge pull request #11233 from dgarske/ecc_blind_k_fixes
Fix private scalar handling under ECC key blinding and add CI coverage
2026-08-25 16:07:06 +10:00
Sean Parkinson e15720e4e3 Merge pull request #11185 from embhorn/zd22296
Enforce RFC 8446 SHA-1 certificate rule on TLS 1.3 chains
2026-08-25 11:07:37 +10:00
Sean Parkinson 2cda28008c Merge pull request #10992 from padelsbach/sm2-verify-overlap-test
Add SM2 verify hash test with identical points
2026-08-25 10:08:28 +10:00
JacobBarthelmeh 678a065f10 Merge pull request #11248 from night1rider/ASU-ECIES-Improvements
Asu ecies improvements
2026-08-24 16:42:06 -06:00
night1rider d851d60427 Free the Aes on every AES-OFB benchmark error path 2026-08-24 15:48:30 -06:00
night1rider 2d81662d6c Route the AES-CFB and AES-OFB benchmarks through the crypto callback devId 2026-08-24 15:46:32 -06:00
philljj f8b140f511 Merge pull request #11204 from padelsbach/falcon-cb-free
Add CB_FREE mode for Falcon
2026-08-24 16:30:18 -05:00
philljj d3c63a06f6 Merge pull request #11224 from anhu/fake_alloc
Macro guard to prevent dead code.
2026-08-24 15:15:40 -05:00