Commit Graph

1759 Commits (811b31a3632cb97567f85107594baa8cab86f4c9)

Author SHA1 Message Date
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
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
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
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
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
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
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
Lealem Amedie 7271cc07e8 Add a minimal example for ecc verify 2026-04-24 12:31:14 -06:00
Paul Adelsbach 6d316999ff Misc fenrir fixes 2026-04-24 11:24:06 -07:00
Sameeh Jubran 09966434e4 http-message-signatures: address Skoll review feedback
- http_client_signed: check build_http_request() return before
  send() and cast to size_t; free key on import_private_only
  failure.
- http_server_verify: consolidate main() error paths around a
  single "cleanup:" label so pubKey and listenFd are released
  uniformly (import_public, socket, bind, listen).
- test_vectors: guard ed25519_free with per-key init flags so
  the shared cleanup path never frees an uninitialized struct.
- wc_http_sig.h: document that WC_SF_MAX_STRING / WC_SF_MAX_ITEMS
  drive ~12KB stack usage and must be tuned for embedded targets.
- wc_sf: reject *outSz > INT_MAX in wc_SfGenSigParams and
  wc_SfGenSigInput to guard word32 -> int casts (matches
  build_signature_base).

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-04-23 12:37:58 +03:00
David Garske 44e31acbc6
Merge pull request #570 from julek-wolfssl/ocsp-responder-examples
Add OCSP responder examples
2026-04-13 09:51:11 -07:00
Juliusz Sosinowicz e9a5c757e0 Address review feedback
- LoadFile now validates fread read the full file size and returns NULL
  on short read.
- ocsp-responder-http checks wolfSSL_Init return value.
- Remove bare scope block around sigaction setup.
2026-04-13 12:41:29 +02:00
Juliusz Sosinowicz b79c987789
Update ocsp/responder/nginx-scgi/run.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-10 14:17:01 +02:00
Juliusz Sosinowicz 04ff1c7ddd Address PR #570 review feedback for OCSP responder examples
- Add SO_RCVTIMEO (5s) on accepted client sockets to prevent indefinite
  blocking from incomplete requests
- Move 64KB httpBuf/respBuf from stack to static globals
- Fix SendAll infinite loop when send() returns 0 (check n <= 0)
- Ignore SIGPIPE to prevent crash on client disconnect during writes
- Use case-insensitive Content-Length header matching per RFC 7230
- Track error state and return nonzero from main on fatal errors
- Reset ret after wolfSSL_CertManagerLoadCABuffer to avoid leaking
  WOLFSSL_SUCCESS (1) into error paths in ocsp-request-response.c
- Add -Wextra to Makefile CFLAGS
2026-04-09 19:06:33 +02:00
Sameeh Jubran 330c9b258b wc_http_sig: remove extra braces around header lookup loop
Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-04-09 13:32:58 +03:00
David Garske 011d7f3146
Merge pull request #569 from night1rider/csr-fix
refactor csr_example to use filled Cert struct workflow
2026-04-08 13:49:09 -07:00
Juliusz Sosinowicz 1f6aa9c259 Address code review feedback for OCSP responder examples
- Add missing <time.h> include for time(NULL) usage
- Replace atoi() with strtol() and validate Content-Length in RecvHttp
  and ParsePost to reject negative/overflowing values
- Add SendAll() helper to handle partial send() writes
- Check return values of socket(), setsockopt(), and listen()
2026-04-08 11:31:35 +02:00
Juliusz Sosinowicz b0ceceb0c8 Add OCSP responder examples
Three examples demonstrating the new OCSP Responder API:

1. ocsp-request-response.c - Pure API usage: encode DER OCSP requests
   from certificates, generate signed responses, and verify them
   in memory without networking.

2. ocsp-responder-http.c - Minimal HTTP server that accepts POST
   requests with DER OCSP payloads and returns signed responses.

3. nginx-scgi/ - Production-style deployment using nginx as HTTP
   frontend with wolfclu running as an SCGI backend for OCSP
   processing.
2026-04-07 14:11:36 +02:00
night1rider 00c263c7db refactor csr_example.c to clarify CSR API and show how to use a filled out Cert struct (req) to fully create a CSR with proper error handling and memory management. 2026-04-02 20:17:59 -06:00
Sameeh Jubran 9a3b8458b3 Add RFC 9421 HTTP Message Signatures example using wolfCrypt Ed25519
Initial implementation of RFC 9421 HTTP Message Signatures as a
wolfssl-examples project. Covers a minimal interoperable subset:
derived components (@method, @authority, @path, @query), arbitrary
HTTP header fields, Ed25519 signing/verification, single signature
(sig1), and timestamp-based replay protection.

Files:
- common/wc_sf.{c,h}: Minimal RFC 8941 structured fields subset
  (dictionary lookup, inner lists, parameters, byte sequences)
- common/wc_http_sig.{c,h}: RFC 9421 Sign/Verify/GetKeyId API
- sign_request.c: Standalone signing example
- http_server_verify.c: Demo HTTP server with signature verification
- http_client_signed.c: Demo HTTP client sending signed requests
- test_vectors.c: 11 tests including RFC 9421 Appendix B.2.6

