Commit Graph

25314 Commits

Author SHA1 Message Date
David Garske
c13be21a90 Merge pull request #8755 from AlexLanzano/pqc-gcc-error
Remove redefinition of MlKemKey and Fix build issue in benchmark
2025-05-15 11:00:40 -07:00
Andrew Hutchings
6790c95e94 Merge pull request #8745 from dgarske/stm32_crypt_header_width
Fix edge case issue with STM32 AES GCM auth padding
2025-05-15 16:51:52 +01:00
David Garske
2ac4be3f22 Merge pull request #8773 from douzzer/20250514-linuxkm-and-sp-tweaks
20250514-linuxkm-and-sp-tweaks
2025-05-14 19:54:48 -07:00
Daniel Pouzzner
baaab4ccac Merge pull request #8722 from anhu/undef_def
Do not allow define of max to interfere with pthreads
2025-05-14 18:44:57 -05:00
Daniel Pouzzner
c201006a26 wolfcrypt/src/sp_int.c: move setup for -Wno-array-bounds when WOLFSSL_SP_DYN_STACK, to follow sp_int.h include. 2025-05-14 18:20:08 -05:00
Daniel Pouzzner
c8b507d246 wolfssl/wolfcrypt/sp_int.h: refactor SP_WORD_SIZEOF as a simple numeric literal, and use them for XALIGNED() for Windows portability. 2025-05-14 16:54:49 -05:00
Daniel Pouzzner
55bbd84445 wolfssl/wolfcrypt/sp_int.h and wolfcrypt/src/sp_int.c: add WOLFSSL_SP_DYN_STACK macro to orthogonalize gnarly setup logic, and refactor to use it throughout; refactor several more sp_int stack-allocated data buffers as sp_int_digit[]s rather than char[]s. 2025-05-14 15:39:37 -05:00
Daniel Pouzzner
f0f4084f94 linuxkm/lkcapi_dh_glue.c: never install DH/FFDHE on kernel <5.18 -- DH secrets have a different format before that version, and FFDHE (CONFIG_CRYPTO_DH_RFC7919_GROUPS) was introduced in 5.18 and is the only FIPS-allowed DH variant. 2025-05-14 15:39:37 -05:00
David Garske
49d9bfa160 Merge pull request #8758 from bigbrett/exportx509pubkey-api
Added new ASN X509 API: `wc_GetSubjectPubKeyInfoDerFromCert`
2025-05-14 12:28:45 -07:00
Brett Nicholas
40c9a03ebe rename function args to match implementation 2025-05-14 11:31:36 -06:00
David Garske
6270429089 Fix STM32MP13x STM32 AES GCM. 2025-05-14 10:27:01 -07:00
David Garske
4fd76dae95 Add portability fix for new INT_MAX required on all TLS limit checking (added in 91aad90c59 Jan 24, 2025). 2025-05-14 10:27:01 -07:00
David Garske
7a936d731d Fix edge case issue with STM32 AES GCM auth padding. Issue introduced in PR #8584. Fixes ZD 19783
Added way to override STM_CRYPT_HEADER_WIDTH.
2025-05-14 10:27:01 -07:00
David Garske
813e36a823 Merge pull request #8770 from douzzer/20250514-WOLFSSL_DEBUG_PRINTF-C89
20250514-WOLFSSL_DEBUG_PRINTF-C89
2025-05-14 08:50:46 -07:00
Alex Lanzano
88ae4266cf Don't define PQC option strings in benchmark if WOLFSSL_BENCHMARK_ALL is defined
This fixes the 'defined but not used' build issue in benchmark.c if any PQC algos are enabled
and WOLFSSL_BENCHMARK_ALL is defined.
2025-05-14 08:54:59 -04:00
Daniel Pouzzner
8035667d9b wolfssl/wolfcrypt/logging.h and wolfcrypt/src/logging.c: add WOLFSSL_DEBUG_PRINTF_FN and WOLFSSL_DEBUG_PRINTF_FIRST_ARGS, and update refactored wolfssl_log(), for C89 compat. 2025-05-14 03:21:28 -05:00
Daniel Pouzzner
c5021c0690 wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mulmod(). 2025-05-14 03:18:35 -05:00
David Garske
cd79be4928 Merge pull request #8769 from douzzer/20250513-WOLFSSL_DEBUG_PRINTF-WOLFSSL_DEBUG_CERTIFICATE_LOADS
20250513-WOLFSSL_DEBUG_PRINTF-WOLFSSL_DEBUG_CERTIFICATE_LOADS
2025-05-13 21:15:43 -07:00
Daniel Pouzzner
9d722b3a6c purge baltimore-cybertrust-root.pem from certs/external/include.am and scripts/. 2025-05-13 20:52:08 -05:00
Daniel Pouzzner
55460a5261 wolfssl/wolfcrypt/logging.h and wolfcrypt/src/logging.c: add
WOLFSSL_DEBUG_PRINTF() macro adapted from wolfssl_log(), refactor
  wolfssl_log() to use it, and move printf setup includes/prototypes from
  logging.c to logging.h;

