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

5228 Commits

Author SHA1 Message Date
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
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
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
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
03a81d8181 Code review feedback 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
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
102111e2c7 Give the key wrap tests unused device IDs and fix the comment 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
Lealem Amedie
d9a78aa680 Address Skoll Review comments 2026-08-10 13:41:23 -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
Kareem
28c0e7e6a6 Code review feedback 2026-08-10 10:05:20 -07:00
Kareem
2332df95bb Fix RPK unit test failing under --enable-all. 2026-08-10 10:05:20 -07:00
Kareem
c0120c0b4f Code review feedback: Remove unneeded X509StoreRemoveCa call, reduce comment verbosity, add test 2026-08-10 10:05:20 -07:00
Kareem
5ab6c1755e Code review feedback: Make RPK comments less verbose, add RPK test 2026-08-10 10:05:20 -07:00
Kareem
73aa1f7869 Code review feedback: improve wolfSSL_X509_STORE_get0_objects freeing logic, add test, make comments less verbose 2026-08-10 10:05:20 -07:00
Kareem
7489c8d86b Code review feedback: reduce comment verbosity, add DTLS test 2026-08-10 10:05:20 -07: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
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
David Garske
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
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 Garske
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 Garske
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
Mark Atwood
0e280c4f29 fix(tests): avoid unsigned underflow in DH group loop 2026-08-07 13:33:26 -07:00
David Garske
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 Garske
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 Garske
08a7c29537 Merge pull request #11039 from danielinux/mcdc-test-coverage
Mcdc test coverage: part 5
2026-08-07 10:11:57 -07:00
David Garske
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 Garske
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
David Garske
96586b8f81 Merge pull request #11093 from Frauschi/fenrir_crypto
wolfCrypt Fenrir fixes
2026-08-07 09:11:42 -07:00
David Garske
9081c71f94 Merge pull request #11094 from Frauschi/fenrir_tls
TLS Fenrir fixes
2026-08-07 09:07:34 -07:00
David Garske
bbdc07c1e7 Merge pull request #10786 from aidankeefe2022/fenrir-fixes-jun24/26-ak
Fix: WolfCrypt Fenrir - 11 fixes
2026-08-07 09:06:39 -07:00
Hideki Miyazaki
ffcd3e2c37 Addressed Skoll comments
one more
2026-08-07 23:42:59 +09:00
Tobias Frauenschläger
ec7d2de6a2 Send decrypt_error alert for TLS 1.3 PSK binder failures
RFC 8446 Section 6.2 lists failure to validate a PSK binder under
decrypt_error, but TranslateErrorToAlert() mapped BAD_BINDER to
illegal_parameter. That told the peer its ClientHello was malformed, when
in fact the message was well formed and only the binder MAC did not match.

BAD_BINDER is also returned when no offered PSK matched and the server has
no certificate to fall back to. That reuse is deliberate, because it keeps
an unknown PSK identity indistinguishable from a failed binder, so both
conditions still map to a single alert after this change. A comment at the
return site in CheckPreSharedKeys() now records the invariant at both ends.

Splitting BAD_BINDER off illegal_parameter exposed a second path that had to
move with it. FindPsk() raised PSK_KEY_ERROR, which stays mapped to
illegal_parameter, when the server callback recognised an identity carrying
a non-zero obfuscated_ticket_age. That check ran before any binder was
derived, so on a certificate-less server the two alerts would have let an
unauthenticated peer enumerate valid PSK identities without holding a key.
The check is removed rather than made to fail differently: RFC 8446 Section
4.2.11 says that for an externally established identity an
obfuscated_ticket_age of 0 SHOULD be used and servers MUST ignore the value.
Ignoring it satisfies that requirement, closes the oracle, and lets a
conformant client that sends a non-zero age complete a handshake that was
previously rejected. test_tls13_psk_age_no_identity_oracle() asserts a known
and an unknown identity produce the same alert, with a positive control that
the known run really took the matched path.

Also removes an unreachable branch in CheckPreSharedKeys(). Since commit
089f1f7c9 added the earlier !*usingPSK certificate check, the later
certificate check and its BAD_BINDER return can no longer be reached. A
build with certificates returns BAD_BINDER earlier when none is loaded, and
a NO_CERTS build returns it unconditionally. The remaining branch now falls
through to the shared exit so WOLFSSL_LEAVE() is emitted on the certificate
fallback path as well.

Adds an os-check-linux configuration, tls13-psk-no-certs. psk.yml already
covers NO_CERTS with TLS 1.3 PSK through static-psk-lowresource-tls13, but
that config disables DH, so it only reaches the psk_ke branch. This one
leaves DH enabled and covers psk_dhe_ke under NO_CERTS.

Applications that inspect wolfSSL_get_alert_history() will observe alert 51
instead of 47 for these conditions. The affected tests are updated.
2026-08-07 15:07:51 +02:00