Design decisions:
- Ed25519-only (alg enforced on verify path)
- sigOut/inputOut are char* (NUL-terminated strings)
- Header names lowercased per RFC 9421 Section 2.1
- Portable case-insensitive comparison (no POSIX strcasecmp)
- SO_RCVTIMEO on server to prevent blocking on slow clients
- Signature base written directly to caller buffer (no double-buffer)

Known limitations:
- 32-bit long: parse_sf_integer caps at 9 digits, breaking current
  UNIX timestamps (needs fix, see below)
- No content-digest, multi-signature, or full RFC 8941 support
- Duplicate headers: first match wins, no folding

Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
2026-03-30 13:17:51 +03:00
David Garske 9afdb0603c
Merge pull request #556 from sebastian-carpenter/client-ech-fix
fixing up ech examples
2026-03-21 15:50:42 -07:00
David Garske 52e44499f0
Merge pull request #563 from padelsbach/padelsbach/aesgcm-rdseed
Extend AES minimal and rdseed examples
2026-03-21 15:21:50 -07:00
Paul Adelsbach 1ac9c87c3b Extend minimal and rdseed examples 2026-03-20 15:27:46 -07:00
tmael 498d78e6d3
Merge pull request #562 from padelsbach/aes256-gcm-minimal
Add minimal buffer encrypt and decrypt example for AES-GCM
2026-03-12 10:17:02 -07:00
Paul Adelsbach 62476b1871 Add minimal buffer encrypt and decrypt example for AES-GCM 2026-03-12 09:52:47 -07:00
JacobBarthelmeh f2dec15dde
Merge pull request #560 from embhorn/fix_psk_resume_client
Set ssl to null after free to avoid double free
2026-02-24 14:52:02 -07:00
Eric Blankenhorn 205ff32c6e Set ssl to null after free to avoid double free 2026-02-24 15:36:39 -06:00
sebastian-carpenter 0e45f2fe9f fixing up ech examples + GREASE ECH example 2026-02-24 14:14:17 -07:00
JacobBarthelmeh a71710ec4f
Merge pull request #554 from anhu/dtlsmcast
Add DTLS 1.2 Mulicast Example.
2026-02-24 09:32:32 -07:00
Anthony Hu dfed0437ab Add DTLS 1.2 Mulicast Example. 2026-02-24 03:36:57 -05:00
David Garske a9d5b45b15
Merge pull request #366 from JacobBarthelmeh/pkcs12
adjust pkcs12 example to print out list of certificates found
2026-02-19 08:54:23 -08:00
Kaleb Himes 1e3c2a204a
Merge pull request #559 from danielinux/uefi-library
Added `uefi-library`: wolfCrypt as UEFI driver
2026-02-19 09:50:56 -07:00
JacobBarthelmeh b62a9c6009 change print buffer function name and use word32 for derSz 2026-02-18 17:02:01 -07:00
Jacob Barthelmeh 2aa1f85d3a improvements to example print out 2026-02-18 16:57:15 -07:00
JacobBarthelmeh 43a35469d9 adjust pkcs12 example to print out list of certificates found 2026-02-18 16:57:15 -07:00
Daniele Lacamera c92a922aea Added `uefi-library`: wolfCrypt as UEFI driver 2026-02-18 18:54:14 +01:00
David Garske 8e47edbf64
Merge pull request #557 from LinuxJedi/pico-fixes
Fixes to the Pi Pico build
2026-02-16 13:49:11 -08:00
David Garske eaea8523d9
Merge pull request #558 from LinuxJedi/pico-time-fix
Fix handling of `XTIME(0)`
2026-02-16 13:00:53 -08:00
Andrew Hutchings a469e04dbe
Merge pull request #476 from ColtonWilley/pkcs11_example_certs
Extend PKCS11 server example for certificate handling
2026-02-16 09:39:45 +00:00
Andrew Hutchings 9337dc00b5 Fix handling of `XTIME(0)`
It should behave more like `time()`.
2026-02-16 09:32:18 +00:00
Andrew Hutchings b821577eaf Fixes to the Pi Pico build
* Don't require FreeRTOS if we are doing a bare metal bench / test build
* Make stack checking stricter and increase stack size for DH
* Set alignment to 0, this fixes LMS if that is compiled-in
* `WOLFSSL_SP_MATH` and `WOLFSSL_SP_MATH_ALL` can't be used together
* Loop the benchmark
2026-02-12 14:56:18 +00:00
David Garske a2217c6e75
Merge pull request #539 from anhu/certmanager_ocsp
Show OCSP checking via CertManager
2026-02-05 08:44:07 -08:00
Anthony Hu 50d513b6d9 Show OCSP checking via CertManager 2026-02-03 16:26:25 -05:00
JacobBarthelmeh 9ada2ac95c
Merge pull request #553 from dgarske/stsafe-a120
Example for ST-SAFE A120
2026-01-23 11:04:29 -07:00
David Garske 22e2aa3197 Fix for ECDHE 2026-01-22 22:49:08 +00:00
David Garske de26517d51 Improvements to Makefile and examples 2026-01-21 00:03:05 +00:00