src/ssl_load.c: add source_name arg and WOLFSSL_DEBUG_CERTIFICATE_LOADS clauses
  to ProcessBuffer() and ProcessChainBuffer(), and pass reasonable values from
  callers;

remove expired "Baltimore CyberTrust Root" from certs/external/ca_collection.pem
  and certs/external/baltimore-cybertrust-root.pem.
2025-05-13 20:30:48 -05:00
JacobBarthelmeh
336b374b9c Merge pull request #8753 from dgarske/gcc4_portability
Improvements for portability using older gcc 4.8.2
2025-05-13 13:12:31 -06:00
Daniel Pouzzner
5f2a43f01f Merge pull request #8766 from dgarske/static_ephemeral
Fix for Curve25519 and static ephemeral issue with blinding
2025-05-12 15:18:37 -05:00
Brett Nicholas
2151a1b8a1 review comments 2025-05-12 11:43:56 -06:00
David Garske
e09e3f6098 Fix for Curve25519 and static ephemeral issue with curve25519 blinding. Added new test case (used by wolfKeyMgr). 2025-05-12 10:26:31 -07:00
David Garske
ed6f853b9c Merge pull request #8763 from douzzer/20250511-fixes
20250511-fixes
2025-05-12 08:48:37 -07:00
David Garske
110504acd6 Merge pull request #8761 from douzzer/20250510-SP-dyn-stack-tweaks-and-workaround
20250510-SP-dyn-stack-tweaks-and-workaround
2025-05-12 08:48:10 -07:00
Anthony Hu
af29a59325 Do not allow define of max to interfere with pthreads 2025-05-12 11:39:07 -04:00
Daniel Pouzzner
e19295bb64 wolfssl/wolfcrypt/settings.h: #define WOLFSSL_CURVE25519_BLINDING if defined(NO_CURVED25519_X64);
wolfcrypt/src/curve25519.c: if defined(NO_CURVED25519_X64), #undef USE_INTEL_SPEEDUP;

wolfcrypt/src/fe_operations.c: fixes for -m32 -Wconversions;

.github/workflows/wolfCrypt-Wconversion.yml: add -m32 scenario;

.wolfssl_known_macro_extras: remove unneeded entry for WOLFSSL_CURVE25519_BLINDING.
2025-05-11 12:06:23 -05:00
David Garske
b1cf5df2c2 Merge pull request #8762 from douzzer/20250510-testwolfcrypt-fix-exit-status
20250510-testwolfcrypt-fix-exit-status
2025-05-10 11:54:36 -07:00
Daniel Pouzzner
001a5ef897 wolfcrypt/test/test.c: in main(), return (exit with) 0 for success and 1 for failure. 2025-05-10 12:08:50 -05:00
Daniel Pouzzner
5a911f6af0 wolfssl/wolfcrypt/sp_int.h: wc_static_assert(), not static_assert(). 2025-05-10 02:16:48 -05:00
Daniel Pouzzner
8410d922db .wolfssl_known_macro_extras: remove WOLFSSL_CURVE25519_BLINDING (defined in settings.h since aa840f9c94). 2025-05-10 01:31:45 -05:00
Daniel Pouzzner
c967dd2a30 wolfcrypt/src/sp_int.c and wolfssl/wolfcrypt/sp_int.h: add
MP_INT_SIZEOF_DIGITS() macro, and use it for stack allocations in DECL_SP_INT()
  and DECL_SP_INT_ARRAY();

  refactor _sp_submod() to use DECL_SP_INT() rather than DECL_SP_INT_ARRAY() to
  work around apparent optimizer bug in gcc-15.
