Commit Graph

24846 Commits

Author SHA1 Message Date
David Garske
9258fde02f Merge pull request #8570 from wolfSSL/devin/1742405136-cipherType-to-string
Add wolfSSL_EVP_CIPHER_type_string function and test
2025-03-21 10:04:41 -07:00
Chris Conlon
7c9ecd39fe Merge pull request #8550 from lealem47/STM32WBA
Add support for STM32WBA
2025-03-21 09:58:17 -06:00
David Garske
b9aeeac58b Merge pull request #8576 from douzzer/20250319-FIPS-lean-aesgcm
20250319-FIPS-lean-aesgcm
2025-03-21 08:55:34 -07:00
Daniel Pouzzner
f14498ea6b fix a couple broken configs in examples/configs/ - simultaneous SP and NO_BIG_INT. 2025-03-20 22:40:08 -05:00
Daniel Pouzzner
57ecd4b246 configure.ac: fix -DNO_BIG_INT setup to recognize $ENABLED_SP_MATH.
wolfcrypt/test/test.c: fix gating around modLen in rsa_test().

wolfssl/openssl/bn.h: remove superfluous WOLFSSL_SP_MATH gate around mp_int mpi
  in struct WOLFSSL_BIGNUM definition.

wolfssl/wolfcrypt/wolfmath.h: add check for "Conflicting MPI settings.", add
  initial check for WOLFSSL_SP_MATH_ALL || WOLFSSL_SP_MATH to include sp_int.h,
  and remove superfluous WOLFSSL_SP_MATH gate on "common math functions".
2025-03-20 22:18:22 -05:00
Daniel Pouzzner
e870e7f6d2 configure.ac: in FIPS lean-aesgcm setup, don't lock features that are outside
the FIPS boundary, just set up appropriate defaults.

wolfssl/wolfcrypt/wolfmath.h: if legacy math back ends aren't defined, and
   NO_BIG_INT isn't defined, then always include sp_int.h, for backward compat.
2025-03-20 21:07:15 -05:00
David Garske
5f013c735e Merge pull request #8575 from ColtonWilley/fix_cryptocb_rsa_pad_ret_len
Fix outlen return for RSA private decrypt with WOLF_CRYPTO_CB_RSA_PAD
2025-03-20 19:03:25 -07:00
Daniel Pouzzner
27a582829f .wolfssl_known_macro_extras: get macros back in C-lexical order. 2025-03-20 20:10:16 -05:00
Daniel Pouzzner
b544354306 wolfssl/wolfcrypt/wolfmath.h: don't include an MPI header if NO_BIG_INT is
defined, and issue a #error if no MPI backend gate is defined and NO_BIG_INT
   is not defined either.

configure.ac:
* add support for FIPS lean-aesgcm[-{ready,dev}].
* implement handler for --enable-sha256.
* move setup for WOLFSSL_FIPS_DEV and WOLFSSL_FIPS_READY into the applicable
    per-flavor sections.
* fix sensing of $ENABLED_AESGCM in FIPS setup clauses to pivot on `!= "no"`
    rather than `= "yes"`, to accommodate "4bit" and other non-"yes" values.
* fix SNI_DEFAULT to be "no" if $ENABLED_TLS = no.
* fix ENABLED_DHDEFAULTPARAMS default to be $ENABLED_DH rather than yes.

wc_encrypt.c: add missing gates in wc_CryptKey() for NO_SHA256.

wolfcrypt/test/test.c: gating fixes for NO_SHA256.

wolfcrypt/benchmark/benchmark.c: basic fixes for building/running with
  --disable-rng (-DWC_NO_RNG).

With the above additions and fixes, it's now a clean build, test, and benchmark,
  with --disable-sha256 --enable-cryptonly --disable-hashdrbg --disable-rng
  --disable-hmac, though RSA/DH/ECC benches are disabled.
