Commit Graph

26097 Commits

Author SHA1 Message Date
David Garske
d79ca8a746 Improve some of the build cases around crypto callback only 2025-08-13 21:58:53 +01:00
Daniel Pouzzner
22b221a8be Merge pull request #9099 from gojimmypi/pr-cert-test-sizeof
Change certs_test sizeof const to define for Watcom
2025-08-13 14:41:21 -05:00
gojimmypi
f279f9cd71 Change certs_test sizeof const to define for Watcom 2025-08-13 11:58:59 -07:00
Daniel Pouzzner
8d24a30996 Merge pull request #9096 from julek-wolfssl/libssh2-tests-fix
Fix libssh2 tests
2025-08-13 08:42:24 -05:00
Juliusz Sosinowicz
c8c93d2218 Fix libssh2 tests 2025-08-13 14:44:40 +02:00
David Garske
3289b6b3da Merge pull request #9089 from douzzer/20250811-linuxkm-and-other-fixes
20250811-linuxkm-and-other-fixes
2025-08-12 11:40:36 -07:00
Daniel Pouzzner
e24f76bb1e Merge pull request #9057 from SparkiDev/mldsa_x64_asm
ML-DSA/Dilithium: Intel x64 ASM
2025-08-11 23:12:44 -05:00
Daniel Pouzzner
2d1c797b64 fixes from cppcheck-force-source: in src/bio.c:wolfSSL_BIO_vprintf() and
wolfcrypt/src/logging.c:WOLFSSL_MSG_CERT_EX(), add missing gating on
  defined(XVSNPRINTF);

in src/crl.c:CRL_Entry_new(), fix true-positive nullPointerRedundantCheck;

in src/pk.c:_DH_compute_key(), add bounds checking to ForceZero(priv).
2025-08-11 18:12:44 -05:00
Daniel Pouzzner
11d84bea86 wolfcrypt/src/rsa.c: fix improperly handled SAVE_VECTOR_REGISTERS() retval in
wc_CheckProbablePrime_ex(), and in wc_MakeRsaKey(), make sure not to
  RESTORE_VECTOR_REGISTERS() if SAVE_VECTOR_REGISTERS() failed.
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
7b077737a9 src/crl.c: fix nullPointerRedundantCheck in CRL_Entry_free(). 2025-08-11 16:14:32 -05:00
Daniel Pouzzner
29dd6cce98 wolfssl/wolfcrypt/logging.h: add WOLFSSL_MSG_CERT_LOG_EX, give
WOLFSSL_DEBUG_CERTS definitions priority when defining WOLFSSL_MSG_CERT_LOG()
  and WOLFSSL_MSG_CERT_LOG_EX, update documentation in preamble, and fix the
  WOLFSSL_ANDROID_DEBUG definition of WOLFSSL_DEBUG_PRINTF_FIRST_ARGS and the
  WOLFSSL_ESPIDF definition of WOLFSSL_DEBUG_PRINTF();

src/ssl_load.c: use WOLFSSL_MSG_CERT_LOG_EX(), not WOLFSSL_DEBUG_PRINTF(), in
  ProcessFile().
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
f4fefcbd5e configure.ac: for linuxkm, don't set ENABLED_ENTROPY_MEMUSE_DEFAULT to yes on FIPS v5-;
linuxkm/linuxkm_wc_port.h: add WC_SVR_FLAG_NONE;

wolfssl/wolfcrypt/settings.h: for WOLFSSL_LINUXKM setup for WC_RESEED_INTERVAL,
  use UINT_MAX if FIPS v5-;

wolfssl/wolfcrypt/types.h: add definitions for SAVE_NO_VECTOR_REGISTERS2, and
  map no-op SAVE_VECTOR_REGISTERS2() to it.
2025-08-11 16:14:32 -05:00
Daniel Pouzzner
6617f2edf8 wolfcrypt/src/memory.c, wolfcrypt/src/misc.c, and wolfssl/wolfcrypt/misc.h: move
the new implementation of wc_ForceZero from wolfcrypt/src/memory.c to inline in
  wolfcrypt/src/misc.c replacing old ForceZero() implementation, and add a wrapper
  wc_ForceZero() to wolfcrypt/src/memory.c.
