Commit Graph

11230 Commits

Author SHA1 Message Date
David Garske fea8d1b5bc Merge pull request #10413 from JeremiahM37/fenrir-7
zeroize sensitive memory and validate public API inputs
2026-05-07 14:47:32 -07:00
David Garske 9a46ecb263 Merge pull request #10380 from padelsbach/lms-xmss
Add crypto callbacks for LMS and XMSS
2026-05-07 14:46:56 -07:00
David Garske 58ca6a1fa7 Merge pull request #10302 from JacobBarthelmeh/ecc
additional sanity checks on invalid input
2026-05-07 14:39:21 -07:00
David Garske 80a04551cf Merge pull request #10405 from SparkiDev/mlkem_fixes_1
ML-KEM: fix comments, API signatures, minor issues
2026-05-07 14:37:59 -07:00
David Garske 8c74977eee Merge pull request #10297 from kareem-wolfssl/zd21676
Properly handle fallback cipher type case in wc_Pkcs11_CryptoDevCb.
2026-05-07 14:36:05 -07:00
David Garske 6efbacf402 Merge pull request #10416 from jackctj117/v6-fix
fix: guard wc_Ed448PublicKeyToDer ed448_export_public call for FIPS<7
2026-05-07 14:32:48 -07:00
David Garske aeeb98cc04 Merge pull request #10400 from embhorn/gh10383
Fix Dilithium signing when WC_DILITHIUM_CACHE_MATRIX_A is enabled
2026-05-07 14:30:46 -07:00
David Garske 8ac2a1ae1b Merge pull request #10418 from rlm2002/coverity
20260506 Coverity
2026-05-07 14:11:32 -07:00
David Garske 52847ed7e0 Merge pull request #10420 from SparkiDev/mldsa_small_1
ML-DSA fixes: small vfy key object, small SHA-3, fix test
2026-05-07 13:52:50 -07:00
Eric Blankenhorn 935c3901d9 Fix from review 2026-05-07 07:34:39 -05:00
Eric Blankenhorn 8ce4e126ae Fix from review 2026-05-07 07:34:39 -05:00
Eric Blankenhorn 4191d46d95 Fix Dilithium signing when WC_DILITHIUM_CACHE_MATRIX_A is enabled 2026-05-07 07:34:39 -05:00
Sean Parkinson e98fb8f72b Merge pull request #10415 from douzzer/20260506-fixes
20260506-fixes
2026-05-07 17:00:02 +10:00
Daniel Pouzzner d86174cc50 src/ssl.c: in wolfSSL_check_domain_name(), use XSTRCMP(), not strcmp();
wolfcrypt/src/asn.c, wolfssl/wolfcrypt/asn.h, src/ssl.c, wolfssl/ssl.h: move wolfssl_local_IsValidFQDN() from ASN.1 layer (where it has no users and is gated out in lean PSK builds) to TLS layer (where its users are);

scripts/crl-revoked.test: use `cp --symbolic-link` opportunistically but fall back to `cp -p`.
2026-05-06 21:40:33 -05:00
Jeremiah Mackey a075a99729 evp: fix sm4-ctr debug message 2026-05-07 02:31:25 +00:00
Jeremiah Mackey 8667bd0f92 wolfcrypt: validate API input sizes 2026-05-07 02:31:25 +00:00
Jeremiah Mackey 90eb7253b6 wolfcrypt: zero sensitive buffers 2026-05-07 02:31:25 +00:00
Jeremiah Mackey a454248791 eddsa: zero orig_k after sign 2026-05-07 02:31:25 +00:00
Jeremiah Mackey 6711389e3b pkcs7: zero plaintext before free 2026-05-07 02:31:25 +00:00
Jeremiah Mackey a2aa3691f0 srp: harden secret intermediates 2026-05-07 02:31:25 +00:00
Paul Adelsbach 7f5138fb9a More review feedback: pass hash to LMS export, and drop len check in XMSS verify 2026-05-06 17:46:42 -07:00
Sean Parkinson 55d7ed8d0e ML-DSA fixes: small vfy key object, small SHA-3, fix test
Only have the public key in the ML-DSA key object when verify-only.
Be able to leave out SHA-3 APIs when only needing SHAKE.
Fix ML-DSA testing to only have data for compiled in parameters.
2026-05-07 10:03:41 +10:00
Sean Parkinson 15398c26d0 ML-KEM: fix comments, API signatures, minor issues
More checks for public or private key not set.
wc_MlKemKey_Free clears key->flags
wc_MlKemKey_DecodePrivateKey now checks the public key is valid.
wc_MlKemKey_EncodePrivateKey doesn't need calculate hash of public key
as encoding the public key will do this.
EncodePrivateKey/EncodePublicKey now return BAD_STATE_E when flags not
set.
mlkem_kdf, mlkem_check_public, mlkem_xof_absorb pointer parameters are
now const.
Now all mlkem_redistribute_*_rand_avx2 functions are WOLFSSL_LOCAL.
Changed Kyber uses to MlKem.
2026-05-07 08:17:27 +10:00
Kareem 3f1c6bdac8 Code review feedback. 2026-05-06 15:13:48 -07:00
Kareem d1b6ddca75 Properly handle fallback cipher type case in wc_Pkcs11_CryptoDevCb.
Thanks to Zou Dikai for the report.
2026-05-06 15:12:09 -07:00
Ruby Martin e085d468d8 clear potential null dereference 2026-05-06 14:33:14 -06:00
jackctj117 a3799cffda fix: guard wc_Ed448PublicKeyToDer ed448_export_public call for FIPS<7 2026-05-06 14:09:56 -06:00
Daniel Pouzzner 03cee6f2bf tests/api/test_ed25519.c and tests/api/test_ed448.c: add missing FIPS v7+ gating in test_wc_ed25519_export() and test_wc_ed448_export().
wolfcrypt/test/test.c: in aes_cbc_test(), use unconditional static on msg4 and verify4 to work around gcc optimizer bug (probably same bug as noted in ac11279c60).
2026-05-06 14:24:18 -05:00
David Garske 490c1062e4 Merge pull request #10274 from gasbytes/crl-idp-extension-fix-follow-up
Reject CRLs with unrecognized critical entry extensions per RFC 5280 section 5.3
2026-05-06 12:13:28 -07:00
Paul Adelsbach 0f2c526ee2 Add missing WC_NO_ERR_TRACE 2026-05-06 11:22:47 -07:00
Paul Adelsbach 8c2bf1dfd4 Remove wc_*Key_HashMsg functions and PKCS#11 references 2026-05-06 09:56:22 -07:00
Ruby Martin d960d02c80 compare against MAX_UNICODE_SZ, readability change 2026-05-06 09:28:43 -06:00
Ruby Martin dbdd066737 remove dead length check 2026-05-06 09:24:01 -06:00
Juliusz Sosinowicz 061311d6ca zd/21661: harden X.509 chain validation, session ticket identity binding, and peer cert restore
- x509_str: require CA:TRUE unconditionally in wolfSSL_X509_verify_cert;
  verify leaf signature even when verify_cb overrides INVALID_CA
