Commit Graph

1899 Commits (master)

Author SHA1 Message Date
Emma Stensland 73d813efe4 F-2895 F-2897 F-2898 F-2899 F-3898: fix cipher suite string colons, nanosecond overflow arithmetic, and shutdown() call in lwIP 2026-07-10 16:56:42 -06:00
Emma Stensland ac4b7b574e F-1698 F-1699 F-2094 F-2097 F-3222 F-3465 F-3900 F-4130 F-4599 F-5611 F-6285: fix logic and conditional bugs 2026-07-10 16:56:42 -06:00
Paul Adelsbach a627f04342
Merge pull request #578 from SparkiDev/pqc_proxy_examples
PQC proxy
2026-07-10 16:06:09 -06:00
Paul Adelsbach 0d71d9887a
Merge pull request #581 from night1rider/fenrir-issue-4598
Return WANT_WRITE on EWOULDBLOCK in my_IOSend
2026-07-10 15:55:15 -06:00
Paul Adelsbach 1ea8602197
Merge pull request #582 from night1rider/fenrir-issue-2894
Give each PSK thread its own heap copy of connfd
2026-07-10 15:50:04 -06:00
Zackery bf7fb899af
Merge pull request #575 from dgarske/amebapro2-huk-example
Add RealTek AmebaPro2 (RTL8735B) HUK wolfCrypt example
2026-07-10 14:13:48 -06:00
David Garske aebd9198c4
Merge pull request #587 from night1rider/fenrir-issue-1301
Propagate failure from EVP decrypt_file error paths
2026-07-06 17:23:20 -07:00
David Garske 4a5b5c9f4d
Merge pull request #588 from night1rider/fenrir-issue-1294
Fix operator precedence in wolfSSL_connect return check
2026-07-06 17:23:00 -07:00
David Garske 2eec706d69
Merge pull request #586 from night1rider/fenrir-issue-1696
Fix NULL check after wolfSSL_new to test the returned ssl object
2026-07-06 17:22:51 -07:00
David Garske d9aa3545aa
Merge pull request #579 from stenslae/f-1289-1718-1707-fixes
F-1289 F-1718 F-1707 F-1705 oob write and null pointer fixes
2026-07-06 11:26:12 -07:00
David Garske c43acf442a rtl8735b: GCM-wrap the HUK ECDSA scalar (authenticated unwrap)
Provision the wrapped scalar with AES-GCM (iv + tag) instead of ECB, so a
tampered/corrupted/wrong-device blob fails at unwrap (AES_GCM_AUTH_E) rather than
yielding a garbage scalar. Matches the wc_Rtl8735b_EccKey iv/tag fields.
2026-07-02 16:43:55 -07:00
David Garske 2bf2c06056 rtl8735b: enable WOLF_CRYPTO_CB_COPY/FREE for HUK HMAC
The HUK HMAC accumulation buffer now lives on the inner SHA-256 devCtx and relies
on the cryptocb copy/free ops so wc_HmacCopy/wc_HmacFree manage it correctly.
2026-07-02 16:34:16 -07:00
David Garske 36af63f1dd Add RealTek AmebaPro2 (RTL8735B) HUK-in-TLS example
In-memory TLS 1.2 ECDHE-ECDSA handshake with the server certificate ECDSA P-256
signature produced on the HUK HW engine via a PK sign callback. The rest of TLS
(PRF/HMAC, record AES-GCM, ECDHE) stays in software: a whole-CTX WC_HUK_DEVID
would route TLS's own 32-byte HMAC keys (e.g. the P-256 ECDHE pre-master in the
PRF) to the HUK, whose key==seed semantics break key derivation. Validated on
RTL8735B silicon.
2026-07-02 16:18:01 -07:00
Sameeh Jubran 811b31a363 cra-kit: address Atwood re-review blockers on #574
- Replace fabricated library-binary SHA-256/SHA-1 with all-zeros sentinels
  in the pinned wolfssl-component samples (cdx/spdx + commercial variants);
  a non-reproducible binary hash must not ship in a copyable sample.
