Commit Graph
31652 Commits
Author SHA1 Message Date
JacobBarthelmehandGitHub 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
Daniel PouzznerandGitHub 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 GarskeandGitHub 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 73298a7f63 Share one helper between the RSA-PSS verify crypto callback paths 2026-08-10 14:02:21 -06:00
Lealem Amedie d9a78aa680 Address Skoll Review comments 2026-08-10 13:41:23 -06:00
Lealem Amedie ad8a879ef2 Limit WC_CMAC_TAG_MIN_SZ bump to FIPS builds 2026-08-10 13:35:01 -06:00
Lealem Amedie ca06c85ec0 Testing touch-ups to account for error code fix and MIN_AUTH_TAG_SZ update 2026-08-10 13:35:01 -06:00
Lealem Amedie 18ce83cf9b Fix spacing nit 2026-08-10 13:35:01 -06:00
Lealem Amedie 0e9ee6ffb0 Remove MIN_AUTH_TAG_SZ logic from kernel section to synchronize with user-space build 2026-08-10 13:34:58 -06:00
JacobBarthelmehandGitHub 0ee11c71ac Merge pull request #10994 from night1rider/Xilinx-ASU-Ciphers-CMAC-GMAC
Xilinx Versal Gen2 ASU port: AES ciphers, CMAC, GMAC offload
2026-08-10 13:32:55 -06:00
Lealem Amedie d011a614e7 Increase WC_CMAC_TAG_MIN_SZ to SP800-38b recommendation 2026-08-10 13:25:40 -06:00
Lealem Amedie 9c113d34f1 Crypto layer: Add missing input validation 2026-08-10 13:25:40 -06:00
night1rider a39e0bdba0 Document the WC_PK_TYPE_RSA_PSS_VERIFY handler return contract in cryptocb.h 2026-08-10 12:59:05 -06:00
JacobBarthelmehandGitHub 77da93945b Merge pull request #11117 from night1rider/fix/san-othername-null-memcpy
asn.c: guard empty otherName copy to avoid NULL memcpy (UBSan)
2026-08-10 10:25:23 -06:00
David GarskeandDaniele Lacamera 14a72c96e4 wolfCrypt SRAM PUF: configurable error correction and footprint 2026-08-09 09:04:51 +02:00
night1rider 866e9e15ea asn.c: guard empty otherName copy to avoid NULL memcpy (UBSan)
When a subjectAltName otherName has an empty value, SetDNSEntry() called
XMEMCPY(dst, NULL, 0). Passing NULL to memcpy is undefined behavior and
aborts under UBSan. Skip the copy unless there is real data to copy.
2026-08-08 17:13:02 -06:00
night1rider 375febc944 Extend the RSA-PSS verify callback and harden the Ed448/CMAC hooks
The PSS hook can hand back the recovered block through out/outSz/outLen.
A device that reports only a verdict leaves outLen at 0; wolfSSL then
zeroes the buffer and returns saltLen + hLen, and rejects a buffer
smaller than that with RSA_BUFFER_E. A reported length is clamped to the
buffer size, and any positive handler return maps to SIG_VERIFY_E.

Move the Ed448 sign WOLFSSL_CHECK_MEM_ZERO registration below the crypto
callback hook so the device path no longer returns past it, and guard the
RSA-PSS test callback against WOLF_CRYPTO_CB_ONLY_RSA.

Adds tests for the recovered-data, over-claimed-length and undersized
buffer paths, and an os-check config that builds the hooks under
WOLFSSL_CHECK_MEM_ZERO.
2026-08-08 15:14:28 -06:00
night1rider 33e03a5ce4 Release Ed448 sign MemZero registrations on the crypto callback exit 2026-08-08 15:14:27 -06:00
night1rider 4d19228ca0 Cast type to CmacType so cmac.c builds as C++ 2026-08-08 15:14:27 -06:00
night1rider 3ade5f62b9 Clear *res before invoking the Ed448 verify crypto callback 2026-08-08 15:14:27 -06:00
night1rider 7952b070e6 Validate Ed448ph prehash length before the sign crypto callback 2026-08-08 15:14:27 -06:00
night1rider b35f60eef3 Set cmac->type before cryptocb init so wc_CmacFree can clean up 2026-08-08 15:14:27 -06:00
night1rider 772a62628e Add crypto callback hooks for Ed448, CMAC free, and RSA-PSS verify
Add WOLF_CRYPTO_CB dispatch hooks so a device can service:
* Ed448 sign and verify, mirroring the existing Ed25519 hooks.
* CMAC context free on wc_CmacFree (WOLF_CRYPTO_CB_FREE), letting a device
  release offload state.