2025-08-11 16:14:32 -05:00
Albert Ribes
e36daf41a4 Store in extensions the full octet string (#8967)
* Store in extensions the full octet string

Store in WOLFSSL_X509_EXTENSION.value always the full contents of the
OCTET STRING of the extension, instead of different type of data
depending on the type of extension. Previously this was only done for
unknown extensions.

* Avoid local variables in 'DecodeExtKeyUsageInternal'

There is a great performance loss on configs using 'WOLFSSL_NO_MALLOC',
'WOLFSSL_STATIC_MEMORY' and 'USE_FAST_MATH' if function
'DecodeExtKeyUsageInternal' uses intermediate variables. This can be
observed running the Zephyr test 'wolfssl_test/prj-no-malloc.conf'.

Avoid using intermediate variables, and use raw pointers to the final
destination instead.

* Add missing calls to 'FreeDecodedCert'

* Return error code from 'wolfSSL_ASN1_STRING_into_old_ext_fmt'

* Fix lines larger than 80

* Allow NULL parameters for 'DecodeAuthKeyId'

* Add comment explaining build option '--enable-old-extdata-fmt'

* Test full OCTET STRING in tests/api.c

* wolfSSL_X509V3_EXT_d2i: Honor 'WOLFSSL_SMALL_STACK'

* zephyr/wolfssl_test_no_malloc: Increase test timeout

* wolfSSL_X509V3_EXT_d2i: Extract repeated code into common part

* wolfcrypt: Remove 'WOLFSSL_LOCAL' from .c files

* wolfcrypt: Change location of functions to make diff easier
2025-08-11 10:33:15 -07:00
Sean Parkinson
55f30adb3e Merge pull request #9077 from douzzer/20250807-wc_ForceZero-and-linuxkm-RHEL9v6
20250807-wc_ForceZero-and-linuxkm-RHEL9v6
2025-08-11 21:06:51 +10:00
Daniel Pouzzner
5a402b2254 Merge pull request #9076 from gojimmypi/pr-fence-atomics
Disallow atomics during fence & WOLFSSL_NO_ATOMIC
2025-08-08 23:46:30 -05:00
Daniel Pouzzner
260fca600a Merge pull request #8902 from gojimmypi/pr-cert-logging
Introduce WOLFSSL_DEBUG_CERTS Certificate Debug Messages
2025-08-08 23:44:03 -05:00
Daniel Pouzzner
9236b81ade Merge pull request #9078 from rlm2002/cppCheck
Changes for cppcheck=force-source errors and warnings
2025-08-08 23:29:30 -05:00
Daniel Pouzzner
46394f3da3 Merge pull request #9075 from gojimmypi/pr-small-oids
Force old OID values: WOLFSSL_OLD_OID_SUM for WC_16BIT_CPU
2025-08-08 23:29:09 -05:00
Daniel Pouzzner
db7702f66c Merge pull request #9065 from rlm2002/zd20212
Update fe_448.c from script
2025-08-08 23:28:52 -05:00
Daniel Pouzzner
b3496a04d6 Merge pull request #9073 from holtrop/fix-inconsistent-prototype-parameter-names-wolfssl
Fix inconsistent function prototype parameter names for wolfssl
2025-08-08 23:28:33 -05:00
Daniel Pouzzner
9dc4b71112 Merge pull request #9069 from holtrop/fix-inconsistent-prototype-parameter-names
Fix inconsistent function prototype parameter names for wolfcrypt
2025-08-08 23:28:10 -05:00
Daniel Pouzzner
e6c6ef64df Merge pull request #9047 from miyazakh/rz_update
Update Renesas RZ examples
2025-08-08 23:27:35 -05:00
Daniel Pouzzner
2960844c3e Merge pull request #9068 from holtrop/fix-misra-3.1-violations
Fix MISRA rule 3.1 violations
2025-08-08 23:27:04 -05:00
Ruby Martin
6070ca8499 remove nested check for ssl->options.dtls
move cidSz declaration
2025-08-08 10:46:35 -06:00
Ruby Martin
e631f2e56e add ret check before assigning row value 2025-08-08 10:40:09 -06:00
Ruby Martin
1cfbc92ce2 initialize info var 2025-08-08 10:40:09 -06:00
Ruby Martin
9e3f726b0e add null checks for function arguments that return BAD_FUNC_ARG
update function comment
2025-08-08 10:40:09 -06:00
Ruby Martin
f5a4b13391 initialize lpMsgBuf 2025-08-08 10:40:09 -06:00
Ruby Martin
35ea769c9f add null check to CRL_Entry_free() 2025-08-08 10:40:09 -06:00
Daniel Pouzzner
a821e4cfa2 wolfcrypt/src/memory.c and wolfssl/wolfcrypt/memory.h: add WOLFSSL_API void wc_ForceZero(). 2025-08-07 21:57:56 -05:00
Ruby Martin
948f90251a clear invalidPrintfArgType warnings. initialize wc_Memory* pt to null 2025-08-07 16:48:46 -06:00
Ruby Martin
cf3f7b9911 modify argument for unsigned int
adjust warning for invalidPrintfArgType
2025-08-07 16:48:46 -06:00
gojimmypi
e6ffbfb601 Disallow atomics during fence & WOLFSSL_NO_ATOMIC 2025-08-07 15:18:42 -07:00
Sean Parkinson
9470668538 Merge pull request #9074 from douzzer/20250807-redo-PR8900
20250807-redo-PR8900
2025-08-08 08:12:42 +10:00
Daniel Pouzzner
a01d4c2d5f linuxkm/module_hooks.c: suppress -Wunused-parameter when including crypto/hash.h (for RHEL 9.6). 2025-08-07 17:09:10 -05:00
Takashi Kojo
8bd4fb52c8 Merge pull request #9072 from julek-wolfssl/dtls-replay-test
Test DTLS replay protection
2025-08-08 06:26:15 +09:00
gojimmypi
256836fe6f Force WOLFSSL_OLD_OID_SUM for WC_16BIT_CPU 2025-08-07 11:23:34 -07:00
Juliusz Sosinowicz
0d532cc3f2 Test DTLS replay protection 2025-08-07 19:52:05 +02:00
Daniel Pouzzner
2dfc7eee89 wolfcrypt/src/sp_int.c: in _sp_exptmod_nct(), use 2 bit window if bits <= 21. 2025-08-07 10:26:34 -05:00
Daniel Pouzzner
40506a6ddf Revert "SP int: modular exponentiation constant time" (fixes regression in benchmark "RSA,2048,public").
This reverts commit 219509d7d9.
2025-08-07 10:14:02 -05:00
David Garske
5a8b86da5d Merge pull request #9054 from gojimmypi/pr-please-use-debug-wolfssl
Please use DEBUG_WOLFSSL not WOLFSSL_DEBUG
2025-08-07 07:42:42 -07:00
Ruby Martin
782d0b9828 remove casts 2025-08-07 08:23:38 -06:00
David Garske
b4d186004c Merge pull request #9070 from miyazakh/cb_sha224
Support sha224 cryptocb
2025-08-07 07:07:05 -07:00
Josh Holtrop
e6eac9b920 Fix inconsistent function prototype parameter names for wolfssl 2025-08-07 09:28:50 -04:00
Josh Holtrop
61f1223f1d Fix inconsistent function prototype parameter names for wolfcrypt 2025-08-07 08:02:56 -04:00
Sean Parkinson
648a057147 ML-DSA/Dilithium: Intel x64 ASM
Optimize code knowing it is for Intel x64.
Change signing to calculate one polynomial at a time so that if it isn't
valid then we fail early.
Other minor improvements.
Move the SHA-3 4 blocks at a time assembly into SHA-3 asm file.
Make constants in assembly the same length (front pad with zeros).
2025-08-07 14:01:50 +10:00
Hideki Miyazaki
07b3695b98 wc_Sha224Final also needs to call cb 2025-08-07 09:50:06 +09:00
Hideki Miyazaki
d1bf35b209 add sha224_test() call to cryptocb test 2025-08-07 08:14:26 +09:00
Hideki Miyazaki
ccdef57e8e add sha224 cryptcb 2025-08-07 07:49:53 +09:00