- x509_str: align WOLFSSL_X509_V_ERR_INVALID_CA with OpenSSL value (79)
  so OPENSSL_COEXIST builds compile; bump WC_OSSL_V509_V_ERR_MAX to 80
  and extend error_test() missing-value table for the new gaps
- asn: reject embedded NUL in dNSName / rfc822Name / URI SAN entries
- internal: re-verify restored ticket peer cert against trust store with
  CRL/OCSP checks; clear stale state from session cache on verification
  failure
- ticket: bind SNI and ALPN into session ticket via compile-time selected
  hash (TICKET_BINDING_HASH_TYPE); reject resumption on mismatch in both
  TLS 1.3 and TLS 1.2 paths
- ticket: defer SNI/ALPN binding check until after extensions are parsed
  by consolidating into VerifyTicketBinding(), called once after
  ALPN_Select in DoTls13ClientHello and DoClientHello; the early
  per-call sites ran before extensions were parsed and rejected valid
  resumptions in nginx, haproxy, grpc, and CPython integration tests
- ssl_sess: free previous session in wolfSSL_d2i_SSL_SESSION before
  overwrite
- examples/client: increase SESSION_TICKET_LEN fallback from 256 to 2048
  to support larger tickets
- tests: update SAN NUL fixtures and add parse-time rejection coverage;
  add test_tls13_ticket_peer_cert_reverify for CA-removal scenario; skip
  it under WOLFSSL_NO_DEF_TICKET_ENC_CB
2026-05-06 16:45:58 +02:00
JacobBarthelmeh f140546ba1 add sanity check of hash to atmel port 2026-05-06 08:34:50 -06:00
Daniel Pouzzner 50da0c0a26 Merge pull request #10390 from Frauschi/lms_Wconversion
LMS Wconversion fixes
2026-05-06 09:16:23 -05:00
Daniel Pouzzner 29343708df Merge pull request #10391 from Frauschi/xmss_Wconversion
XMSS Wconversion fixes
2026-05-06 09:15:59 -05:00
Tobias Frauenschläger 2833a4b1e8 ML-DSA Wconversion fixes 2026-05-06 15:33:17 +02:00
Tobias Frauenschläger 40b583fbcb Wconversion fixes for LMS 2026-05-06 15:31:00 +02:00
Tobias Frauenschläger fe353af409 XMSS Wconversion fixes 2026-05-06 15:29:08 +02:00
Paul Adelsbach 7906e67c14 Address PR comments 2026-05-05 13:46:45 -07:00
Paul Adelsbach b9eb7c1ff8 Add crypto callbacks for LMS and XMSS 2026-05-05 13:46:41 -07:00
David Garske 13f459127c Merge pull request #10372 from MarkAtwood/fix/ed448-der-const
fix: add const to wc_Ed448 DER export function key parameters
2026-05-05 12:49:30 -07:00
David Garske 44564dd5fd Merge pull request #10368 from holtrop-wolfssl/gh10359
Allow SubjectInfoAccess extension without id-ad-caRepository entry
2026-05-05 12:49:19 -07:00
David Garske c73f431687 Merge pull request #10392 from JeremiahM37/fenrir-5
wolfCrypt input validation and side-channel hardening
2026-05-05 12:24:17 -07:00
Daniel Pouzzner c1b2660a08 Merge pull request #10396 from douzzer/20260501-fips-v7-fixes
20260501-fips-v7-fixes -- reviewed+approved by @Frauschi
2026-05-05 14:20:49 -05:00
David Garske b47f71678d Merge pull request #10363 from MarkAtwood/fix/curve25519-clamp-check-rule3
fix: curve25519 clamp check missing rule 3 (bit 6 of byte 31) (ZD-21731)
2026-05-05 12:16:06 -07:00
David Garske 00abce3474 Merge pull request #10310 from cconlon/d2iMLDSA
Add ML-DSA SPKI/PKCS#8 DER support to d2i_PUBKEY and d2i_PrivateKey
2026-05-05 12:11:49 -07:00
David Garske 7de26312e6 Merge pull request #10378 from rlm2002/fenrir
Various PKCS12 Fixes
2026-05-05 12:07:17 -07:00
David Garske 3a1f51d2e6 Merge pull request #10388 from Frauschi/slh-dsa_Wconversion
SLH-DSA Wconversion fixes
2026-05-05 12:04:22 -07:00