2025-03-20 20:03:34 -05:00
David Garske
18ac695bb2 Merge pull request #8556 from SparkiDev/ech-config-control
ECH: generate multiple configs and rotate echConfigs
2025-03-20 17:05:43 -07:00
David Garske
2cf4997d0f Merge pull request #8565 from res0nance/correct-debug-info
random: correct debug messages
2025-03-20 17:04:47 -07:00
David Garske
86b01bddd8 Merge pull request #8428 from miyazakh/qt_jenkins
Fix Qt Nightly Jenkins failure
2025-03-20 17:03:03 -07:00
David Garske
c06df2093a Merge pull request #8548 from wolfSSL/devin/1741708186-add-cmake-wolfclu
Add WOLFSSL_CLU option to CMakeLists.txt
2025-03-20 16:50:03 -07:00
David Garske
18268a5ea9 Merge pull request #8551 from kareem-wolfssl/zd19541
Change #pragma GCC macros in sp_int.c to PRAGMA_GCC macros to avoid calling them on unsupported toolchains.
2025-03-20 16:44:10 -07:00
David Garske
7ba179f50f Merge pull request #8560 from SparkiDev/test_api_c_split_1
Split out tests: random, wolfmath, public key
2025-03-20 16:42:41 -07:00
David Garske
01910a60aa Merge pull request #8542 from anhu/dual_alg_crit_ext
Allow critical alt and basic constraints extensions
2025-03-20 16:15:42 -07:00
David Garske
23ff43f955 Testing results on the STM32WBA52 (Cortex-M33). 2025-03-20 16:02:46 -07:00
Anthony Hu
4967738044 Delete dupe line 2025-03-20 17:41:14 -04:00
Colton Willey
4290bfb9a6 Fix outlen return for RSA private decrypt with WOLF_CRYPTO_CB_RSA_PAD defined 2025-03-20 13:46:13 -07:00
David Garske
2c36ae268f Merge pull request #8536 from SparkiDev/kyber_to_mlkem
Update Kyber APIs to ML-KEM APIs
2025-03-20 11:07:53 -07:00
David Garske
2383402e10 Merge pull request #8537 from philljj/coverity_quic
coverity: tests quic cleanup.
2025-03-20 10:58:30 -07:00
David Garske
beac9cb8b8 Merge pull request #8544 from philljj/coverity_test_md5
coverity: pacify test_md5 uninitialized scalar variable warning.
2025-03-20 10:57:28 -07:00
David Garske
4c0d4a931e Merge pull request #8555 from bigbrett/default-devid-disable
Add option to disallow automatic use of "default" devId
2025-03-20 10:56:17 -07:00
Sean Parkinson
3e5ee7c142 Merge pull request #8569 from philljj/linuxkm_fedora_build
linuxkm fedora: fix uninitialized build error.
2025-03-20 08:30:16 +10:00
Sean Parkinson
cf272ba46b Merge pull request #8572 from embhorn/zd19587
Fix missing alert types in AlertTypeToString
2025-03-20 08:25:56 +10:00
Eric Blankenhorn
ffe4420d19 Fix missing alert types in AlertTypeToString 2025-03-19 16:35:50 -05:00
Devin AI
ec00f780ec Rename parameter in wolfSSL_EVP_CIPHER_type_string and add test
Co-Authored-By: lealem@wolfssl.com <lealem@wolfssl.com>
2025-03-19 17:41:51 +00:00
Devin AI
af1f6543e1 Add wolfSSL_EVP_CIPHER_type_string function to get cipher string from type
Co-Authored-By: lealem@wolfssl.com <lealem@wolfssl.com>
2025-03-19 17:29:03 +00:00
philljj
fe3c16da77 Merge pull request #8567 from douzzer/20250317-linuxkm-AES-GCM
20250317-linuxkm-AES-GCM
2025-03-19 12:48:10 -04:00
jordan
d1f94ad3e8 linuxkm fedora: fix uninitialized build error. 2025-03-19 10:47:32 -04:00
Daniel Pouzzner
ab7713676e linuxkm/lkcapi_glue.c: for AES-{CBC,CFB,GCM}, treat ctx->aes_{encrypt,decrypt}
as readonly in the encrypt/decrypt handlers -- clone them before setting the IV
-- for thread safety.  also, remove the "experimental" designation of
--enable-linuxkm-lkcapi-register=all.
2025-03-18 22:39:17 -05:00
Sean Parkinson
db3ab5a4c7 Merge pull request #8566 from kareem-wolfssl/zd19572
Only perform ARM assembly CPUID checks if support was enabled at build time.
2025-03-18 09:03:36 +10:00
Daniel Pouzzner
ac89fbc9e6 linuxkm: fix AES-GCM shim implementation and self-test. 2025-03-17 17:25:53 -05:00
Kareem
6c472496b4 Only perform ARM assembly CPUID checks if support was enabled at build time. 2025-03-17 14:25:08 -07:00
Devin AI
cf813c81b8 Revert "Enable WOLFSSL_OPENSSLEXTRA and OPENSSL_EXTRA for WOLFSSL_CLU option"
This reverts commit 16eb8d9ec9.
2025-03-17 20:30:26 +00:00
Devin AI
16eb8d9ec9 Enable WOLFSSL_OPENSSLEXTRA and OPENSSL_EXTRA for WOLFSSL_CLU option
Co-Authored-By: eric@wolfssl.com <eric@wolfssl.com>
2025-03-17 20:25:15 +00:00
Eric Blankenhorn
098358c217 Add WOLFSSL_AESCTR to WOLFSSL_CLU cmake option 2025-03-17 13:34:15 -05:00
Brett Nicholas
c7db28ef5a merge --no-default-devid configure option into --enable-cryuptocb=no-default-devid 2025-03-17 12:15:32 -06:00
res0nance
c697f87bda random: correct debug messages 2025-03-17 21:12:51 +08:00
Sean Parkinson
4e60e9fbed Merge pull request #8559 from anhu/ifndef_shake
Check if WOLFSSL_SHAKExxx is not defined
2025-03-17 09:54:36 +10:00
Sean Parkinson
663ca29a5d Split out tests: random, wolfmath, public key
Improved testing of random APIs.
wolfmath tests moved out.
Public key algorithm testing moved out: RSA, DSA, DH, ECC, SM2,
Curve25519, Ed25519, Curve448, Ed448, ML-DSA.
Signature API tests moved out.