2025-05-10 01:28:17 -05:00
Daniel Pouzzner
d232680e9c Merge pull request #8749 from philljj/linuxkm_aes_debug_msgs
linuxkm aes: add debug msgs.
2025-05-09 16:46:44 -05:00
Brett Nicholas
79f214f73c add new X509 API: wc_Exportx509PubKeyWithSpki 2025-05-09 14:40:20 -06:00
JacobBarthelmeh
8e0aefd321 Merge pull request #8725 from AlexLanzano/no-malloc-support
Add support for no malloc with `wc_CheckCertSigPubKey`
2025-05-09 14:23:47 -06:00
philljj
3d92eb6d2e Merge pull request #8756 from douzzer/20250509-linuxkm-lkcapi-rsa-pkcs1-precedence
20250509-linuxkm-lkcapi-rsa-pkcs1-precedence
2025-05-09 13:59:09 -05:00
David Garske
68b83bfa14 Merge pull request #8711 from JacobBarthelmeh/coverity
fix for sanity check on --group with unit test app and null sanity check with des decrypt
2025-05-09 11:41:53 -07:00
David Garske
407efd3c5d Merge pull request #8710 from JacobBarthelmeh/codesonar
ech get length fix and x509 extension print temporary buffer size
2025-05-09 11:41:24 -07:00
David Garske
7cd080b421 Merge pull request #8713 from JacobBarthelmeh/scan
use proper heap hint when free'ing CRL in error case
2025-05-09 11:23:20 -07:00
David Garske
0adb6eb788 Merge pull request #8748 from ColtonWilley/pkcs7_x509_store_update
Update PKCS7 to use X509 STORE for internal verification
2025-05-09 11:22:53 -07:00
Daniel Pouzzner
b6f6d8ffda linuxkm/lkcapi_glue.c: reorder registration of AES and SHA algs to put composite first and primitive last, to prevent kernel dynamic synthesis of the composites. 2025-05-09 12:12:15 -05:00
Alex Lanzano
76fd5319d4 Remove redefinition of MlKemKey
Removes the redundant typedef of MlKemKey which will break builds on
pre-C11 compilers. KyberKey is defined as a macro for MlKemKey.
2025-05-09 10:42:15 -04:00
Sean Parkinson
9d1bf83a43 Merge pull request #8736 from JacobBarthelmeh/build
adjust default build with curve25519
2025-05-09 20:24:53 +10:00
Daniel Pouzzner
707505d31d linuxkm/lkcapi_glue.c: in linuxkm_lkcapi_register(), register PKCS1 algs before direct_rsa, to prevent kernel from synthesizing conflicting PKCS1 implementations. for good measure, move raw DH after FFDHE too. 2025-05-09 00:40:30 -05:00
David Garske
82cb83abee Improvements for portability using older gcc 4.8.2 and customer parsing tools. 2025-05-08 17:02:27 -07:00
Sean Parkinson
4f07f6a9c1 Merge pull request #8750 from anhu/crl_RefFree
Add missing call to wolfSSL_RefFree in FreeCRL
2025-05-09 08:24:10 +10:00
philljj
96c15b3a87 Merge pull request #8751 from douzzer/20250508-linuxkm-lkcapi-ECDH-never-fips_enabled
20250508-linuxkm-lkcapi-ECDH-never-fips_enabled
2025-05-08 14:59:48 -05:00
JacobBarthelmeh
77c0f79cbe adjust ech get length only case 2025-05-08 13:50:42 -06:00
JacobBarthelmeh
9fb34d76c2 adjust size of temporary buffer 2025-05-08 13:50:42 -06:00