* RSA-PSS verify with the digest (WOLF_CRYPTO_CB_RSA_PAD) so the device does
  the full signature and padding check. On that path *out is set to NULL with a
  positive return, documented in rsa.h.

Includes testwolfcrypt and API unit test coverage for each hook.
2026-08-08 15:14:27 -06:00
night1rider a08952b557 Xilinx Versal Gen2 ASU port: decline unsupported AES-GCM IV lengths to software 2026-08-08 14:35:12 -06:00
night1rider 52d569855a Xilinx Versal Gen2 ASU port: fold the one-shot CMAC input into the buffer at final 2026-08-08 14:35:12 -06:00
night1rider 0066461776 Xilinx Versal Gen2 ASU port: split AES-CTR at the 32-bit counter wrap and carry in software to keep it on hardware 2026-08-08 14:35:12 -06:00
night1rider 8f5137c08a Xilinx Versal Gen2 ASU port: AES ciphers, CMAC, GMAC offload 2026-08-08 14:35:11 -06:00
philljjandGitHub e71b086fc8 Merge pull request #10724 from dgarske/ti_c25
wolfCrypt on TI C2000 C28x (LAUNCHXL-F28P55X)
2026-08-08 14:26:28 -05:00
David GarskeandGitHub 968e03e18f Merge pull request #10813 from kojo1/odbc
OpenSSL compatibility for libodbc
2026-08-08 10:57:18 -07:00
Takashi Kojo ca56d1178a Translate VERSION_ERROR to SSL_R_WRONG_VERSION_NUMBER in ERR_GET_REASON 2026-08-08 19:32:23 +09:00
Takashi Kojo e137c9f073 Move ERR_R_BUF_LIB alias to openssl/err.h 2026-08-08 18:13:23 +09:00
Takashi Kojo 1fb0f656b5 Use explicit NULL comparison in BIO_meth_get_* getters 2026-08-08 18:11:33 +09:00
Takashi Kojo c841626bfa Move WOLFSSL_-prefixed BIO type and TLS state constants out of coexist guards 2026-08-08 18:10:00 +09:00
Takashi Kojo 39aad36963 Use a parse-in-progress sentinel for hmac.h's evp.h include 2026-08-08 18:04:20 +09:00
Takashi Kojo 82f9241b49 Drop BIO_{get,set}_app_data fallback aliasing BIO_{get,set}_data 2026-08-08 17:42:25 +09:00
Takashi Kojo 0babeebd55 Store callback_ctrl in BIO_meth_set_callback_ctrl like OpenSSL 2026-08-08 17:37:27 +09:00
Takashi Kojo f73e8013c8 Make BIO_get_new_index thread-safe with atomics, add threaded test 2026-08-08 17:33:35 +09:00
David GarskeandGitHub af9f62b690 Merge pull request #11092 from sameehj/fix/mem-fail-null-checks
Fix mem-fail nightly crashes (jenkins-supervisor #501)
2026-08-07 14:52:36 -07:00
David GarskeandGitHub 1bd2ee0dd4 Merge pull request #11041 from kareem-wolfssl/zd22232_42_63
Fully clear ECC k when calling wc_ecc_sign_hash_ex with SP math.  Avoid aliasing the ticket in wolfSSL_GetSessionAtIndex.  Fix IAR warnings.
2026-08-07 13:47:07 -07:00
David GarskeandGitHub 91df42ec02 Merge pull request #11064 from holtrop-wolfssl/wolfssl-wolfcrypt-2.2.0
Rust wrapper: bump wolfssl-wolfcrypt crate to v2.2.0
2026-08-07 12:33:26 -07:00
David GarskeandGitHub 9ea943e34f Merge pull request #11016 from rizlik/dtls_epochs
dtls13: epoch mangament improvement and bug fixes
2026-08-07 12:30:09 -07:00
David GarskeandGitHub ea57a537c7 Merge pull request #11107 from Frauschi/gate_fix
Fix link failure with NO_SESSION_CACHE and session tickets
2026-08-07 12:16:29 -07:00
David Garske 8abc253c16 ci: name and document the three CHAR_BIT != 8 guards in ti-c2000-compile.yml 2026-08-07 12:07:42 -07:00
David GarskeandGitHub e2ddff61b7 Merge pull request #11105 from Frauschi/psk_fix
Send decrypt_error alert for TLS 1.3 PSK binder failures
2026-08-07 11:31:32 -07:00
David GarskeandGitHub 08a7c29537 Merge pull request #11039 from danielinux/mcdc-test-coverage
Mcdc test coverage: part 5
2026-08-07 10:11:57 -07:00
David GarskeandGitHub 586f1ed490 Merge pull request #11096 from Frauschi/pqc_only
Support post-quantum-only (ML-KEM + ML-DSA/SLH-DSA) TLS 1.3 builds
2026-08-07 10:08:34 -07:00
David GarskeandGitHub 032c78726f Merge pull request #10999 from embhorn/zd22154
Parse x500UniqueIdentifier (OID 2.5.4.45) in certificate DN
2026-08-07 10:01:55 -07:00
Tobias Frauenschläger 41da354dc8 Add CI coverage for NO_SESSION_CACHE with session tickets
The os-check matrix had one NO_SESSION_CACHE entry, dtls13-client-minimal,
and it is client only with no session tickets. Both paths that failed to
link are server side ticket code, so nothing in the matrix covered them.

Add two entries. no-session-cache-session-ticket sets the macro directly
and enables DTLS 1.3 with WOLFSSL_DTLS_NO_HVR_ON_RESUME, covering both
call sites. It also sets HAVE_EXT_CACHE, since an external cache with no
internal one is the only configuration in which the external cache branch
of FreeSessionFromCacheOrExt() survives the preprocessor, and a build can
reach it through --enable-wpas with --enable-lowresource.

lowresource-tls13-session-ticket reaches the src/internal.c paths purely
through configure options, since --enable-lowresource defines
NO_SESSION_CACHE, which is how a user runs into this without setting any
flags by hand. It does not cover src/dtls.c, whose TlsSessionIdIsValid()
needs WOLFSSL_DTLS_NO_HVR_ON_RESUME, so the two entries are not
interchangeable.

Both disable the examples, because tests/unit.test calls
wolfSSL_get1_session() and wolfSSL_set_session(), which NO_SESSION_CACHE
compiles out. The entries are therefore compile coverage for the library.
Making the tests build in this configuration is a larger change.
2026-08-07 18:59:55 +02:00
Tobias Frauenschläger 63eeb20302 Fix link failure with NO_SESSION_CACHE and session tickets
TlsSessionCacheGetAndRdLock() and TlsSessionCacheUnlockRow() are defined
only when the internal session cache is compiled in, but three call sites
used them without that guard. Building with NO_SESSION_CACHE while session
tickets and TLS 1.3 are enabled compiled cleanly and then failed to link.

Both call sites handle state that cannot exist without the cache.
GetSesionFromCacheOrExt() and FreeSessionFromCacheOrExt() serve the
stateful TLS 1.3 ticket path, where the ticket is only a session ID that
has to be looked up. TlsSessionIdIsValid() serves DTLS session ID
resumption, which already bails out at run time on sessionCacheOff. With
no internal cache and no external cache, the lookup now returns NULL and
the peer falls back to a full handshake.

FreeSessionFromCacheOrExt() returns early from the external cache branch
instead of using an else, so that the unlock can be guarded on its own.

This has been broken since the stateful ticket support was added in
commit 1106e5ff0, first released in v5.6.2-stable.
2026-08-07 18:58:43 +02:00