Fix for OCSP testing to ensure RSA is available.

Added group names to API test cases.
Can select groups to run with --group <name>. --groups lists all known
group names.

Added option to stop API testing on first failure: --stopOnFail.
2025-03-17 09:32:00 +10:00
Eric Blankenhorn
e44ccda931 Fix ED25519 definition when WOLFSSL_CLU is enabled 2025-03-14 16:40:31 -05:00
Devin AI
e9fadcc86e Fix NO_DES3 definition when WOLFSSL_CLU is enabled
Co-Authored-By: eric@wolfssl.com <eric@wolfssl.com>
2025-03-14 21:12:09 +00:00
Daniel Pouzzner
bc7fbee539 Merge pull request #8528 from SparkiDev/digest_test_rework_2
Digest tests: add more tests
2025-03-14 16:11:42 -05:00
Devin AI
dbc2017cc7 Fix OPENSSL_ALL definition for WOLFSSL_CLU option
Co-Authored-By: eric@wolfssl.com <eric@wolfssl.com>
2025-03-14 20:03:00 +00:00
Kaleb Himes
6188c9c342 Merge pull request #8563 from douzzer/20250313-various-fixes
20250313-various-fixes
2025-03-14 10:47:19 -06:00
Daniel Pouzzner
b9111aae99 wolfssl/wolfcrypt/types.h: refactor assert.h gate as WOLFSSL_HAVE_ASSERT_H && !WOLFSSL_NO_ASSERT_H.
wolfssl/wolfcrypt/settings.h: #ifdef WOLFSSL_LINUXKM, #undef WOLFSSL_HAVE_ASSERT_H and #define WOLFSSL_NO_ASSERT_H.
2025-03-14 02:11:58 -05:00
Daniel Pouzzner
87c0ac90b8 configure.ac:
* sense assert.h and define WOLFSSL_HAVE_ASSERT_H accordingly.
* force off enable_aesgcm_stream if 32 bit armasm or riscv-asm (not yet implemented or buildable).
* add AM_CONDITIONAL([BUILD_CHACHA_NOASM, ...]) when --enable-chacha=noasm.

src/include.am: gate armasm/riscv_asm chacha files on !BUILD_CHACHA_NOASM.

tests/api.c: add missing HAVE_CHACHA&&HAVE_POLY1305 gate around test_TLSX_CA_NAMES_bad_extension().

wolfcrypt/src/chacha.c: tweak WOLFSSL_ARMASM and WOLFSSL_RISCV_ASM codepaths to also depend on !NO_CHACHA_ASM.

wolfssl/wolfcrypt/types.h: in setup for wc_static_assert(), #include <assert.h> if WOLFSSL_HAVE_ASSERT_H, >=C11, or >=C++11.
2025-03-13 23:17:57 -05:00
Daniel Pouzzner
37909e9707 Merge pull request #8561 from SparkiDev/poly1305-arm32-asm-fix
Poly1305 ARM32 assembly code: loading with ldm
2025-03-13 22:10:41 -05:00
Sean Parkinson
97a646661f Poly1305 ARM32 assembly code: loading with ldm
Loading message with ldm, that requires aligned pointers, when 64n +
16*[1-3] bytes are to be processed.
2025-03-14 11:05:48 +10:00