Commit Graph

26052 Commits

Author SHA1 Message Date
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
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
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
David Garske
b4d186004c Merge pull request #9070 from miyazakh/cb_sha224
Support sha224 cryptocb
2025-08-07 07:07:05 -07: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
Daniel Pouzzner
339f7efbf4 Merge pull request #9066 from holtrop/fix-misra-8.2-violations
fe_operations.h: fix MISRA rule 8.2 violations by naming function prototype parameters
2025-08-06 11:04:44 -05:00
Daniel Pouzzner
cc137e99fe Merge pull request #8900 from SparkiDev/rsa_mod_exp_nct
SP int: modular exponentiation constant time
2025-08-06 11:04:28 -05:00
Daniel Pouzzner
753a6b1083 Merge pull request #9063 from SparkiDev/sha3_xorbuf
SHA-3 C code: use xorbuf for little-endian builds
2025-08-06 11:04:10 -05:00
Daniel Pouzzner
76c4ee9ff5 Merge pull request #9056 from SparkiDev/asn_orig_decrypt_content_fix
ASN.1 original: Fix DecryptContent to check sequence len
2025-08-06 11:03:49 -05:00
Daniel Pouzzner
b8463dc5c1 Merge pull request #9062 from kareem-wolfssl/gh9059
Fix wolfSSL_i2d_PublicKey not returning SPKI format for ECC keys.
2025-08-06 11:03:28 -05:00
Daniel Pouzzner
8e5e273aca Merge pull request #9044 from JacobBarthelmeh/docs
add static memory doxygen comments for APIs
2025-08-06 11:02:57 -05:00
Daniel Pouzzner
8e77ee5c2a Merge pull request #9064 from SparkiDev/test_api_c_split_2
api.c: split out more tests into separate files
2025-08-06 10:51:25 -05:00
Daniel Pouzzner
53eedd4b38 Merge pull request #9041 from julek-wolfssl/zero-sha->buffer
Zero sha->buffer
2025-08-06 10:50:53 -05:00
David Garske
8ff0f455f8 Merge pull request #9067 from douzzer/20250805-clang-and-linuxkm-fixes
20250805-clang-and-linuxkm-fixes
2025-08-06 05:59:49 -07:00
Kareem
36e0e3aa53 Fix wolfSSL_i2d_PublicKey not returning SPKI format for ECC keys. 2025-08-05 17:20:47 -07:00
Daniel Pouzzner
034cbb9b97 tests/api.c: fix -Wuninitialized-const-pointer in test_wolfSSL_CertManagerAPI();
wolfcrypt/benchmark/benchmark.c:

* use WC_RELAX_LONG_LOOP() as default definition of TEST_SLEEP(), and remove WC_RELAX_LONG_LOOP() from bench_stats_sym_finish()/bench_stats_asym_finish_ex();
* when WOLFSSL_LINUXKM but !WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS., properly wrap kernel_fpu_begin...end around floating point ops.
2025-08-05 17:05:36 -05:00
Sean Parkinson
dbb75c46c9 ASN.1 original: Fix DecryptContent to check sequence len
Original ASN.1 code wasn't checking that data in a sequence didn't
exceed the length of the sequence.
In particular, the contents of the parameters and the PKCS#5 parameters.
2025-08-06 07:42:09 +10:00
Sean Parkinson
d0f8493c6a SHA-3 C code: use xorbuf for little-endian builds
Instead of loading 64-bits with alignment protection, use xorbuf which
has built in protection.
Only XOR in as much data as cached and XOR padding and rate bit directly
rather than XORing maximum amount after clearing out rest of array and
adding in padding and rate bit.
2025-08-06 07:39:53 +10:00
Sean Parkinson
219509d7d9 SP int: modular exponentiation constant time
Using a 1-bit window size for small exponentsisn't useful.
2025-08-06 07:38:37 +10:00
gojimmypi
7c9327a36b Please use DEBUG_WOLFSSL not WOLFSSL_DEBUG 2025-08-05 12:19:30 -07:00
Josh Holtrop
90d4efa1e6 fe_operations.h: fix MISRA rule 8.2 violations by naming function prototype parameters 2025-08-05 13:09:42 -04:00
David Garske
1693f72af7 Fixes for issues copilot found. 2025-08-05 07:22:04 -07:00
David Garske
649b6ede69 Merge pull request #9058 from kojiws/fix_cid_535964
Fix CID 535964
2025-08-05 07:08:59 -07:00
Sean Parkinson
b40e3d479f api.c: split out more tests into separate files
wolfCrypt PKCS7
wolfCrypt PKCS12
OpenSSL compat ASN.1
OpenSSL compat BN
OpenSSL comppat BIO
OpenSSL comppat Digest
OpenSSL comppat MAC
OpenSSL comppat Cipher
OpenSSL comppat RSA
OpenSSL comppat DH
OpenSSL comppat EC
OpenSSL comppat ECX
OpenSSL comppat DSA
2025-08-05 19:32:56 +10:00
Koji Takeda
bfb2a817e3 Fix CID 535964 2025-08-05 13:25:42 +09:00
David Garske
8e52978153 Merge pull request #9061 from gojimmypi/pr-fix-haproxy-workflow
Update HAProxy build-vtest: fix v3.1.0 and add v3.2.0
2025-08-04 19:57:15 -07:00
gojimmypi
6e795f149c Update HAProxy build-vtest: fix v3.1.0 and add v3.2,0 2025-08-04 12:38:27 -07:00
JacobBarthelmeh
c22c37df09 Merge pull request #9055 from rlm2002/zd20212
Coverity changes
2025-08-04 10:34:29 -06:00
Ruby Martin
598a3e6232 check return value of wc_DhGetNamedKeyParamSize 2025-08-01 14:56:35 -06:00
JacobBarthelmeh
040e2102a8 Merge pull request #9049 from kojiws/import_mldsa_seed_pkcs8_reapply
Reapply - Import ML-DSA's seed from PKCS8 file
2025-08-01 14:34:09 -06:00
JacobBarthelmeh
367e3e4246 fix for wolfSSL_StaticBufferSz_ex function signature 2025-08-01 10:32:41 -06:00
JacobBarthelmeh
0392ee009f Merge pull request #9033 from anhu/mlkem-hybrid-draft-names-wolfssl
Rename ML-KEM hybrids to match IETF Draft.
2025-08-01 10:21:54 -06:00
JacobBarthelmeh
65e7f2c40f Merge pull request #9051 from lealem47/zd20288
Sniffer: Fix infinite recursion caused by an OOO appData packet
2025-07-31 14:50:36 -06:00
JacobBarthelmeh
86adcd6c8e Merge pull request #9048 from douzzer/20250730-linuxkm-tweaks
20250730-linuxkm-tweaks
2025-07-31 14:36:56 -06:00
Daniel Pouzzner
1152d612a6 wolfcrypt/benchmark/benchmark.c: smallstack refactors for bench_mlkem() and bench_dilithiumKeySign(), and globally replace stray uses of fprintf(stderr, ...) with printf(...) for portability. 2025-07-31 11:30:42 -05:00
Daniel Pouzzner
bbd606538a linuxkm/linuxkm_wc_port.h, linuxkm/x86_vector_register_glue.c, linuxkm/Kbuild:
* rename can_save_vector_registers_x86(), save_vector_registers_x86(), and restore_vector_registers_x86(), with wc_ prefix, and properly export them;
* move setup for WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS outside BUILDING_WOLFSSL gate;
* fix !BUILDING_WOLFSSL bindings for DISABLE_VECTOR_REGISTERS() to properly fall through to no-ops in !WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS configs, and properly #error if WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS but !CONFIG_X86;

.github/workflows/linuxkm.yml: --enable-linuxkm-benchmarks for additional coverage.
2025-07-31 10:37:39 -05:00
Lealem Amedie
0e8aab241d Sniffer: Fix infinte recursion caused by an OOO appData packet 2025-07-31 09:31:59 -06:00
Anthony Hu
6f66f4fda3 Use correct string in the unit tests. 2025-07-31 10:35:32 -04:00
Koji Takeda
2891815965 Fix errors on #9000 2025-07-31 16:04:22 +09:00
Koji Takeda
09deacbe8f Revert "Merge pull request #9045 from douzzer/20250730-revert-PR9000"
This reverts commit 70af2be5ab, reversing
changes made to 46347173b2.
2025-07-31 14:14:51 +09:00
Daniel Pouzzner
c353052e54 linuxkm/linuxkm_wc_port.h:
* move enum wc_svr_flags out of BUILDING_WOLFSSL guard;
* add DISABLE_VECTOR_REGISTERS() and REENABLE_VECTOR_REGISTERS() definitions for !BUILDING_WOLFSSL;
* add #include <linux/spinlock.h> to !WOLFSSL_LINUXKM_USE_MUTEXES implementation to fix compilation (and add usability) to caller code;

linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_ctx_clear(), fix error-path deallocation of locked object;

wolfcrypt/benchmark/benchmark.c:

* in FIPS v6+ builds, and FIPS linuxkm v5+, check retval from wc_AesEncryptDirect() and wc_AesDecryptDirect();
* add WC_RELAX_LONG_LOOP() in bench_stats_sym_finish() and bench_stats_asym_finish_ex();

wolfcrypt/test/test.c: fix rng_seed_test() with correct test vectors for the relevant combinations of features, and gate the test out if there are user override defines for ENTROPY_SCALE_FACTOR or SEED_BLOCK_SZ.
2025-07-30 22:15:05 -05:00
JacobBarthelmeh
ee4e511a01 remove trailing white spaces 2025-07-30 17:02:23 -06:00
JacobBarthelmeh
70af2be5ab Merge pull request #9045 from douzzer/20250730-revert-PR9000
20250730-revert-PR9000
2025-07-30 16:59:19 -06:00
JacobBarthelmeh
6a01122c47 add static memory doxygen comments for APIs 2025-07-30 14:50:44 -06:00