- Recompute product bom-link checksums (CycloneDX bom hash + SPDX
  externalDocumentRef) to match the edited component SBOMs.
- Give the SPDX tag-value document a distinct documentNamespace so it no
  longer collides with the JSON serialization (SPDX 2.3 sec 3.5).
- Add licenses (GPL-3.0-only) to the wolfssl component in the product CDX
  (NTIA minimum elements).
- Align conformity-assessment-route.md wording to Annex III "important" /
  Annex IV "critical", dropping the "class II" label.
- Document the sentinel digest in SAMPLE-PROVENANCE.md.

validate.sh passes (cross-document checksums + pyspdxtools schema).

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-07-02 17:50:01 +03:00
night1rider 2765b5a7d2 Return WANT_WRITE on EWOULDBLOCK in my_IOSend
wolfSSL's own send callback returns WANT_WRITE when a send would block; this one returned WANT_READ. It currently works because both are -2, but the send path should use WANT_WRITE.
2026-06-30 11:18:03 -06:00
night1rider 5b00968010 Give each PSK thread its own heap copy of connfd
Pass a per-connection malloc'd descriptor instead of the address of the reused stack variable connfd, which the next accept() could overwrite before the thread dereferences it; the thread frees it after copying.
2026-06-30 10:02:24 -06:00
night1rider f86be21227 Propagate failure from EVP decrypt_file error paths
Set a non-success ret before each error goto so the function no longer returns WOLFSSL_SUCCESS on failure, using AES_GCM_AUTH_E when EVP_DecryptFinal_ex rejects a tampered GCM tag, and correct the mislabeled perror strings.
2026-06-30 10:01:32 -06:00
night1rider 16b3986226 Fix NULL check after wolfSSL_new to test the returned ssl object
Check cli_ssl and srv_ssl instead of the unchanged cli_ctx/srv_ctx so a failed wolfSSL_new is detected rather than dereferenced.
2026-06-30 09:59:11 -06:00
night1rider 25e0ec5dd5 Fix operator precedence in wolfSSL_connect return check
Parenthesize the assignment so ret receives the actual return value rather than the boolean result of the != comparison.
2026-06-30 09:58:41 -06:00
Emma Stensland 2318302ba6 F-1289 F-1718 F-1707 oob write and null pointer fixes 2026-06-25 15:58:01 -06:00
David Garske 9bdd578564 Add RealTek AmebaPro2 (RTL8735B) HUK wolfCrypt example (AES, HMAC-SHA256, ECDSA) 2026-06-25 10:23:54 -07:00
Sean Parkinson 6ba3b3b7ef PQC proxy
Proxies that sit in front of a client and server that don't support PQC crypto algorithms.
2026-06-25 20:48:22 +10:00
Sameeh Jubran 924c3d228b cra-kit: fix commercial-license SBOM generation and refresh samples
Plumb CRA_LICENSE_TEXT through generate-wolfssl-sbom.sh (gen-sbom/make
sbom hard-fail on a LicenseRef-* override without it); scope the
commercial relicense to the wolfssl package only; correct the stale
pkg:generic PURL claim; validate the embedded output dir; regenerate
pinned samples against gen-sbom 1.1 and re-pin product checksums.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-06-22 13:40:11 +03:00
Juliusz Sosinowicz 54f85adb37
Merge pull request #573 from helkoulak/ascon-examples
Ascon examples
2026-06-18 16:42:40 +02:00
Sameeh Jubran 8cb188f127 cra-kit: address Atwood review (shell safety, validation, samples)
Quote "$@" in gen-sbom --srcs (drop SC2068 disables), pass JSON paths to
python via env var in validate.sh to prevent filename injection, and fail
non-zero instead of warning when SBOM post-processing breaks. Rename the
user_settings.h guard to CRA_KIT_USER_SETTINGS_H, clarify the serialNumber
regex accepts v4 (product) and v5 (component) UUIDs, untrack the gitignored
embedded sample SBOMs, document the SHA-512 CBOM omission, and note sample
timestamp differences in SAMPLE-PROVENANCE.md.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-06-17 17:27:15 +03:00
Hosam Elkoulak cdcebdc1e2 move var declarations to the beginning of the block 2026-06-17 13:45:28 +02:00
Hosam Elkoulak 7744b613d7 Move declarations to the beginning of the block 2026-06-16 17:26:27 +02:00
Hosam Elkoulak 7727575e95 Fix logic when to opt out in case of empty password 2026-06-16 17:25:11 +02:00
Hosam Elkoulak c8d9c3b193 Add error checks for fseek and ftell function calls 2026-06-16 17:23:58 +02:00
Hosam Elkoulak 2da7daf2b9 Avoid overflowing the key array by providing a separate array for the password 2026-06-16 17:22:26 +02:00
Sameeh Jubran 04f19f8b2e cra-kit: address Skoll review findings
Fail early when the wolfSSL tree version differs from the kit's pinned
VERSION instead of a cryptic cp error, trap-clean the embedded temp
defines file on all exit paths, add sh -n + shellcheck CI coverage for
the scripts, and use the standard file:./ relative form in the product
SBOM external references.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-06-15 15:21:49 +03:00
Hosam Elkoulak 53855725f2 Zero byte files are now supported by Ascon file encrypt + fix for loop index, it should be defined as long as well for huge files 2026-06-12 17:29:15 +02:00
Hosam Elkoulak 7c26f5dbaf Decrypt in blocks and some fixes 2026-06-08 21:03:45 +02:00
Hosam Elkoulak c5584726bf Some more fixes 2026-06-05 18:50:48 +02:00
Sameeh Jubran c0032194f9 Add CRA Kit for customer SBOM integration
Self-contained cra-kit/ with glossary,
fictional auditor packet, autotools/embedded SBOM scripts, and CI validation.

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-06-04 04:54:45 +03:00
Hosam Elkoulak 04329e4aa1 Use goto instead of while loop 2026-05-30 00:04:14 +02:00
Hosam Elkoulak 6ffa7eac4c Fix input len at cleanup 2026-05-29 23:51:15 +02:00
Hosam Elkoulak c2a0ec1471 More fixes for ascon file encrypt 2026-05-29 23:29:07 +02:00
David Garske 8eb7fa11c8
Merge pull request #568 from night1rider/fips-linux-yocto-pi
Fips linux yocto pi
2026-05-28 09:33:11 -07:00
Hosam Elkoulak e7d781e84b Fixes for ascon-hash256 2026-05-26 01:12:01 +02:00
Hosam Elkoulak d36f572a33 Fixes for ascon-file-encrypt 2026-05-26 00:41:28 +02:00
David Garske 9bc3022097
Merge pull request #572 from padelsbach/minor-fenrir-fixes
Add error checking and cleanup in examples
2026-05-05 10:45:01 -07:00
David Garske 6437dcdb83
Merge pull request #566 from sameehj/http-sign
Add RFC 9421 HTTP Message Signatures example using wolfCrypt Ed25519
2026-05-05 10:40:14 -07:00
David Garske cab3cb7ff6 Fixes from peer review. Thank you Daniele 2026-05-05 10:30:42 +02:00
David Garske 6a036ffe6e Peer review feedback 2026-05-05 10:30:42 +02:00
David Garske 87e913955f Example for wolfCrypt PUF on STM32H5 2026-05-05 10:30:42 +02:00
Hosam Elkoulak 09d5072fdb Fixes for Ascon-Hash256 2026-05-01 09:07:21 +02:00
Hosam Elkoulak ae042f171c Fixes for ascon-file-encrypt 2026-05-01 08:33:16 +02:00
Hosam Elkoulak d000810206 Two examples for Ascon-AEAD128 and Ascon-Hash256
Fix typos

No need to input key size as the size for ascon AEAD algorithm is fixed

Add an example for algorithm Ascon-Hash256
2026-04-27 17:22:49 +02:00
Kaleb Himes bfdda5612e
Merge pull request #571 from lealem47/ecc_verify_minimal
Add a minimal example for ecc verify
2026-04-24 13:59:19 -06:00