Devin AI
9c0dbe622d
Add missing Federal PKI Certificate Policy OIDs
...
Co-Authored-By: kareem@wolfssl.com <kareem@wolfssl.com >
2025-03-25 20:48:32 +00:00
Devin AI
8f9acb7543
Add ECA PKI and Federal PKI Certificate Policy OIDs
...
Co-Authored-By: kareem@wolfssl.com <kareem@wolfssl.com >
2025-03-24 18:41:34 +00:00
Devin AI
e622b5c6d0
Add Department of Defense (DoD) Public Key Infrastructure (PKI) Certificate Policy OIDs
...
Co-Authored-By: kareem@wolfssl.com <kareem@wolfssl.com >
2025-03-24 18:34:39 +00:00
David Garske
0cc0bb0afe
Merge pull request #8586 from douzzer/20250321-siphash-armasm
...
20250321-siphash-armasm
2025-03-23 14:00:17 -07:00
Daniel Pouzzner
0cea9c09f7
src/internal.c: fix -Wdeclaration-after-statement in ProcessCSR_ex().
2025-03-22 23:51:59 -05:00
Daniel Pouzzner
29a0992ed5
wolfssl/wolfcrypt/settings.h: for WOLFCRYPT_FIPS_RAND, don't define USE_FAST_MATH, and make sure NO_BIG_INT is defined.
2025-03-22 22:21:23 -05:00
Daniel Pouzzner
3cad38a1ca
wolfcrypt/test/test.c: gate wc_CmacFree()s in cmac_test() on !HAVE_FIPS || FIPS_VERSION3_GE(6,0,0); fix some return codes in hash_test().
2025-03-22 17:19:37 -05:00
Daniel Pouzzner
60ffde6d7c
wolfcrypt/test/test.c: fix error-path various uninitialized data uses and memory leaks.
2025-03-22 13:40:31 -05:00
Daniel Pouzzner
190f46ef23
wolfcrypt/test/test.c: fix -Wdeclaration-after-statement in sm3_test().
2025-03-22 01:22:19 -05:00
Daniel Pouzzner
1587f21938
fix a couple -Wdeclaration-after-statements.
2025-03-21 22:33:45 -05:00
Daniel Pouzzner
777d42fabe
wolfcrypt/src/siphash.c: gate armasm on defined(WOLFSSL_ARMASM), not !defined(WOLFSSL_NO_ASM).
2025-03-21 21:12:41 -05:00
Daniel Pouzzner
576c489b0f
Merge pull request #8583 from lealem47/fips_linuxkm
...
Remove linuxkm-pie dependency for FIPS linuxkm
2025-03-21 21:09:04 -05:00
David Garske
defcaa192f
Merge pull request #8582 from douzzer/20250321-Wdeclaration-after-statements-and-Kyber-fixes
...
20250321-Wdeclaration-after-statements-and-Kyber-fixes
2025-03-21 16:40:38 -07:00
Daniel Pouzzner
e3fe575720
tests/api/test_evp.c: fix gating in test_wolfSSL_EVP_CIPHER_type_string().
2025-03-21 17:52:33 -05:00
Daniel Pouzzner
a57326d500
fix whitespace in tests/api/test_evp.c.
2025-03-21 16:56:48 -05:00
Daniel Pouzzner
b0a16a3d94
configure.ac: remove PWDBASED and PBKDF2 from fips=lean-aesgcm.
2025-03-21 16:56:24 -05:00
Lealem Amedie
2fdac57a69
Remove linuxkm-pie dependency for FIPS linuxkm
2025-03-21 15:36:31 -06:00
Daniel Pouzzner
1e89002762
fix various -Wdeclaration-after-statements, and add
...
-Wdeclaration-after-statement to .github/workflows/pq-all.yml.
rearrange code/gating in wolfcrypt/src/wc_mlkem.c:mlkemkey_encapsulate() for
clarity and to fix a -Wdeclaration-after-statement.
also, made mlkem_encapsulate_c() and mlkem_encapsulate() return error code
(currently always zero) rather than void, for consistency.
configure.ac: fix Kyber/ML-KEM option setup.
2025-03-21 15:46:44 -05:00
David Garske
9a3ea6fd73
Merge pull request #8568 from embhorn/msvs_pqc_build
...
Fix MSVS build issues with PQC config
2025-03-21 12:41:19 -07:00
David Garske
294e4c79a8
Merge pull request #8578 from philljj/coverity_unchecked_ret
...
Coverity unchecked return value
2025-03-21 10:05:29 -07:00
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
Eric Blankenhorn
f663ed28b6
Fix MSVS build issues with PQC config
2025-03-21 11:49:55 -05: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
jordan
8d0931df9d
coverity: check mp radix ret values.
2025-03-21 10:08:13 -04:00
jordan
15ac07c9ef
coverity: check correct ret value.
2025-03-21 09:25:28 -04:00
jordan
3a02ab286c
coverity: unchecked return value with mp_copy.
2025-03-21 08:59:31 -04:00
jordan
7c831263c8
coverity: unchecked return value in EchHashHelloInner.
2025-03-21 08:48:45 -04: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
Brett Nicholas
b7764e9308
add support for WC_NO_DEFAULT_DEVID to configure
2025-03-13 14:51:05 -06:00
Anthony Hu
85e9f73868
Check if WOLFSSL_SHAKExxx is not defined
2025-03-13 13:22:20 -04:00
JacobBarthelmeh
2125cbd98e
Merge pull request #8552 from douzzer/20250312-linuxkm-lkcapi-aes-cfb-fixes
...
20250312-linuxkm-lkcapi-aes-cfb-fixes
2025-03-12 21:06:27 -06:00
Hideki Miyazaki
a18ac7c3ec
fix PRB test failure
2025-03-13 11:12:26 +09:00
Hideki Miyazaki
9188e0a801
fix PR test failures
2025-03-13 09:48:34 +09:00
Hideki Miyazaki
b39c2206d7
modified client chain at server side
...
added unit test
2025-03-13 09:39:13 +09:00
Hideki Miyazaki
d6c0184fda
fix qt jenkins failure
2025-03-13 09:39:13 +09:00
Sean Parkinson
74454715ec
ECH: generate multiple configs and rotate echConfigs
...
Change wolfSSL_CTX_GenerateEchConfig to generate multiple configs, add
functions to rotate the server's echConfigs.
2025-03-13 10:24:53 +10:00
Sean Parkinson
93acd466a7
Merge pull request #6805 from jpbland1/ech-hello-retry
...
Ech hello retry request
2025-03-13 09:17:58 +10:00
Brett Nicholas
8e3e60e4e2
adds WC_NO_DEFAULT_DEVID to disallow automatic use of "default" devId
2025-03-12 16:53:25 -06:00
Daniel Pouzzner
c80a050c29
linuxkm/lkcapi_glue.c: fix aes-cfb wrappers, and add
...
WOLFSSL_DEBUG_TRACE_ERROR_CODES support for EINVAL/ENOMEM/EBADMSG;
configure.ac: remove ENABLED_EXPERIMENTAL requirement for
--enable-linuxkm-lkcapi-register=cfb(aes);
linuxkm/module_hooks.c: omit "skipping full wolfcrypt_test" message if
wc_RunAllCast_fips() was run.
2025-03-12 17:08:04 -05:00
Kareem
88fdfdd52d
Change #pragma GCC macros in sp_int.c to PRAGMA_GCC macros to avoid calling them on unsupported toolchains.
2025-03-12 12:12:24 -07:00
Lealem Amedie
950be33c57
Insert STM32WBA52xx in the right order
2025-03-12 11:58:18 -06:00
Lealem Amedie
e13bf4bd7c
Add STM32WBA52xx to known macros
2025-03-12 11:08:26 -06:00
Kaleb Himes
517f4bd561
Merge pull request #8549 from douzzer/20250311-aesxts-stream-armasm-and-unit-test-wolfcrypt-test
...
20250311-aesxts-stream-armasm-and-unit-test-wolfcrypt-test
2025-03-12 10:18:39 -06:00
Daniel Pouzzner
d2fc77ae93
wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK()s around pkcs7enveloped_test() and pkcs7authenveloped_test() exposed by "--enable-fips=ready --enable-pkcs7 --disable-harden".
2025-03-11 17:10:54 -05:00
Lealem Amedie
96b8d72c4f
Add support for STM32WBA
2025-03-11 15:16:26 -06:00
Daniel Pouzzner
9a84dfc86a
add wolfcrypt_test() to unit_test(); remove call to HashTest() and delete
...
tests/hash.c (entire file duplicates code in wolfcrypt/test/test.c, originally
ctaocrypt/test/test.c).
2025-03-11 14:59:07 -05:00
Daniel Pouzzner
2de3d46971
wolfcrypt/test/test.c: in cryptocb_test(), fix error code from
...
wc_CryptoCb_RegisterDevice(), and call wc_CryptoCb_UnRegisterDevice() at
cleanup.
2025-03-11 14:51:25 -05:00
Daniel Pouzzner
2a4dbbf545
configure.ac: remove mutual exclusion of armasm and WOLFSSL_AESXTS_STREAM --
...
this now works, and uses armasm-accelerated _AesEcb{En,De}crypt() via
_AesXtsHelper(). also, add -DNO_CRYPT_TEST to CFLAGS in builds with
$ENABLED_CRYPT_TESTS = no.
2025-03-11 14:47:32 -05:00
Devin AI
7c84200dda
Add WOLFSSL_CLU option to cmake.yml workflow
...
Co-Authored-By: eric@wolfssl.com <eric@wolfssl.com >
2025-03-11 17:05:26 +00:00
Devin AI
60dc30326c
Add WOLFSSL_CLU option to CMakeLists.txt
...
Co-Authored-By: eric@wolfssl.com <eric@wolfssl.com >
2025-03-11 15:50:31 +00:00
Daniel Pouzzner
fb23b487eb
Merge pull request #8546 from kaleb-himes/WCv6.0.0-RC5-UPDT
...
Update fips-check.sh to pickup XTS streaming support on aarch64
2025-03-10 18:09:25 -05:00
Anthony Hu
b608946549
Guard fix.
2025-03-10 17:32:58 -04:00
kaleb-himes
e7b3fec1fb
Update fips-check.sh to pickup XTS streaming support on aarch64
2025-03-10 13:37:42 -06:00
John Bland
c48b4f2d86
add missing echX NULL check
2025-03-10 11:11:27 -04:00
John Bland
9b65bc22f1
fix uninitialized variable error
2025-03-10 10:18:48 -04:00
John Bland
a344ba1eb2
add missing echConfigs check
2025-03-10 09:35:40 -04:00
John Bland
1fd952d6d0
fix bad ech transaction hash calculations
2025-03-10 09:12:13 -04:00
John Bland
8ff08740f8
Merge branch 'master' into ech-hello-retry
2025-03-10 03:37:27 -04:00
Sean Parkinson
a7690ca24b
ML-KEM/Kyber: finish name change
2025-03-10 08:37:14 +10:00
Sean Parkinson
e7ef3ab606
Digest tests: add more tests
...
Add testing of MD2 and Md4.
Add more tests of functions in hash.c.
Reformat data to match what is output by PRINT_DATA macro.
2025-03-10 08:13:06 +10:00
jordan
f91f9bf037
coverity: pacify test_md5 uninitialized scalar variable warning.
2025-03-09 16:03:21 -04:00
David Garske
ad8eb760e3
Merge pull request #8540 from douzzer/20250307-misc-xorbuf-optimizer
...
20250307-misc-xorbuf-optimizer
2025-03-08 15:51:54 -08:00
Daniel Pouzzner
a84831c47f
disable .github/workflows/msys2.yml -- failing unit test on its ucrt64 scenario, then the test script wedged on retry after successfully make checking.
2025-03-07 20:11:58 -06:00
Daniel Pouzzner
cbcca93fde
configure.ac: print a warning, not an error, on "Conflicting asm settings", for backward compatibility.
2025-03-07 19:52:26 -06:00
Daniel Pouzzner
66376bed28
wolfcrypt/src/misc.c: in xorbufout() and xorbuf(), call XorWords() directly via a simplified path if all args are already aligned to WOLFSSL_WORD_SIZE (fixes performance regression from dc2e2631bc
).
...
configure.ac: add a "Conflicting asm settings" error check at end, since our configuration currently blows up if --enable-intelasm and --disable-asm are combined.
2025-03-07 19:52:26 -06:00
Daniel Pouzzner
c3f24568ff
Merge pull request #8520 from JacobBarthelmeh/pkcs7_verify_stream
...
PKCS7 verify and decode indefinite length support
2025-03-07 18:47:30 -06:00
Daniel Pouzzner
27ed748867
Merge pull request #8504 from rlm2002/msys2
...
Add MSYS2 build CI test
2025-03-07 17:58:50 -06:00
Anthony Hu
6d6c5f520b
unit tests
2025-03-07 18:30:41 -05:00
JacobBarthelmeh
8dd614430a
clang-tidy fixes for test case
2025-03-07 16:04:57 -07:00
David Garske
aff17b7139
Merge pull request #8541 from night1rider/zephyr-asm
...
Adding missing files for zephyr compile for ASM
2025-03-07 14:38:51 -08:00
msi-debian
c8eb3b07a0
Kconfig update for new setting
2025-03-07 14:19:33 -07:00
msi-debian
3587e28966
Adding missing files for zephyr compile for ASM
2025-03-07 14:16:02 -07:00
JacobBarthelmeh
09ffdeb897
fix for different reported conversion warnings
2025-03-07 11:52:01 -07:00
jordan
1b404e8449
tests quic: fix assignment where comparison intended warning.
2025-03-07 13:38:40 -05:00
Anthony Hu
f8506c3e04
Allow critical alt and basic constraints extensions
...
Also properly track pathlen.
2025-03-07 13:06:06 -05:00
JacobBarthelmeh
53fa4ffbaf
conversion warning fixes
2025-03-07 11:03:12 -07:00
jordan
0950955b14
tests quic: fix c89 clang tidy warning.
2025-03-07 10:32:25 -05:00
jordan
40588574ce
tests quic: clean up line lengths.
2025-03-07 09:19:13 -05:00
jordan
cad2189e80
tests quic: fix error handling.
2025-03-07 08:08:37 -05:00
Sean Parkinson
5729923469
Merge pull request #8538 from douzzer/20250306-Wconversion-fixes-and-tests
...
20250306-Wconversion-fixes-and-tests
2025-03-07 13:22:05 +10:00
Daniel Pouzzner
3ada6e29aa
.github/workflows/wolfCrypt-Wconversion.yml: remove -m32 scenario due to missing dependencies, and render early the full config under test for easier debugging.
2025-03-06 17:48:03 -06:00
Daniel Pouzzner
932513a41e
fixes for various -W*conversions in sp_int.c, asn.c, fe_operations.c, fe_448.c, ge_448.c. also, add support for NO_INT128, and add .github/workflows/wolfCrypt-Wconversion.yml.
2025-03-06 16:08:38 -06:00
jordan
6a45c8ee0e
tests quic: fix uninitialized vars.
2025-03-06 16:14:39 -05:00
jordan
8d90e321c4
coverity: tests quic cleanup.
2025-03-06 15:32:21 -05:00
kareem-wolfssl
acc096c2ea
Merge pull request #8533 from dgarske/eccnb
...
Fixes for ECC non-blocking tests
2025-03-06 11:08:43 -07:00
JacobBarthelmeh
8e98a41401
fix for build with NO_PKCS7_STREAM
2025-03-06 10:43:02 -07:00
David Garske
547519265a
Merge pull request #8534 from douzzer/20250305-linuxkm-LKCAPI-AES-CBC-fixes
...
20250305-linuxkm-LKCAPI-AES-CBC-fixes
2025-03-06 08:44:05 -08:00
Daniel Pouzzner
f572cffa31
.wolfssl_known_macro_extras: remove unneeded entry.
2025-03-05 18:44:08 -06:00
JacobBarthelmeh
b039e055df
clang-tidy warning of garbage value used
2025-03-05 17:19:53 -07:00
David Garske
1bd3bf1b66
Merge pull request #8531 from night1rider/zephyr-fs-rewind-fix
...
Fix for missing rewind function in zephyr
2025-03-05 16:04:36 -08:00
David Garske
dfc6a52db5
Fixes for ECC non-blocking tests. Added example user_settings.h build test. Demonstrate ECC 256, 384 and 521 bit.
2025-03-05 15:58:51 -08:00
Daniel Pouzzner
d82a7b10c5
wolfcrypt/src/evp.c: fix a name conflict around "cipherType" that provokes -Wshadow on gcc pre-4v8.
2025-03-05 17:56:08 -06:00
Daniel Pouzzner
dc2e2631bc
linuxkm: various fixes for LKCAPI wrapper for AES-CBC (now passing kernel-native
...
self-test and crypto fuzzer), and de-experimentalize it.
wolfssl/wolfcrypt/types.h: add definitions for WOLFSSL_WORD_SIZE_LOG2.
wolfcrypt/src/misc.c: fix xorbuf() to make the XorWords() reachable; also,
refactor integer division and modulus ops as masks and shifts, and add pragma
to suppress linuxkm FORTIFY_SOURCE false positive -Wmaybe-uninitialized.
2025-03-05 17:56:08 -06:00
Daniel Pouzzner
7d102a1816
Merge pull request #8530 from SparkiDev/test_dual_alg_support_dates_fix
...
Test daul alg support: set before and after dates
2025-03-05 17:55:38 -06:00
JacobBarthelmeh
624233fb98
update test case to account for NO_DES3 build and resolve clang tidy warnings
2025-03-05 16:28:26 -07:00
Devin AI
c1215aa93b
Fix wc_MlKemKey_Free to return int instead of void
...
Co-Authored-By: sean@wolfssl.com <sean@wolfssl.com >
2025-03-05 22:42:19 +00:00
Devin AI
f4b770c5ab
Update Kyber APIs to ML-KEM APIs
...
- Change struct KyberKey to struct MlKemKey
- Add backward compatibility typedef for KyberKey
- Add function declarations for new wc_MlKemKey_ functions
- Add backward compatibility #defines to map old wc_KyberKey APIs to new wc_MlKemKey APIs
- Update wc_MlKemKey_Init to take key first and type second
- Create new files wc_mlkem.h and wc_mlkem.c with updated content
- Update internal APIs with lowercase kyberkey to lowercase mlkemkey
Co-Authored-By: sean@wolfssl.com <sean@wolfssl.com >
2025-03-05 22:38:07 +00:00
JacobBarthelmeh
68e483d196
refactor of decode envelop for edge cases
2025-03-05 15:24:02 -07:00
Daniel Pouzzner
9fc7e42554
Merge pull request #8507 from SparkiDev/ct_fixes_3
...
Constant time code: improved implementations
2025-03-05 15:17:23 -06:00
msi-debian
7ea89a62ba
Fix for missing rewind function in zephyr
2025-03-05 12:49:58 -07:00
Sean Parkinson
eaa61c2208
Test daul alg support: set before and after dates
...
Must set before and after dates into certificate structure as creation
of certificate does not fill in those fields but uses the current time.
The current time may change by a second between signings.
2025-03-05 16:15:55 +10:00
David Garske
a073868cf0
Merge pull request #8527 from SparkiDev/sp_int_asm_fixes_1
...
SP int: inline asm improvements and mont reduce simplifications
2025-03-04 14:45:16 -08:00
JacobBarthelmeh
b75976692e
spelling fix and code formatting
2025-03-04 14:31:23 -07:00
David Garske
49122f36e9
Merge pull request #8526 from gasbytes/add-middlebox-compat-to-enable-jni
...
Enable TLS 1.3 middlebox compatibility by default with --enable-jni
2025-03-04 09:11:28 -08:00
JacobBarthelmeh
4124c824ca
refactor decrypt content init call
2025-03-04 09:29:36 -07:00
Sean Parkinson
caf801f211
SP int: inline asm improvements and mont reduce simplifications
...
SP int inline asm:
- allow input variables to be either registers or memory for Intel
x86/x64 (minor performance improvement)
- don't have memory in clobber list if output variables are registers
- remove empty clobber line in arm32/thumb2 code for old versions of
gcc
_sp_mont_red():
- simplify the code by not using extra variables
- don't add to j in for loop check.
2025-03-04 16:16:26 +10:00
David Garske
9b16ed5da4
Merge pull request #8518 from lealem47/evp_update_null_cipher
...
Add NULL_CIPHER_TYPE support to wolfSSL_EVP_CipherUpdate
2025-03-03 14:03:57 -08:00
David Garske
2b099daee0
Merge pull request #8511 from SparkiDev/intel_sha_not_avx1
...
SHA256: Intel flags has SHA but not AVX1 or AVX2
2025-03-03 13:59:10 -08:00
Ruby Martin
b64f509d1b
define NO_WRITE_TEMP_FILES
2025-03-03 10:14:06 -07:00
Reda Chouk
3e5e81c45f
Enable TLS 1.3 middlebox compatibility by default with --enable-jni
...
Adding -DWOLFSSL_TLS13_MIDDLEBOX_COMPAT flag to the default
compilation flags when --enable-jni is used.
Related PRs in other repositories:
- wolfSSL/wolfssljni#255
- wolfSSL/testing#845
2025-03-03 14:12:20 +01:00
JacobBarthelmeh
fcf88f16e6
spelling fixes and free decrypt structs on error case
2025-03-01 15:43:59 -07:00
David Garske
72d08a1a79
Merge pull request #8522 from douzzer/20250228-fixes
...
20250228-fixes
2025-02-28 18:17:31 -08:00
Daniel Pouzzner
058014b3eb
src/ssl.c: add missing !NO_WOLFSSL_SERVER gate around wolfSSL_get_servername().
2025-02-28 19:07:03 -06:00
Daniel Pouzzner
d6b5c8e8ee
src/ssl_asn1.c: fix misspelling cause by overbroad search+replace.
2025-02-28 18:25:41 -06:00
Daniel Pouzzner
de6ac319cc
.wolfssl_known_macro_extras: remove unneeded entries.
2025-02-28 18:01:49 -06:00
Lealem Amedie
59a987aa00
Remove trailing whitespace
2025-02-28 16:06:24 -07:00
JacobBarthelmeh
b781ac6c29
asn to der macro gaurds and co-exist build fix
2025-02-28 15:42:24 -07:00
Daniel Pouzzner
9c3816089c
tests/api.c: disable test_wolfSSL_OCSP_parse_url() if WOLFSSL_SM2 || WOLFSSL_SM3.
2025-02-28 15:58:54 -06:00
JacobBarthelmeh
6020bf2368
initialize test variables and fix async build
2025-02-28 14:46:42 -07:00
JacobBarthelmeh
ea9f044bcc
spelling fixes and return value fix
2025-02-28 14:34:51 -07:00
Daniel Pouzzner
50a3be6df7
wolfcrypt/src/sp_int.c. src/ssl_asn1.c. src/internal.c: rename several declarations to avoid shadowing global functions, for the convenience of obsolete (pre-4v8) gcc -Wshadow.
2025-02-28 15:29:58 -06:00
Daniel Pouzzner
f7b911f5cd
src/ssl.c, src/internal.c: fix leak in wolfSSL_get_ciphers_compat(): fix gating (OPENSSL_EXTRA, not OPENSSL_ALL) in FreeSuites() re .suitesStack and .clSuitesStack, and similarly fix gating on the implementation of wolfSSL_sk_SSL_CIPHER_free(() and related.
...
src/ssl_sess: suppress false positive clang-analyzer-unix.Malloc "Argument to 'free()' is the address of a global variable".
2025-02-28 15:23:43 -06:00
JacobBarthelmeh
ea387323c3
remove white space and add macro guard around test case
2025-02-28 14:23:25 -07:00
JacobBarthelmeh
638d9961d2
passing the rest of the PKCS7 unit tests
2025-02-28 14:23:24 -07:00
JacobBarthelmeh
7c6cd1deea
passing a unit test
2025-02-28 14:23:24 -07:00
JacobBarthelmeh
1e254c014d
application decryption successful
2025-02-28 14:23:24 -07:00
JacobBarthelmeh
b1b1c15b35
add content stream output callback for VerifySignedData function
2025-02-28 14:23:24 -07:00
Lealem Amedie
08a314e57e
Add test src file to CMake build
2025-02-28 11:54:19 -07:00
Lealem Amedie
22221e5007
Add NULL_CIPHER_TYPE support to wolfSSL_EVP_CipherUpdate
2025-02-28 11:44:30 -07:00
Daniel Pouzzner
7698546531
Merge pull request #8515 from SparkiDev/test_sha512_be
...
Tests api.c: sha512 big endian
2025-02-28 00:51:54 -06:00
Sean Parkinson
14651edae0
Tests api.c: sha512 big endian
...
Don't need to reverse bytes for SHA-512 Transform API.
2025-02-28 14:58:43 +10:00
Sean Parkinson
4f8a39cbcf
Merge pull request #8498 from rizlik/ocsp_fixes
...
OCSP openssl compat fixes
2025-02-28 13:42:50 +10:00
Daniel Pouzzner
d63a180f95
Merge pull request #8513 from SparkiDev/api_c_split_ciphers
...
Test api.c: split out MACs and ciphers
2025-02-27 14:00:36 -06:00
Marco Oliverio
194db7e844
tests: gate ocsp test on SM2 || SM3
...
we don't properly support SM2 and SM3 hash algo id properly yet
2025-02-27 19:38:46 +00:00
Marco Oliverio
83f5644549
ocsp: Fix OcspEncodeCertID SetAlgoID return check
2025-02-27 19:38:44 +00:00
Marco Oliverio
814f0f8a09
Refactor CERT_ID encoding as per review comments
2025-02-27 12:50:37 +00:00
Sean Parkinson
48300352c6
Test api.c: split out MACs and ciphers
2025-02-27 15:52:39 +10:00
Sean Parkinson
7d0ef5bd42
Merge pull request #8512 from douzzer/20250226-fixes
...
20250226-fixes
2025-02-27 14:48:05 +10:00
Daniel Pouzzner
f7ddc49487
linuxkm/linuxkm_wc_port.h: add #error if the user tries to use the kernel crypto fuzzer with FIPS AES-XTS (kernel bug).
...
src/internal.c: fix shiftTooManyBitsSigned in DefTicketEncCb().
tests/api/test_sha256.c and wolfssl/wolfcrypt/sha256.h: gate raw transform APIs (wc_Sha256Transform(), wc_Sha256FinalRaw()) and tests on !defined(WOLFSSL_KCAPI_HASH) && !defined(WOLFSSL_AFALG_HASH).
move enum wc_HashFlags from wolfssl/wolfcrypt/hash.h to wolfssl/wolfcrypt/types.h to resolve circular dependency detected by cross-armv7m-armasm-thumb-fips-140-3-dev-sp-asm-all-crypto-only.
add FIPS_VERSION_GE(7,0) gates to new null-arg tests in test_wc_Shake{128,256}_*().
optimize ByteReverseWords() for cases where only one operand is unaligned, and add correct handling of unaligned data in ByteReverseWords64() to resolve unaligned access sanitizer report in cross-aarch64_be-all-sp-asm-unittest-sanitizer.
2025-02-26 20:55:56 -06:00
Sean Parkinson
0a6a8516f9
Merge pull request #8488 from dgarske/stm32h7s
...
Support for STM32H7S (tested on NUCLEO-H7S3L8)
2025-02-27 10:34:41 +10:00
Sean Parkinson
a0d6afbb04
Merge pull request #8505 from jmalak/ow-fixes
...
various fixes for Open Watcom build
2025-02-27 10:31:19 +10:00
Daniel Pouzzner
183d9b44d1
Merge pull request #8509 from kaleb-himes/WCv6.0.0-RC4-CHECKIN
...
Disable XTS-384 as an allowed use in FIPS mode
2025-02-26 18:24:12 -06:00
Sean Parkinson
c290907228
Merge pull request #8510 from wolfSSL/devin-lifeguard/update-rules-d59f9c48
...
Update Devin Lifeguard rules
2025-02-27 09:40:48 +10:00
Sean Parkinson
99f25c6399
Merge pull request #8494 from Laboratory-for-Safe-and-Secure-Systems/various
...
Various fixes and improvements
2025-02-27 09:40:06 +10:00
Sean Parkinson
b104887042
SHA256: Intel flags has SHA but not AVX1 or AVX2
...
Reversal of bytes when IS_INTEL_SHA only is same as when AVX1 or AVX2.
2025-02-27 09:25:13 +10:00
David Garske
92ed003a58
Merge pull request #8502 from SparkiDev/pkcs_pad
...
PKCS Pad: public API to do PKCS padding
2025-02-26 15:17:50 -08:00
David Garske
512f928650
Fix cast warnings with g++.
2025-02-26 14:45:23 -08:00
Sean Parkinson
f204ac8363
PKCS Pad: public API to do PKCS padding
...
PKCS padding adds length of padding as repeated padding byte.
Use the new function in all places.
2025-02-27 08:28:53 +10:00
devin-ai-integration[bot]
615d7229b0
Update Devin Lifeguard rules
2025-02-26 22:19:57 +00:00
David Garske
307b71c0f4
Merge pull request #8508 from SparkiDev/arm_asm_sha512_384
...
ARM ASM: available for SHA-384 only too
2025-02-26 14:11:27 -08:00
David Garske
557abcf76a
Support for STM32H7S (tested on NUCLEO-H7S3L8). It supports hardware crypto for RNG, Hash, AES and PKA. Added future config option for DTLS v1.3. Support DTLS v1.3 only reduce code size (tested with: ./configure --enable-dtls13 --enable-dtls --disable-tlsv12 CFLAGS="-DWOLFSSL_SEND_HRR_COOKIE"
).
2025-02-26 14:00:48 -08:00
kaleb-himes
738462a6f0
Remove redundent gates
2025-02-26 12:03:25 -07:00
kaleb-himes
b8a383469a
Disable 192-bit tests in FIPS mode
2025-02-26 11:09:31 -07:00
Ruby Martin
0c413e75c6
add environment matrix to msys workflow
2025-02-26 09:07:16 -07:00
Ruby Martin
439012dd57
adjust xfopen commands
2025-02-26 09:05:53 -07:00
Ruby Martin
6fed2fe447
include cygwin and msys2 ostypes to oscp-stapling tests
2025-02-26 09:05:53 -07:00
Ruby Martin
57646a88ff
check if clientfd != SOCKET_INVALID not 0, add check if USE_WINDOWS_API
...
not defined
2025-02-26 09:03:55 -07:00
Ruby Martin
d37e566d5d
msys2 build file
2025-02-26 08:10:59 -07:00
kaleb-himes
9063093993
Disable XTS-384 as an allowed use in FIPS mode
2025-02-26 07:38:45 -07:00
Tobias Frauenschläger
75d63071df
Fix memory leak in handshake
...
Make sure peer dilithium keys are properly freed.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:34:00 +01:00
Tobias Frauenschläger
491e70be7a
PSK fix
...
Fix compilation in case PSK is enabled, not Session tickets are
disabled.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:33:59 +01:00
Tobias Frauenschläger
3d4ec1464b
Minor Dilithium fix
...
Fix compilation in case caching is enabled.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:33:59 +01:00
Tobias Frauenschläger
af4017132d
LMS fixes
...
* Add support for CMake
* Add support for Zephyr
* Make sure the internal key state is properly handled in case a public
key is imported into a reloaded private key.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:33:59 +01:00
Tobias Frauenschläger
9db5499dbd
Update CryptoCb API for Dilithium final standard
...
Add context and preHash metadata.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:33:59 +01:00
Tobias Frauenschläger
be6888c589
Fixes for Dilithium in TLS handshake
...
Some fixes to better handle Dilithium keys and signatures in the TLS
handshake.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-26 15:33:59 +01:00
Jiri Malak
b5ba7a6fcc
correct Open Watcom linker extra libraries
2025-02-26 11:03:36 +01:00
Jiri Malak
47d130440d
remove now useless __WATCOMC__ macro check
2025-02-26 10:26:28 +01:00
Jiri Malak
17a0081261
correct line length to be shorter then 80 characters
2025-02-26 08:02:43 +01:00
Sean Parkinson
9e9efeda28
ARM ASM: available for SHA-384 only too
...
Add HAVE_SHA384 to check for whether assembly code is available.
2025-02-26 16:10:21 +10:00
Sean Parkinson
4752bd2125
Constant time code: improved implementations
...
Change constant time code to be faster.
2025-02-26 11:52:09 +10:00
Jiri Malak
a83cf8584d
add new macro __UNIX__ to the list of known macros
2025-02-26 01:22:25 +01:00
Marco Oliverio
07c7b21b10
tests: api: fix test for d2i_CERT_ID refactor
2025-02-25 22:22:43 +00:00
Marco Oliverio
5eef98a5ea
ocsp: add OCSP CERT ID encode/decode test
2025-02-25 22:22:43 +00:00
Marco Oliverio
5f05209c77
ocsp: fix wolfSSL_d2i_OCSP_CERTID
2025-02-25 22:22:43 +00:00
Jiri Malak
ddfbbc68ac
various fixes for Open Watcom build
...
- fix build for OS/2
- fix build for Open Watcom 1.9
2025-02-25 22:52:36 +01:00
David Garske
3557cc764a
Merge pull request #8501 from SparkiDev/digest_test_rework
...
Digest testing: improve
2025-02-25 13:03:48 -08:00
Marco Oliverio
dfc5e61508
asn: ocsp: refactor out CERT ID decoding
...
It will be reused in d2i_CERT_ID
2025-02-25 20:20:34 +00:00
David Garske
f2c5b4e56a
Merge pull request #8500 from SparkiDev/evp_aes_gcm_test_fix
...
test_wolfssl_EVP_aes_gcm: fix for mem fail testing
2025-02-25 09:56:55 -08:00
David Garske
bac6771828
Merge pull request #8499 from SparkiDev/crl_list_fix
...
CRL: fix memory allocation failure leaks
2025-02-25 09:54:55 -08:00
David Garske
4eda5e1f7f
Merge pull request #8491 from jmalak/winsock-guard
...
correct comment for _WINSOCKAPI_ macro manipulation
2025-02-25 09:51:23 -08:00
Daniel Pouzzner
0589a34f91
Merge pull request #8135 from gasbytes/fix-conversion
...
Fix conversion on various files
2025-02-25 10:01:31 -06:00
Marco Oliverio
3bd4b35657
ocsp: support CERT_ID encoding in i2d_OCSP_CERTID
2025-02-25 15:45:11 +00:00
Marco Oliverio
4016120f37
ocsp: populate digest type in cert_to_id
...
- Added validation for digest type in `wolfSSL_OCSP_cert_to_id` function.
- Defined `OCSP_DIGEST` based on available hash types.
- Set `hashAlgoOID` in `certId` based on `OCSP_DIGEST`.
- Updated `asn.h` to define `OCSP_DIGEST` and `OCSP_DIGEST_SIZE` based on
available hash types.
2025-02-25 15:42:44 +00:00
Marco Oliverio
740fb6bafc
test: gate ocsp test when SHA-1 is disabled
...
tests blobs contains sha-1 hashes in certificate status
2025-02-25 15:42:35 +00:00
Marco Oliverio
78ca784826
test: ocsp: fix output file name in script
2025-02-25 15:42:30 +00:00
Marco Oliverio
c24b7d1041
ocsp: use SHA-256 for responder name if no-sha
2025-02-25 15:42:27 +00:00
Marco Oliverio
8b80cb10d6
ocsp: responderID.ByKey is SHA-1 Digest len
...
Check that responderID.ByKey is exactly WC_SHA_DIGEST_SIZE as per RFC
6960. KEYID_SIZE can change across build configuration.
2025-02-25 15:42:22 +00:00
Reda Chouk
9178c53f79
Fix: Address and clean up code conversion in various files.
2025-02-25 11:17:58 +01:00
Sean Parkinson
6016cc0c97
Digest testing: improve
...
Make testing digests consistent.
Add KATs for all digests.
Check unaligned input and output works.
Perform chunking tests for all digests.
Fix Blake2b and Blake2s to checkout parameters in update and final
functions.
Fix Shake256 and Shake128 to checkout parameters in absorb and squeeze
blocks functions.
Add default digest size enums for Blake2b and Blake2s.
2025-02-25 19:07:20 +10:00
Sean Parkinson
6f268c4369
CRL: fix memory allocation failure leaks
...
On memory allocation failure, some functions were leaking memory.
Also add reference counting to CRL object so that a deep copy of a list
of CRLs doesn't leak memory.
The test was explicitly freeing each CRL in the list.
2025-02-25 09:05:03 +10:00
Sean Parkinson
ac1f25d6f4
test_wolfssl_EVP_aes_gcm: fix for mem fail testing
...
Fix test to not leak when memory allocation failure testing.
When not supporting AES-GCM streaming, allocation failures occur.
Always call cleanup.
2025-02-25 08:15:43 +10:00
Daniel Pouzzner
a85641574d
Merge pull request #8493 from Laboratory-for-Safe-and-Secure-Systems/pqc_clang_tidy
...
PQC Clang-tidy fixes
2025-02-24 15:37:05 -06:00
JacobBarthelmeh
146d17d134
Merge pull request #8496 from embhorn/mosquitto_cert_update
...
Add cert update to workflow
2025-02-24 11:14:33 -07:00
Eric Blankenhorn
0256b426f0
Add cert update to workflow
2025-02-24 11:26:19 -06:00
Sean Parkinson
a756010a4d
Merge pull request #8492 from douzzer/20250221-fix-Kbuild-EXPORT_SYMBOL_NS_GPL
...
20250221-fix-Kbuild-EXPORT_SYMBOL_NS_GPL
2025-02-24 22:37:29 +10:00
Tobias Frauenschläger
fd8f6e168b
PQC Clang-tidy fixes
...
Fixes two clang-tidy warnings in error cases.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-24 09:28:23 +01:00
Daniel Pouzzner
c9cf4137e7
linuxkm/Kbuild and linuxkm/module_exports.c.template: refactor using .ONESHELL, and in recipe for generating linuxkm/module_exports.c, render the namespace with a literal, with or without quotes as dictated by target kernel version. remove EXPORT_SYMBOL_NS_Q(), which didn't work right on old (pre-6.13) kernels with namespace support.
...
wolfssl/wolfcrypt/settings.h: in WOLFSSL_LINUXKM section, define NO_OLD_WC_NAMES, OPENSSL_COEXIST, etc., to avoid collisions with in-tree crypto in application sources that include both wolfssl and linux kernel native headers.
2025-02-23 15:35:33 -06:00
Daniel Pouzzner
011ade4966
.wolfssl_known_macro_extras: fix unneeded and out-of-order entries (LC_ALL=C order).
2025-02-23 15:35:33 -06:00
Daniel Pouzzner
0116ab6ca2
Merge pull request #8484 from jmalak/offsetof
...
Rename OFFSETOF macro to WolfSSL specific WC_OFFSETOF name
2025-02-23 14:45:43 -06:00
Jiri Malak
d066e6b9a5
correct comment for _WINSOCKAPI_ macro manipulation
...
The issue is with MINGW winsock2.h header file which is not compatible
with Miscrosoft version and handle _WINSOCKAPI_ macro differently
2025-02-23 11:15:38 +01:00
Jiri Malak
1d1ab2d9ff
Rename OFFSETOF macro to WolfSSL specific WC_OFFSETOF name
...
There are the following reasons for this
- it conflicts with the OFFSETOF macro in the OS/2 header (Open Watcom)
- it is compiler-specific and should use the C standard offsetof definition in the header file stddef.h
- it is more transparent unique name
2025-02-22 09:44:54 +01:00
David Garske
29c3ffb5ee
Merge pull request #8435 from JacobBarthelmeh/formatting
...
add else case to match with other statements
2025-02-21 17:21:10 -08:00
David Garske
865f96aafd
Merge pull request #7821 from Laboratory-for-Safe-and-Secure-Systems/pqc_hybrid_kex
...
Add more PQC hybrid key exchange algorithms
2025-02-21 11:28:55 -08:00
JacobBarthelmeh
5fc7d9f5f2
Merge pull request #8483 from gojimmypi/pr-fips-readme
...
Update README.md to reflect FIPS 140-3 validated Certificate #4718
2025-02-21 11:00:31 -07:00
Tobias Frauenschläger
c899f79cfa
Update key share group ranking algorithm
...
In case no user group ranking is set, all groups are now ranked equally
instead of the order in the `preferredGroup` array. This is the
behavior already indicated in the comment header of the function.
This change is necessary for applications that do not set their own
group ranking (via `wolfSSL_CTX_set_groups()` for example). When such an
application creates a TLS server and receives a ClientHello message with
multiple key shares, now the first key share is selected instead of the
one with the lowest index in the `preferredGroup` array.
Recent browsers with PQC support place two key shares in their
ClientHello message: a hybrid PQC + X25519 one and at least one
classic-only one. The hybrid one is the first one, indicating a
preference. Without this change, however, always the classic-only key
share has been selected, as these algorithms have a lower index in the
`preferredGroup` array compared to the PQC hybrids.
Tested using a patched version of NGINX.
This change also results in a different selection of a key share group
in case of a HelloRetryRequest message. For the tests, where static
ephemeral keys are used (`WOLFSSL_STATIC_EPHEMERAL`), an additional
check is necessary to make sure the correct key is used for the ECDH
calculation.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-21 18:44:51 +01:00
Tobias Frauenschläger
89491c7e36
Improvements for PQC hybrid key exchange
...
Add support for X25519 and X448 based hybrid PQC + ECC key exchange
groups. Furthermore, two new combinations with SECP curves are added to
match OQS combinations.
This also incorporates the changed order of X25519 and X448 based
combinations to place the PQC material before the ECDH material. This is
motivated by the necessity to always have material of a FIPS approved
algorithm first.
Also, codepoints are updated to reflect the latest draft standards for
pure ML-KEM and some of the hybrids. With these changes and based on the
recent additions to both enable ML-KEM final and draft versions
simultaneously, a WolfSSL TLS server is now compatible with all recent
browsers that support either the draft version of ML-KEM (Chromium based
browsers and Firefox < version 132; only when the draft version is
enabled in the build) or the final version already (Firefox > version 132).
In the process of extending support, some code and logic cleanup
happened. Furthermore, some memory leaks within the hybrid code path have
been fixed.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2025-02-21 18:44:40 +01:00
David Garske
6271d5b5a4
Merge pull request #8485 from jmalak/cmake-build
...
fix failing build if not found standard threads support
2025-02-21 09:38:33 -08:00
JacobBarthelmeh
c3d5fa6748
Merge pull request #8481 from cconlon/jniDTLS13
...
Enable DTLS 1.3 by default in `--enable-jni` build
2025-02-21 10:02:49 -07:00
Jiri Malak
000f32a5a4
fix failing tests build if not found standard threads support
...
Threads::Threads is not defined, if support not found for some reason
if custom threads support is used then it happen always
of cause some tests relates to standard threads support then it fails during build, but build is started and only some tests fail
2025-02-21 09:24:15 +01:00
JacobBarthelmeh
8ae122584c
Merge pull request #8482 from douzzer/20250220-misc-UnalignedWord64
...
20250220-misc-UnalignedWord64
2025-02-20 17:26:44 -07:00
gojimmypi
4c7538e5ac
Update README.md to reflect FIPS 140-3 validated Certificate #4718
2025-02-20 15:12:18 -08:00
Daniel Pouzzner
a05436066d
wolfcrypt/test/test.c: fix return values in camellia_test() (also fixes some false positive -Wreturn-stack-addresses from clang++).
2025-02-20 16:50:24 -06:00
Daniel Pouzzner
8aa2799aeb
wolfssl/wolfcrypt/types.h: don't define HAVE_EMPTY_AGGREGATES when defined(__cplusplus) ( fixes #8478 ).
2025-02-20 16:49:48 -06:00
JacobBarthelmeh
781d85284c
Merge pull request #8479 from SparkiDev/intel_vzeroupper
...
Intel AVX1/SSE2 ASM: no ymm/zmm regs no vzeroupper
2025-02-20 15:37:01 -07:00
Chris Conlon
9892ae0cb3
Enable DTLS 1.3 by default in --enable-jni build
2025-02-20 15:05:56 -07:00
Daniel Pouzzner
41b4ac5599
misc.c: undo changes in 82b50f19c6
"when Intel x64 build, assume able to read/write unaligned" -- provokes sanitizer on amd64, and is not portable (e.g. different behavior on Intel vs AMD). all performance-sensitive word64 reads/writes should be on known-aligned data.
2025-02-20 15:00:22 -06:00
JacobBarthelmeh
01808bebca
Merge pull request #8474 from philljj/coverity_feb_2025
...
coverity: fix test_dtls warnings.
2025-02-20 10:35:47 -07:00
JacobBarthelmeh
619a41f9da
Merge pull request #8476 from philljj/coverity_null_check
...
coverity: dereference before null check.
2025-02-20 10:33:58 -07:00
Sean Parkinson
e90e3aa7c6
Intel AVX1/SSE2 ASM: no ymm/zmm regs no vzeroupper
...
vzeroupper instruction not needed to be invoked unless ymm or zmm
registers are used.
2025-02-20 22:35:20 +10:00
jordan
95e26f5b27
coverity: dereference before null check.
2025-02-19 23:23:41 -05:00
David Garske
93000e5f14
Merge pull request #8467 from SparkiDev/kyber_improv_2
...
ML-KEM/Kyber: improvements
2025-02-19 16:42:42 -08:00
Sean Parkinson
82b50f19c6
ML-KEM/Kyber: improvements
...
ML-KEM/Kyber:
MakeKey call generate random once only for all data.
Allow MakeKey/Encapsulate/Decapsulate to be compiled separately.
Pull out public key decoding common to public and private key decode.
Put references to FIPS 140-3 into code. Rename variables to match FIPS
140-3.
Fix InvNTT assembly code for x64 - more reductions.
Split out ML-KEM/Kyber tests from api.c.
TLSX:
Store the object instead of the private key when WOLFSSL_MLKEM_CACHE_A
is defined or WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ. Faster decapsulation
when A is cached and object stored.
To store private key as normal define
WOLFSSL_TLSX_PQC_MLKEM_STORE_PRIV_KEY.
misc.c: when Intel x64 build, assume able to read/write unaligned
2025-02-20 08:14:15 +10:00
JacobBarthelmeh
539056e749
Merge pull request #8475 from embhorn/gh8473
...
Fix QUIC callback failure
2025-02-19 14:00:47 -07:00
David Garske
268326d875
Merge pull request #8408 from rizlik/ocsp-resp-refactor
...
OpenSSL Compat Layer: OCSP response improvments
2025-02-19 11:20:12 -08:00
Daniel Pouzzner
597b839217
Merge pull request #8468 from jmalak/fix-test-c89
...
correct test source file to follow C89 standard
2025-02-19 11:23:48 -06:00
Eric Blankenhorn
66ed35c910
Fix QUIC callback failure
2025-02-19 10:56:44 -06:00
JacobBarthelmeh
373a7d462a
Merge pull request #8472 from SparkiDev/ed25519_fix_tests
...
Ed25519: fix tests to compile with feature defines
2025-02-19 09:53:10 -07:00
jordan
6f1c31a816
coverity: fix macro warning.
2025-02-19 11:29:45 -05:00
jordan
9a1d60100f
coverity: fix test_dtls warnings.
2025-02-19 09:38:15 -05:00
Sean Parkinson
331a713271
Ed25519: fix tests to compile with feature defines
...
ge_operations.c: USe WOLFSSL_NO_MALLOC rather than WOLFSSL_SP_NO_MALLOC.
2025-02-19 17:41:03 +10:00
JacobBarthelmeh
393c92c3eb
Merge pull request #8464 from kaleb-himes/SRTP-WIN-PORTING
...
Porting to Windows 11 MSVS 2022
2025-02-18 16:16:14 -07:00
Jiri Malak
3c74be333e
correct test source file to follow C89 standard
...
for OpenSSL interface
2025-02-18 22:12:11 +01:00
JacobBarthelmeh
48f1c3b57d
Merge pull request #8465 from douzzer/20250217-fix-test-c89
...
20250217-fix-test-c89
2025-02-18 08:44:17 -08:00
David Garske
ff70cdf9d8
Merge pull request #8466 from douzzer/20250217-fixes
...
20250217-fixes
2025-02-17 19:39:38 -08:00
Daniel Pouzzner
258afa5493
wolfcrypt/src/pkcs7.c: in PKCS7_EncodeSigned(), check for error from SetSerialNumber().
2025-02-17 18:05:04 -06:00
Daniel Pouzzner
65f38df74d
tests/api.c: refactor several C89-incompatible dynamically constructed arrays using static const.
2025-02-17 17:47:36 -06:00
kaleb-himes
e0bc6ef9df
Porting to Windows 11 MSVS 2022
2025-02-17 16:18:10 -07:00
David Garske
a2c8168c96
Merge pull request #8460 from embhorn/gh8456
...
Fix cmake lean_tls build
2025-02-17 14:57:52 -08:00
Eric Blankenhorn
bc79803c1a
Add workflow test
2025-02-17 15:16:29 -06:00
JacobBarthelmeh
3e38bdcd2c
Merge pull request #8450 from dgarske/stm32_pka_ecc521
...
Fix for STM32 PKA ECC 521-bit support
2025-02-17 08:27:45 -08:00
Marco Oliverio
7db3c34e2b
ocsp: enable OPENSSL tlsext status cb for NGINX and HAPROXY
2025-02-17 14:53:49 +00:00
Eric Blankenhorn
1970fec190
Fix cmake lean_tls build
2025-02-17 08:17:05 -06:00
Marco Oliverio
a1d1f0ddf1
ocsp: enable SSL_CTX_set_tlsext_status_cb only in OPENSSL_ALL
2025-02-17 11:29:09 +00:00
Marco Oliverio
0945101948
ocsp: fix: remove duplicated code
2025-02-17 11:25:24 +00:00
Marco Oliverio
1eecf326fd
ocsp: use ocspReponse->heap in OcspFindSigner + minors
2025-02-17 08:59:29 +00:00
Marco Oliverio
0af092ec79
ocsp: minors
2025-02-17 08:59:29 +00:00
Marco Oliverio
a06a8b589c
ocsp: minors
2025-02-17 08:59:29 +00:00
Marco Oliverio
4351a5dd70
ocsp/test: better test assertions
2025-02-17 08:59:29 +00:00
Marco Oliverio
69116eb05d
ocsp/tests: update blobs and add license header
2025-02-17 08:59:29 +00:00
Marco Oliverio
c1c9af5cb6
minor: improve indentation of guards
2025-02-17 08:59:29 +00:00
Marco Oliverio
3724094ce2
ocsp: add test for response with unusable internal cert
...
- Added a new test case `resp_bad_embedded_cert` in
`create_ocsp_test_blobs.py` to test OCSP response with an unusable
internal cert that can be verified in Cert Manager.
- Updated `test_ocsp_response_parsing` in `ocsp.c` to include the new
test case.
- Ensured the new test case checks for proper handling of OCSP responses
with incorrect internal certificates.
2025-02-17 08:59:29 +00:00
Marco Oliverio
2c2eb2a285
ocsp: improve OCSP response signature validation
...
- search for the signer in the CertificateManager if the embedded cert
verification fails in original asn template.
2025-02-17 08:59:29 +00:00
Marco Oliverio
3e50c79c3b
tests: bind test_wolfSSL_client_server_nofail_memio HAVE_SSL_MEMIO_TESTS_DEP
2025-02-17 08:59:29 +00:00
Marco Oliverio
ae3177c439
ocsp-resp-refactor: fix tests
2025-02-17 08:59:29 +00:00
Marco Oliverio
851d74fd69
ocsp-resp-refactor: address reviewer's comments
2025-02-17 08:59:29 +00:00
Marco Oliverio
eb7904b5e5
tests/api: expose test_ssl_memio functions
2025-02-17 08:59:29 +00:00
Marco Oliverio
f782614e1e
clang tidy fixes
2025-02-17 08:59:28 +00:00
Marco Oliverio
2fe413d80f
ocsp: add tests
2025-02-17 08:59:23 +00:00
Marco Oliverio
3a3238eb9f
ocsp: refactor wolfSSL_OCSP_response_get1_basic
...
The internal fields of OcspResponse refer to the resp->source buffer.
Copying these fields is complex, so it's better to decode the response again.
2025-02-17 08:58:03 +00:00
Marco Oliverio
b7f08b81a6
ocsp: adapt ASN original to new OCSP response refactor
2025-02-17 08:58:03 +00:00
Marco Oliverio
f526679ad5
ocsp: refactor OCSP response decoding and wolfSSL_OCSP_basic_verify
...
- Search certificate based on responderId
- Verify response signer is authorized for all single responses
- Align with OpenSSL behavior
- Separate wolfSSL_OCSP_basic_verify from verification done during
decoding
2025-02-17 08:58:03 +00:00
Marco Oliverio
d7711f04ab
openssl compat: skip OCSP response verification in statusCb
...
This aligns with OpenSSL behavior
2025-02-17 08:58:02 +00:00
Marco Oliverio
dedbb2526c
ocsp: fix memory leaks in OpenSSL compat layer
2025-02-17 08:58:02 +00:00
Kaleb Himes
79744a7736
Merge pull request #8455 from douzzer/20250214-fix-wolfEntropy-configure-handling
...
20250214-fix-wolfEntropy-configure-handling
2025-02-14 17:14:29 -07:00
Daniel Pouzzner
39ed0eabff
configure.ac: fix handling of --enable-wolfEntropy (don't re-default to no in following --enable-entropy-memuse clause).
2025-02-14 15:39:42 -06:00
David Garske
842b9a3709
Merge pull request #8433 from julek-wolfssl/dtls-cid-negative-tests
...
Update DTLS CID Tests and Reorganize Test Utilities
2025-02-14 11:26:57 -08:00
Daniel Pouzzner
c9de3d63f9
Merge pull request #8453 from kaleb-himes/SRTP-KDF-SCRIPT-UPDATE
...
Update tag for v6.0.0 module checkout
2025-02-14 13:24:25 -06:00
David Garske
e529ad51fc
Merge pull request #8451 from douzzer/20240214-workflow-TEST_OPENSSL_COEXIST
...
20250214-workflow-TEST_OPENSSL_COEXIST
2025-02-14 11:12:28 -08:00
kaleb-himes
a6a15e6211
Update tag for v6.0.0 module checkout
2025-02-14 11:38:19 -07:00
Daniel Pouzzner
10d5d59977
add .github/workflows/opensslcoexist.yml. fix TEST_OPENSSL_COEXIST section of wolfssl/ssl.h for compatibility with OpenSSL <3.2. also, remove frivolous entry for WOLFSSL_HMAC_COPY_HASH in .wolfssl_known_macro_extras.
2025-02-14 12:19:12 -06:00
Daniel Pouzzner
690bb14203
tests/utils.c and tests/api/test_dtls.c: fixes for include order, re tests/unit.h.
2025-02-14 10:57:29 -06:00
David Garske
29f2767b88
Merge pull request #8441 from philljj/wolfio_comments
...
wolfio: comment ifdef endif blocks.
2025-02-14 08:55:31 -08:00
Juliusz Sosinowicz
cfa6fbfcef
Correct wolfSSL_dtls_cid_parse declaration in docs
2025-02-14 09:51:29 -06:00
David Garske
3075e57207
Whitespace and filename comment.
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
7380ec68bb
cmake.yml: fix error and run tests with ctest
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
825ca22bd8
Fix cmake build
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
ede34f132b
fixup! Move dtls cid tests to tests/api/dtls.c
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
301a9a97cc
Don't use buffer
as it can shadow global declarations
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
21dce84448
Add negative tests for DTLS CID
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
68c27c4e5d
Move dtls cid tests to tests/api/dtls.c
2025-02-14 09:51:29 -06:00
Juliusz Sosinowicz
e02da08192
Reorganize utility functions into tests/utils.c and testsuite/utils.c
2025-02-14 09:51:29 -06:00
jordan
f2bb063ca4
wolfio: peer review comment cleanup.
2025-02-14 08:36:26 -05:00
Daniel Pouzzner
60c1558142
Merge pull request #8447 from dgarske/memleak
...
Fixed possible memory leaks
2025-02-14 00:26:09 -06:00
Daniel Pouzzner
e806bd76bb
Merge pull request #8445 from SparkiDev/perf_improv_1
...
Performance improvements
2025-02-13 23:25:47 -06:00
David Garske
86c3ee1a9d
Fix for STM32 PKA ECC 521-bit support. Issue was 65 vs 66 buffer check. ZD 19379
2025-02-13 16:41:42 -08:00
David Garske
1432bd415a
Merge pull request #8449 from ColtonWilley/x509_store_mem_leak
...
Fix memory leak in X509 STORE
2025-02-13 16:18:11 -08:00
Colton Willey
e197cdfb36
Fix memory leak in X509 STORE
2025-02-13 14:49:18 -08:00
David Garske
746aa9b171
Merge pull request #8443 from ColtonWilley/add_cert_rel_prefix
...
Add a cert relative prefix option for tests
2025-02-13 14:48:06 -08:00
David Garske
14d696952d
Merge pull request #8448 from anhu/vuln_to_support
...
Point people to support@wolfssl.com for vuln reports.
2025-02-13 14:47:37 -08:00
Anthony Hu
a5ac5aff17
an -> a
2025-02-13 14:50:32 -05:00
Anthony Hu
cab376c0ce
Point people to support@wolfssl.com for vuln reports.
2025-02-13 14:48:32 -05:00
Colton Willey
b119182c9d
Add to known macro list
2025-02-13 09:35:39 -08:00
David Garske
f943f6ff5c
Fixed possible memory leaks reported by nielsdos in PR 8415 and 8414.
2025-02-13 08:20:37 -08:00
David Garske
db0fa304a8
Merge pull request #8436 from SparkiDev/mlkem_cache_a
...
ML-KEM/Kyber: cache A from key generation for decapsulation
2025-02-12 17:29:38 -08:00
Sean Parkinson
896ec239c3
Merge pull request #8444 from douzzer/20250212-add-pq-and-c-fallback-workflows
...
20250212-add-pq-and-c-fallback-workflows
2025-02-13 10:29:15 +10:00
David Garske
846ba43a29
Merge pull request #8392 from SparkiDev/curve25519_blinding
...
Curve25519: add blinding when using private key
2025-02-12 16:20:51 -08:00
Sean Parkinson
365aac0306
Merge pull request #8393 from anhu/draft-tls-westerbaan-mldsa
...
New codepoint for MLDSA
2025-02-13 10:20:30 +10:00
Sean Parkinson
9253d1d3ac
ML-KEM/Kyber: cache A from key generation for decapsulation
...
Matrix A is expensive to calculate.
Usage of ML-KEM/Kyber is
1. First peer generates a key and sends public to second peer.
2. Second peer encapsulates secret with public key and sends to first
peer.
3. First peer decapsulates (including encapsulating to ensure same as
seen) with key from key generation.
Caching A keeps the matrix A for encapsulation part of decapsulation.
The matrix needs to be transposed for encapsulation.
2025-02-13 10:12:05 +10:00
Sean Parkinson
bfd52decb6
Performance improvements
...
AES-GCM: don't generate M0 when using assembly unless falling back to C
and then use new assembly code.
HMAC: add option to copy hashes (--enable-hash-copy
-DWOLFSSL_HMAC_COPY_HASH) to improve performance when using the same key
for multiple operations.
2025-02-13 09:55:55 +10:00
Daniel Pouzzner
5352ce06e5
add .github/workflows/{pq-all.yml,intelasm-c-fallback.yml}.
2025-02-12 17:32:41 -06:00
Sean Parkinson
bb84ebfd7a
Curve25519: add blinding when using private key
...
XOR in random value to scalar and perform special scalar multiplication.
Multiply x3 and z3 by random value to randomize co-ordinates.
Add new APIs to support passing in an RNG.
Old APIs create a new RNG.
Only needed for the C implementations that are not small.
Modified TLS and OpenSSL compat API implementations to pass in RNG.
Fixed tests and benchmark program to pass in RNG.
2025-02-13 08:52:35 +10:00
David Garske
0e474fc673
Merge pull request #8437 from LinuxJedi/SE050-changes
...
Minor SE050 improvements
2025-02-12 14:50:36 -08:00
Anthony Hu
aa59eab732
More minor mods. Now interops with oqs-provider.
2025-02-12 17:17:22 -05:00
Colton Willey
ddf7bfcb8f
Add a cert relative prefix option for tests
2025-02-12 13:59:23 -08:00
David Garske
828d79b64b
Merge pull request #8442 from douzzer/20250212-revert-8429
...
20250212-revert-8429
2025-02-12 12:30:06 -08:00
Daniel Pouzzner
3856d55d9b
Revert "Performance improvements"
...
This reverts commit ce679ef057
.
2025-02-12 12:32:47 -06:00
David Garske
fe73c5e3f2
Merge pull request #8440 from douzzer/20250211-MSVC-static-assert-features
...
20250211-MSVC-static-assert-features
2025-02-12 08:17:02 -08:00
jordan
9dfcc6a477
wolfio: comment ifdef endif blocks.
2025-02-12 09:51:51 -05:00
Anthony Hu
db25958b42
New codepoint for MLDSA and MLKEM
2025-02-11 21:11:22 -05:00
Sean Parkinson
bcd89b0592
Merge pull request #8388 from julek-wolfssl/BN_CTX_get
...
Implement BN_CTX_get
2025-02-12 08:08:58 +10:00
Daniel Pouzzner
b598a06354
Merge pull request #8439 from dgarske/fix_cmake
...
Fix CMake build
2025-02-11 15:34:44 -06:00
Daniel Pouzzner
fc5cb737ee
wolfssl/wolfcrypt/types.h: refine MSVC feature detection in setup for wc_static_assert*() macros.
2025-02-11 15:26:24 -06:00
David Garske
e6710bf483
Fix CMake build (broken with API.c refactor in PR 8413). Add GitHub CI for CMake (all).
2025-02-11 12:19:47 -08:00
Daniel Pouzzner
515bdf1320
Merge pull request #8438 from philljj/ecdsa_mldsa_test_api_fix_leak
...
test_dual_alg_ecdsa_mldsa: fix decoded cert leak.
2025-02-11 12:51:26 -06:00
David Garske
92e222b1ab
Merge pull request #8429 from SparkiDev/perf_improv_1
...
Performance improvements AES-GCM and HMAC (in/out hash copy)
2025-02-11 08:32:30 -08:00
Andrew Hutchings
cb42f18a47
Minor SE050 improvements
...
Adds two features for SE050:
1. `WOLFSSL_SE050_AUTO_ERASE`. When enabled, this will automatically
erase a key from the SE050 when `wc_ecc_free()` and friends are
called.
2. `WOLFSSL_SE050_NO_RSA`. This stops RSA offloading onto the SE050,
useful for the SE050E which does not have RSA support.
2025-02-11 16:25:06 +00:00
jordan
922cb73061
test_dual_alg_ecdsa_mldsa: fix decoded cert leak.
2025-02-11 10:58:03 -05:00
Sean Parkinson
ce679ef057
Performance improvements
...
AES-GCM: don't generate M0 when using assembly unless falling back to C
and then use new assembly code.
HMAC: add option to copy hashes (--enable-hash-copy
-DWOLFSSL_HMAC_COPY_HASH) to improve performance when using the same key
for multiple operations.
2025-02-11 10:26:51 +10:00
David Garske
be5f203274
Merge pull request #8425 from philljj/ecdsa_mldsa_test_api
...
dual alg: add ML-DSA test, and misc cleanup.
2025-02-10 15:05:44 -08:00
David Garske
ff41eee2e7
Merge pull request #8413 from SparkiDev/tests_api_digests
...
API test: move digest functions out
2025-02-10 14:51:19 -08:00
JacobBarthelmeh
96d9ebcfee
add else case to match with other statements
2025-02-10 14:53:15 -07:00
David Garske
4373e551e7
Merge pull request #8431 from LinuxJedi/SE050-fixes
...
Fix SE050 Port
2025-02-10 11:33:46 -08:00
jordan
557e43bcd7
dual alg: peer review cleanup, and more function comments.
2025-02-10 10:08:35 -05:00
Andrew Hutchings
8870b76c26
Fix SE050 Port
...
The SE050 port won't compile in the latest wolfSSL. This patch:
* Updates the documentation
* Fixes a missing `#ifdef` that breaks the build
* Changes the use of `mp_int` to `MATH_INT_T`
* Fixes compiler error with `ecc.c`
* Adds a tiny bit of extra debugging info
2025-02-10 14:27:28 +00:00
jordan
937d6d404a
dual alg: clean up comments and line lengths.
2025-02-07 09:22:16 -05:00
Juliusz Sosinowicz
e2d40288ee
Remove internal use of wolfSSL_BN_CTX_new()
2025-02-07 14:45:42 +01:00
Juliusz Sosinowicz
573dea4605
fixup! Implement BN_CTX_get
2025-02-07 14:45:19 +01:00
Sean Parkinson
8f131ff3d0
Merge pull request #8424 from douzzer/20250206-winsockapi-tweaks
...
20250206-winsockapi-tweaks
2025-02-07 13:06:44 +10:00
Daniel Pouzzner
1e17d737c8
"#undef _WINSOCKAPI_" after defining it to "block inclusion of winsock.h header file", to fix #warning in /usr/x86_64-w64-mingw32/usr/include/winsock2.h.
2025-02-06 18:41:20 -06:00
David Garske
c668a4e5a0
Merge pull request #8426 from SparkiDev/read_der_bio_small_data_fix
...
Read DER BIO: fix for when BIO data is less than seq buffer size
2025-02-06 16:21:42 -08:00
David Garske
7f1952fd9b
Merge pull request #8423 from douzzer/20250206-unit-test-helgrind-fixes
...
20250206-unit-test-helgrind-fixes
2025-02-06 16:21:03 -08:00
Sean Parkinson
3ff89f2cc2
API test: move digest functions out
...
Move all api.c tests of wolfCrypt APIs that are for digests out into
separate files.
2025-02-07 09:29:46 +10:00
Sean Parkinson
ae8b8c4164
Read DER BIO: fix for when BIO data is less than seq buffer size
...
wolfssl_read_der_bio did not not handle the length to be read from the
BIO being less than the size of the sequence buffer.
2025-02-07 08:46:49 +10:00
Daniel Pouzzner
6f044c577f
tests/api.c: add a missed "#ifdef WOLFSSL_ATOMIC_INITIALIZER" in test_AEAD_limit_server().
2025-02-06 16:32:54 -06:00
jordan
3df616ae58
dual alg: small cleanup.
2025-02-06 15:57:13 -05:00
jordan
035d4022fb
dual alg: add ML-DSA test, and misc cleanup.
2025-02-06 15:50:37 -05:00
Daniel Pouzzner
40e3f03795
tests/api.c: fix data races in test_wolfSSL_CTX_add_session_ctx_ready() using a mutex, and in test_wolfSSL_dtls_AEAD_limit() using a mutex, an atomic integer, and a volatile attribute.
...
wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_ATOMIC_LOAD() and WOLFSSL_ATOMIC_STORE() definitions.
2025-02-06 00:55:44 -06:00
Sean Parkinson
e6ceb40187
Merge pull request #8391 from dgarske/cmake_watcom
...
Fixes for Watcom compiler and new CI test
2025-02-06 08:51:51 +10:00
David Garske
32263173dd
Merge pull request #8421 from anhu/pq_INSTALL_update
...
Update INSTALL file regarding PQ
2025-02-05 11:16:49 -08:00
David Garske
0857a3e593
Merge pull request #8422 from gojimmypi/pr-add-espressif_example-setting
...
Add Espressif sample user_settings.h
2025-02-04 15:21:35 -08:00
David Garske
f061e19ecb
Merge pull request #8403 from miyazakh/keytype_tsip
...
Revert TSIP_KEY_TYPE as TSIP TLS definition
2025-02-04 15:21:27 -08:00
Sean Parkinson
efd36a42cf
Merge pull request #8419 from julek-wolfssl/ascon-test-kats-readability
...
ascon: make tests more readable by moving the kat vectors into a header
2025-02-05 09:06:50 +10:00
David Garske
60c5a0ac7f
Peer review feedback. Thank you @jmalak
2025-02-04 14:32:24 -08:00
gojimmypi
0680895d7d
Add Espressif sample user_settings.h
2025-02-04 14:26:15 -08:00
David Garske
743655b9ce
Merge pull request #8402 from gojimmypi/pr-espressif-build-improvement
...
Improve Espressif make and cmake for ESP8266 and ESP32 series
2025-02-04 14:05:32 -08:00
Hideki Miyazaki
d56b623958
Trailing white-space
2025-02-05 07:03:45 +09:00
David Garske
345c969164
Fixes for Watcom compiler and new CI test
...
* Correct cmake script to support Open Watcom toolchain (#8167 )
* Fix thread start callback prototype for Open Watcom toolchain (#8175 )
* Added GitHub CI action for Windows/Linux/OS2
* Improvements for C89 compliance.
Thank you @jmalak for your contributions.
2025-02-04 12:38:52 -08:00
David Garske
f0b3c2955e
Merge pull request #8412 from SparkiDev/mlkem_kyber_small_mem
...
ML-KEM/Kyber: small memory usage
2025-02-04 11:45:01 -08:00
David Garske
1d0855fbe0
Merge pull request #8420 from douzzer/20250204-fix-null-ptr-increments
...
20250204-fix-null-ptr-increments
2025-02-04 11:11:19 -08:00
Anthony Hu
41d8eabb33
Update INSTALL file regarding PQ
2025-02-04 13:28:05 -05:00
Daniel Pouzzner
b466bde5d0
src/internal.c and src/ssl.c: in CheckcipherList() and ParseCipherList(), refactor "while (next++)" to "while (next)" to avoid clang21 UndefinedBehaviorSanitizer "applying non-zero offset 1 to null pointer".
2025-02-04 12:07:29 -06:00
David Garske
6141b5060d
Merge pull request #8418 from gojimmypi/pr-post-release-239b85c80-espressif
...
Espressif Managed Component wolfSSL 5.7.6 post-release update
2025-02-04 07:47:14 -08:00
Juliusz Sosinowicz
8b7b9636aa
Remove BN_CTX_init as its no longer in OpenSSL for a long time
2025-02-04 16:37:21 +01:00
Juliusz Sosinowicz
91bffeead3
wolfSSL_BN_CTX_get: prepend to list skipping need to traverse the list
2025-02-04 16:37:21 +01:00
Juliusz Sosinowicz
841d13e81c
Implement BN_CTX_get
2025-02-04 16:37:21 +01:00
Hideki Miyazaki
77f3b45af0
update key_data
2025-02-05 00:11:55 +09:00
David Garske
93cb9c4a5e
Merge pull request #8417 from SparkiDev/tls13_hrr_keyshare_comments
...
TLS 1.3 HRR KeyShare: Improve comments
2025-02-04 06:20:24 -08:00
Juliusz Sosinowicz
db0345c009
ascon: make tests more readable by moving the kat vectors into a header
2025-02-04 12:58:51 +01:00
Sean Parkinson
316177a7f1
ML-KEM/Kyber: small memory usage
...
Options to compile ML-KEM/Kyber to use less dynamic memory.
Only available with C code and has small performance trade-off.
2025-02-04 10:51:56 +10:00
Sean Parkinson
92491e6368
TLS 1.3 HRR KeyShare: Improve comments
...
HelloRetryRequest has the key exchange group it wants to use.
A KeyShare for that group must not have been in the ClientHello.
2025-02-04 10:16:27 +10:00
gojimmypi
71a982e6b7
sync with upstream
2025-02-03 16:13:05 -08:00
gojimmypi
962260af9d
Espressif Managed Component wolfSSL 5.7.6 post-release update
2025-02-03 15:34:33 -08:00
Sean Parkinson
eb15a1213c
Merge pull request #8416 from embhorn/zd19323
...
Clear old ssl->error after retry
2025-02-04 08:54:10 +10:00
Sean Parkinson
7898cce43c
Merge pull request #8407 from embhorn/zd19346
...
Fix compat layer ASN1_TIME_diff to accept NULL output params
2025-02-04 08:43:50 +10:00
Eric Blankenhorn
e9892c22a2
Clear old ssl->error after retry
2025-02-03 14:18:09 -06:00
Eric Blankenhorn
b488af1d34
Fix compat layer ASN1_TIME_diff to accept NULL output params
2025-01-31 15:55:35 -06:00
JacobBarthelmeh
275becab6f
Merge pull request #8406 from julek-wolfssl/krb5-spake-testing
...
Add spake to kerberos 5 testing
2025-01-31 13:45:36 -07:00
JacobBarthelmeh
4891d1c471
Merge pull request #8400 from ColtonWilley/add_trusted_cert_pem_parsing
...
Add support for parsing trusted PEM certs
2025-01-31 10:53:51 -07:00
Juliusz Sosinowicz
a48f7ce276
Add spake to kerberos 5 testing
2025-01-31 18:28:31 +01:00
JacobBarthelmeh
4abba81315
Merge pull request #8405 from anhu/thanks_tobiasbrunner
...
Fix some typoes around Kyber and Dilithium
2025-01-31 10:05:14 -07:00
Anthony Hu
f86b19dd30
Fix some typoes around Kyber and Dilithium
2025-01-31 10:13:39 -05:00
Hideki Miyazaki
6555da9448
revert TSIP_KEY_TYPE as TSIP TLS definition
2025-01-31 14:13:36 +09:00
David Garske
e7a0340eea
Merge pull request #8395 from SparkiDev/asm32_asm_older_opt
...
ARM32 ASM: optimize older platform alternatives
2025-01-30 15:47:25 -08:00
Colton Willey
cb0779f151
Add trusted cert to generation script and include.am
2025-01-30 15:29:59 -08:00
Sean Parkinson
3f47963802
Merge pull request #8396 from douzzer/20250129-CT-tweaks
...
20250129-CT-tweaks
2025-01-31 09:10:22 +10:00
JacobBarthelmeh
6181559d83
Merge pull request #8401 from douzzer/20250130-UHAVE_FFDHE_2048
...
20250130-UHAVE_FFDHE_2048
2025-01-30 15:55:25 -07:00
Colton Willey
a0950e97f5
Add tests for trusted certificate banner
2025-01-30 14:42:41 -08:00
Daniel Pouzzner
3a6b33c180
tests/api.c and wolfcrypt/benchmark/benchmark.c: fixes for building with HAVE_FFDHE_3072 and/or HAVE_FFDHE_4096 but without HAVE_FFDHE_2048.
2025-01-30 15:02:02 -06:00
Colton Willey
c4288cc334
Add support for parsing PEM certificates with begin trusted cert header/footer, needed for wolfProvider.
2025-01-30 11:34:02 -08:00
JacobBarthelmeh
eb7bac3cd0
Merge pull request #8399 from julek-wolfssl/cov-fixes-30-01-2025
...
Cov fixes
2025-01-30 11:56:36 -07:00
JacobBarthelmeh
9641dc79d9
Merge pull request #8398 from douzzer/20250130-ASCON-unit-test-fixes
...
20250130-ASCON-unit-test-fixes
2025-01-30 10:57:05 -07:00
Juliusz Sosinowicz
c36d23029f
dtls: malloc needs to allocate the size of the dereferenced object
2025-01-30 18:32:22 +01:00
Juliusz Sosinowicz
9a8bc248de
dtls: remove dead code
2025-01-30 18:32:22 +01:00
Juliusz Sosinowicz
3cd64581eb
dtls: better sanitize incoming messages in stateless handling
2025-01-30 18:32:22 +01:00
JacobBarthelmeh
f7b76002c2
Merge pull request #8397 from SparkiDev/kyber_no_malloc
...
ML-KEM/Kyber: build with no malloc
2025-01-30 10:06:13 -07:00
Juliusz Sosinowicz
e4b7a53191
api: make sure len doesn't overrun the input buffer
2025-01-30 18:01:51 +01:00
Juliusz Sosinowicz
2865b0c79b
api: check fd values as recv and send can't take in negative fd
2025-01-30 18:01:10 +01:00
Juliusz Sosinowicz
d91141fe05
api: pass in sizeof(tmp) instead of 1024 to attempt to satisfy Coverity
2025-01-30 18:00:32 +01:00
Juliusz Sosinowicz
2590aebfd9
dtls13: don't overrun hdr->epoch
2025-01-30 17:59:48 +01:00
Daniel Pouzzner
49d2beed1a
fixes for gating/tooling around ASCON.
2025-01-30 10:48:23 -06:00
Sean Parkinson
b62f5ab722
ML-KEM/Kyber: build with no malloc
...
ML-KEM/Kyber van now be built with WOLFSSL_NO_MALLOC and all data is on
the stack.
2025-01-30 18:11:55 +10:00
Daniel Pouzzner
0de38040f4
CT tweaks:
...
in wolfcrypt/src/coding.c, add ALIGN64 to hexDecode[], and add hexEncode[] for use by Base16_Encode();
in wolfcrypt/src/misc.c and wolfssl/wolfcrypt/misc.h:
move ctMask*() up so that min() and max() can use them, and add ctMaskWord32GTE();
add ALIGN64 to kHexChar[];
add CT implementation of CharIsWhiteSpace();
remove min_size_t() and max_size_t() recently added, but only one user (refactored).
2025-01-30 01:24:40 -06:00
Daniel Pouzzner
dd7ec129af
fixes for gating/tooling around ASCON.
2025-01-30 01:23:26 -06:00
Sean Parkinson
2d06e67a64
ARM32 ASM: optimize older platform alternatives
...
Make the alternative instructions for architectures less than 7 more
optimal.
2025-01-30 16:58:13 +10:00
Anthony Hu
25c8869541
Merge pull request #8390 from SparkiDev/lms_sha256_192_l1_h20
...
LMS: Fix SHA-256-192 level 1, height 20
2025-01-29 18:20:50 -05:00
Sean Parkinson
871c05e0e2
Merge pull request #8307 from julek-wolfssl/ascon
...
Initial ASCON hash256 and AEAD128 support based on NIST SP 800-232 ipd
2025-01-30 08:39:59 +10:00
Juliusz Sosinowicz
bcde4bdebb
ascon: move tests to api.c and introduce framework to split up api.c
2025-01-29 15:50:00 +01:00
Juliusz Sosinowicz
cd047a35f2
fixup! Initial ASCON hash256 and AEAD128 support based on NIST SP 800-232 ipd
2025-01-29 12:21:28 +01:00
Juliusz Sosinowicz
b0ab7f0d26
ascon: use individual word64 to help compiler
2025-01-29 11:49:09 +01:00
Juliusz Sosinowicz
78a7d12955
ascon: use lowercase first letters for members
2025-01-29 11:38:31 +01:00
Juliusz Sosinowicz
f47bbfc174
ascon: error out when word64 not available
2025-01-29 11:36:33 +01:00
Juliusz Sosinowicz
76e29be1a9
ascon: remove 6 round perm as its not used
2025-01-29 11:33:11 +01:00
Juliusz Sosinowicz
028b5b3cda
Fix references to match NIST draft
2025-01-29 11:31:34 +01:00
Juliusz Sosinowicz
3e65b927dd
fixup! ascon: added forced permutation unroll
2025-01-29 11:26:04 +01:00
Juliusz Sosinowicz
1018144ece
fixup! Initial ASCON hash256 and AEAD128 support based on NIST SP 800-232 ipd
2025-01-29 11:24:29 +01:00
Juliusz Sosinowicz
0e20cbe210
ascon: move implementation defines to source file
2025-01-29 11:10:44 +01:00
Juliusz Sosinowicz
ab5ce46bf3
ascon: move key to start of struct to avoid gaps in the struct
2025-01-29 11:08:16 +01:00
Juliusz Sosinowicz
ddcc189094
ascon: fix api naming Deinit -> Clear
2025-01-29 11:07:40 +01:00
Juliusz Sosinowicz
c5ad780798
Force experimental flag to enable ascon
2025-01-29 11:02:47 +01:00
Juliusz Sosinowicz
e4100d977c
ascon: added forced permutation unroll
2025-01-29 11:02:47 +01:00
Juliusz Sosinowicz
0e7bee9577
ascon-aead: add benchmarking
2025-01-29 11:02:47 +01:00
Juliusz Sosinowicz
0309c3a084
Add docs
2025-01-29 11:02:47 +01:00
Juliusz Sosinowicz
e3a612300b
Initial ASCON hash256 and AEAD128 support based on NIST SP 800-232 ipd
...
Implemented based on the NIST Initial Public Draft "NIST SP 800-232 ipd". Testing based on KAT's available at https://github.com/ascon/ascon-c . Added configuration for testing in github action.
2025-01-29 11:02:47 +01:00
Sean Parkinson
08a46f5431
LMS: Fix SHA-256-192 level 1, height 20
...
Fix parameters for SHA-256-192, Level 1, Height 20, Winternitz: 2, 4, 8
2025-01-29 08:50:43 +10:00
David Garske
45b385ade3
Merge pull request #8389 from douzzer/20250127-fix-disable-tls-config
...
20250127-fix-disable-tls-config
2025-01-28 09:09:08 -08:00
Daniel Pouzzner
2eb775d5c3
configure.ac: add enable_dtls_mtu, enable_dtlscid, and enable_dtls_frag_ch to features disabled when $ENABLED_TLS" = "no".
2025-01-28 09:46:39 -06:00
David Garske
d78338f485
Merge pull request #8387 from SparkiDev/code_gen_fixes_1
...
ASM, SP, C regeneration
2025-01-28 07:13:30 -08:00
Sean Parkinson
f8bc819fb5
ASM, SP, C regeneration
...
Fix spaces at start of copyright line in .asm files.
Changed generation of X25519 and Ed448 code to better match changes
already in C code. Fixed formatting in places.
2025-01-28 14:47:33 +10:00
JacobBarthelmeh
c48ba69063
Merge pull request #8377 from dgarske/cmake_win32
...
Fix for building wolfSSL with CMake on MINGW and MSYS
2025-01-27 16:34:36 -07:00
David Garske
c556e4305c
Merge pull request #8385 from JacobBarthelmeh/spelling
...
add macro CONFIG_WOLFTPM to list for zephyr use
2025-01-27 14:54:03 -08:00
JacobBarthelmeh
edd8355576
Merge pull request #8326 from gasbytes/patch-rng-health-test-heap-hint
...
Fix missing heap hint in RNG health test XMALLOC call
2025-01-27 13:49:53 -08:00
JacobBarthelmeh
f0fdc72774
Merge pull request #8384 from gojimmypi/pr-post-release-239b85c80-arduino
...
Correct Arduino comments spelling
2025-01-27 13:49:00 -08:00
JacobBarthelmeh
0f0b9ef401
add macro CONFIG_WOLFTPM to list for zephyr use
2025-01-27 14:47:20 -07:00
David Garske
570fec687a
Fix for building wolfSSL with CMake on MINGW and MSYS.
2025-01-27 10:43:56 -08:00
gojimmypi
6f90a473f0
Correct Arduino comments spelling
2025-01-27 10:26:11 -08:00
David Garske
127e7e9109
Merge pull request #8379 from douzzer/20250125-aarch64-armasm-AES-ECB-fix
...
20250125-aarch64-armasm-AES-ECB-fix
2025-01-27 10:07:36 -08:00
David Garske
8bf057c7e9
Merge pull request #8381 from gojimmypi/pr-post-release-239b85c80-arduino
...
Update Arduino comments for post-release publish
2025-01-27 08:31:41 -08:00
David Garske
6ed0a97fc4
Merge pull request #8382 from aidangarske/tpm_zephyr_support
...
Added neccesary macros when building wolfTPM Zephyr with wolfSSL
2025-01-27 08:01:57 -08:00
David Garske
e1534a3c8a
Merge pull request #8344 from SparkiDev/poly1305_arm32_neon
...
Poly1305 ARM32 NEON: add implementation
2025-01-27 07:52:50 -08:00
David Garske
ed390e472d
Merge pull request #8373 from julek-wolfssl/libimobiledevice-1.3.0
...
Changes for libimobiledevice 860ffb
2025-01-27 07:52:06 -08:00
David Garske
1721421d59
Merge pull request #8383 from julek-wolfssl/add-dtls-to-enable-all
...
Expand enable-all
2025-01-27 07:50:24 -08:00
Juliusz Sosinowicz
8ca59242a2
Expand enable-all
...
- Add dtls mtu to enable-all
- Add dtls 1.3 to enable-all
- Add dtls cid to enable-all
- Add dtls ch frag to enable-all
2025-01-27 13:38:00 +01:00
Juliusz Sosinowicz
89aba661fc
Changes for libimobiledevice 860ffb
2025-01-27 12:56:49 +01:00
aidan garske
146080edc4
zephyr fix for failing test tpm added necessary api's when using wolftpm
2025-01-26 13:44:51 -08:00
gojimmypi
691fc2e71f
Update Arduino comments for post-release publish
2025-01-26 10:49:31 -08:00
Daniel Pouzzner
34dddf0d11
wolfcrypt/src/aes.c: in _AesEcbEncrypt() and _AesEcbDecrypt(), implement missing iteration for AES_encrypt_AARCH64() and AES_decrypt_AARCH64().
2025-01-25 16:23:41 -06:00
David Garske
337932806d
Merge pull request #8378 from douzzer/20250125-fips204-fixes
...
20250125-fips204-fixes
2025-01-25 08:48:14 -08:00
Daniel Pouzzner
b41d46a158
src/ssl.c and src/ssl_load.c: fix syntax flubs in WOLFSSL_DILITHIUM_FIPS204_DRAFT paths.
2025-01-25 10:11:25 -06:00
David Garske
0932891b5b
Merge pull request #8370 from douzzer/20250120-lean-fips
...
20250120-lean-fips
2025-01-24 19:13:21 -08:00
Daniel Pouzzner
f7abd7cb25
opensslcoexist fixes: add WOLFSSL_EVP_MD_FLAG_XOF, and use WC_MD4_BLOCK_SIZE, not MD4_BLOCK_SIZE.
2025-01-24 20:14:39 -06:00
Daniel Pouzzner
e6b87c2e54
src/ssl.c: work around false positive from scan-build in wolfSSL_writev(), long ago annotated with PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"").
...
wolfcrypt/src/misc.c: fix typo, max_size_t_() -> max_size_t().
2025-01-24 17:55:55 -06:00
Daniel Pouzzner
91aad90c59
wolfssl/internal.h and src/internal.c:
...
change Buffers.prevSent and .plainSz from int to word32;
change SendData() sz arg from int sz to size_t sz;
add asserts in SendData() and ReceiveData() to prevent sz > INT_MAX (assuring no overflow internally or in the returned int).
wolfssl/ssl.h and src/ssl.c:
change WOLFSSL_BUFFER_INFO.length from unsigned int to word32 (no functional change, just for consistency);
add wolfSSL_write_internal(), refactor wolfSSL_write() to call it, and fix wolfSSL_write_ex() to take size_t sz, not int sz.
2025-01-24 17:16:08 -06:00
Daniel Pouzzner
1b338abb2d
fix wolfSSL_read_ex() prototype with size_t sz, not int sz, for consistency with OpenSSL;
...
fix internal functions wolfSSL_read_internal() and ReceiveData() to likewise accept size_t sz;
add negative sz checks where needed to other functions that call wolfSSL_read_internal() and ReceiveData();
add min_size_t() and max_size_t() to misc.c/misc.h.
2025-01-24 16:16:43 -06:00
Daniel Pouzzner
93ac482772
linuxkm/module_hooks.c: in wolfssl_init(), #ifdef HAVE_FIPS, wc_RunAllCast_fips();
...
wolfcrypt/src/aes.c: add missing parens in GHASH_ONE_BLOCK_SW() to mollify clang-tidy;
wolfssl/wolfcrypt/fips_test.h: add FIPS_CAST_AES_ECB;
wolfssl/wolfcrypt/settings.h: #ifdef WOLFSSL_LINUXKM, #undef HAVE_LIMITS_H.
2025-01-24 16:09:43 -06:00
Daniel Pouzzner
09ac8c69db
fixes for clang-tidy complaints with NO_ERROR_STRINGS.
2025-01-24 16:09:43 -06:00
Daniel Pouzzner
0ec17dfed5
wolfssl/wolfcrypt/types.h: tweak for buildability in no-PK FIPS, re limits.h.
2025-01-24 16:09:43 -06:00
Daniel Pouzzner
bd014e02e0
configure.ac: tweaks for clarity
2025-01-24 16:09:43 -06:00
Daniel Pouzzner
ca9228467a
Merge pull request #8376 from dgarske/quic_test
...
Fix for QUIC test `test_provide_quic_data`
2025-01-24 16:09:29 -06:00
David Garske
5d43e74167
Fix for QUIC test introduced in PR #8358 .
2025-01-24 12:45:34 -08:00
David Garske
8ab85a2df7
Merge pull request #8375 from kareem-wolfssl/zd19270
...
Fix warning about ESP_IDF_VERSION_MAJOR not being defined when defining FREERTOS.
2025-01-24 12:16:34 -08:00
David Garske
20ae10fd8c
Merge pull request #8360 from philljj/dual_alg_mldsa
...
Update ssl code for ML_DSA.
2025-01-24 11:55:04 -08:00
David Garske
ba88a6454c
Merge pull request #8331 from julek-wolfssl/bind-9.18.28
...
Bind 9.18.28 fixes
2025-01-24 11:37:26 -08:00
David Garske
2e87dfc207
Merge pull request #8345 from JacobBarthelmeh/python_update
...
Python update to 3.12.6
2025-01-24 11:37:10 -08:00
David Garske
7ad4131b13
Merge pull request #8343 from anhu/maxq_pkcs11
...
New additions for MAXQ with wolfPKCS11
2025-01-24 11:34:27 -08:00
Kareem
eb64ea1fa7
Fix warning about ESP_IDF_VERSION_MAJOR not being defined when defining FREERTOS.
2025-01-24 12:01:25 -07:00
Anthony Hu
18396c4740
New additions for MAXQ with wolfPKCS11
...
- Support using MAXQ for:
- AES-ECB
- AES-CCM
- AES-CBC
- ECC Key Generation and ECDH
- in wc_ecc_import_private_key_ex():
- check to make sure devId is not invalid before calling wc_MAXQ10XX_EccSetKey().
- This is because the raspberry pi sometimes need to sign stuff.
- in aes_set_key() and ecc_set_key():
- delete a key in case it already exists; ignore error since it might not exist.
- unlock, lock the HW mutex around ECDSA_sign() because it needs access to rng
- in wolfSSL_MAXQ10XX_CryptoDevCb:
- allow maxq1065 to call the crypto callback.
- do not set the key during signing; use pre provisioned one instead (DEVICE_KEY_PAIR_OBJ_ID)
2025-01-24 13:53:27 -05:00
JacobBarthelmeh
69be9aa211
fix to not stomp on sz with XOF function, restore comment, remove early XFREE call
2025-01-24 11:40:53 -07:00
Juliusz Sosinowicz
829c2a022f
Free'ing ctx->srp has to be reference counted as well
2025-01-24 18:39:11 +01:00
JacobBarthelmeh
8eb6b5a3e4
clang tidy unused parameter warning
2025-01-24 00:34:41 -07:00
JacobBarthelmeh
2526d91300
formating for line length and guard on access to EncryptedInfo struct
2025-01-23 23:56:28 -07:00
JacobBarthelmeh
52975150d4
add macro guard for shak128 to test case
2025-01-23 23:14:50 -07:00
JacobBarthelmeh
d2d664b4cc
adjust test cases for different builds
2025-01-23 23:02:34 -07:00
Sean Parkinson
ecacbae3a0
Poly1305 ARM32 NEON: add implementation
...
Add assembly for Poly1305 using ARM32 NEON instruction set.
For Poly1305 ARM32 Base:
Change name from poly1305_blocks_arm32_16 to poly1305_arm32_blocks_16
poly1305.c:
ARM32 NEON - buffer up to 4 blocks
x86_64 - only calculate powers of r once after key is set.
test.c: poly1305 testing with multiple updates.
benchmark: chacha20-poly1305 now uses AAD
2025-01-24 13:28:46 +10:00
JacobBarthelmeh
9b04a4f8d1
account for correct return value of cipher stack push and clSuite use case after rebase
2025-01-23 17:47:24 -07:00
David Garske
f1e06e1f6a
Merge pull request #8371 from lealem47/fix-norealloc-crash
...
Fix for WOLFSSL_NO_REALLOC build crash
2025-01-23 16:08:34 -08:00
JacobBarthelmeh
41e00dc3c9
handle edge case with wolfSSL_write_ex and refactor wolfSSL_get_client_ciphers
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
1e3d3ddec7
remove attempting to load a CRL with wolfSSL_CTX_load_verify_locations_ex
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
8ca979f892
refactor clSuites internal use, and check return values with setting PARAMS
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
86ed94f2e3
change return of stub functions to be failure, pass PEM password cb and user data along
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
2eb42f1cea
adjust behavior when calling non XOF digest final function with XOF digest type
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
286b9b672b
increase test coverage
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
fc563f2e20
cast data input to const and resolve overlong line length
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
da7543f65b
fix for macro guard with QT build
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
661f6b04a2
fix for macro guard on free of clSuites
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
2812baf5a9
fix for memory leak with new wolfSSL_get_client_ciphers function
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
49c515ac58
add some unit test cases
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
418e63e448
fix for smallstack build
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
a9efd7358a
resolve memory leak on error
2025-01-23 16:30:08 -07:00
JacobBarthelmeh
363ecd3756
add macro guards to account for alternate builds
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
28bed8d634
fix for SN (short name) of digests to match expected values
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
c6974a921d
fix for return values of write_ex/read_ex, propogate PARAMS, handle CRL with load_verify_locations, fix for get verified/unverified chain
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
689c61cc7e
adding implementation of wolfSSL_get_client_ciphers
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
d8a9aaad16
add key mismatch error
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
7d374a2ca5
fix SSL_write_ex return value and build with extra trace debug
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
3b23a05157
flush out x509 object stack deep copy and md get flag
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
f9e289881b
stub out all functions needed for Python port update
2025-01-23 16:30:07 -07:00
JacobBarthelmeh
0ebb5f7238
add short name WC_SN macros
2025-01-23 16:30:07 -07:00
Lealem Amedie
eda98712d5
Fix for NO_REALLOC build crash
2025-01-23 16:14:45 -07:00
David Garske
fee2364e04
Merge pull request #8369 from lealem47/zd18687
...
Fix OPENSSL_ALL build with WOLFSSL_NO_REALLOC
2025-01-23 14:29:34 -08:00
Lealem Amedie
161da6046c
Skip MQX InitMutex call if FIPS module is in Init Mode
2025-01-23 14:00:00 -07:00
Lealem Amedie
49a74daebc
Fix OPENSSL_ALL build with WOLFSSL_NO_REALLOC
2025-01-23 13:59:30 -07:00
jordan
2ef90b1f89
ML-DSA/Dilithium: update ssl code for ML_DSA final.
2025-01-23 15:33:26 -05:00
Kaleb Himes
dd2c5b1a4c
Merge pull request #8368 from douzzer/20250122-enable-fips-requires-arg
...
20250122-enable-fips-requires-arg
2025-01-22 12:49:11 -07:00
Daniel Pouzzner
bcdfc5791c
wolfssl/ssl.h: fix speling erorr (thanks codespell).
2025-01-22 12:49:36 -06:00
Daniel Pouzzner
6102dafa48
configure.ac: require explicit arg for --enable-fips.
2025-01-22 12:48:52 -06:00
David Garske
1729d03123
Merge pull request #8338 from julek-wolfssl/openldap-2.6.7
...
Add openldap 2.6.7 testing
2025-01-22 07:20:51 -08:00
David Garske
f61d276f3b
Merge pull request #8362 from JacobBarthelmeh/copyright
...
update copyright date to 2025
2025-01-21 16:23:49 -08:00
David Garske
a7fcf419a7
Merge pull request #8366 from JacobBarthelmeh/spelling
...
misc. spelling fixes
2025-01-21 15:38:13 -08:00
David Garske
efb8a221d6
Merge pull request #8365 from anhu/retcode_comm
...
Add some comments to explain return codes.
2025-01-21 15:37:50 -08:00
JacobBarthelmeh
d94c043b09
misc. spelling fixes
2025-01-21 16:18:28 -07:00
Anthony Hu
d7a2be62a3
Add some comments to explain return codes.
2025-01-21 18:00:47 -05:00
David Garske
c456cbdfbc
Merge pull request #8351 from anhu/lms_guards_256256
...
Better guarding for LMS SHA256_256 vs LMS SHA256_192
2025-01-21 10:56:13 -08:00
David Garske
5df6989eab
Merge pull request #8350 from embhorn/zd19220
...
Check r and s len before copying
2025-01-21 10:36:54 -08:00
JacobBarthelmeh
a4c58614b9
Merge pull request #8324 from julek-wolfssl/ntp-4.2.8p17
...
ntp 4.2.8p17 additions
2025-01-21 10:02:23 -08:00
JacobBarthelmeh
78ffa54d60
fix rewrite issue from license script
2025-01-21 10:03:33 -07:00
JacobBarthelmeh
2c24291ed5
update copyright date
2025-01-21 09:55:03 -07:00
David Garske
0c883391f5
Merge pull request #8327 from julek-wolfssl/libssh2
...
update libssh2 version to pass tests
2025-01-21 08:27:50 -08:00
David Garske
eb261836a7
Merge pull request #8358 from julek-wolfssl/gh/8156-2
...
quic_record_append: return correct code
2025-01-21 08:22:15 -08:00
David Garske
e5f880a119
Merge pull request #8361 from redbaron/patch-1
...
Link to advapi32 on Windows
2025-01-20 16:30:55 -08:00
David Garske
d6912a8451
Merge pull request #8332 from mgrojo/feature/ada-psk
...
Ada binding: add support for PSK client callback
2025-01-20 10:31:04 -08:00
David Garske
98198335e6
Merge pull request #8357 from SparkiDev/entropy_memuse_apple_timer
...
Entropy Apple: change time function called
2025-01-20 07:58:14 -08:00
Eric Blankenhorn
9c4ef7cd30
Use BUFFER_E instead of ASN_PARSE_E when buffer is too small
2025-01-20 08:40:36 -06:00
Maxim Ivanov
aa46cd2ff3
Link to advapi32 on Windows
...
`rand.c` on Windows uses old CryptoAPI functions like CryptAcquireContext , which are present in advapi32, but it wasn't linked explicitly.
2025-01-20 12:07:02 +00:00
Juliusz Sosinowicz
88c6349837
quic_record_append: return correct code
...
0-return from quic_record_append is an error. `quic_record_complete(qr) || len == 0` is not an error condition. We should return as normal on success.
The issue is that passing in buffers with length 1 then 3 causes `qr_length` (in `quic_record_make`) to return 0. Then when `quic_record_append` gets called the `len` gets consumed by the first `if` and `len == 0` is true. This causes the error return which is not correct behaviour.
Reported in https://github.com/wolfSSL/wolfssl/issues/8156 . Reproducing is a bit tricky. I couldn't get the docker to work.
First setup ngtcp2 as described in https://github.com/ngtcp2/ngtcp2/pkgs/container/ngtcp2-interop . The Relevant steps are (I tested with master/main branches of all libs):
```
$ git clone --depth 1 -b v5.7.4-stable https://github.com/wolfSSL/wolfssl
$ cd wolfssl
$ autoreconf -i
$ # For wolfSSL < v5.6.6, append --enable-quic.
$ ./configure --prefix=$PWD/build \
--enable-all --enable-aesni --enable-harden --enable-keylog-export \
--disable-ech
$ make -j$(nproc)
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/local/include" LIBEV_LIBS="-L/opt/local/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../wolfssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig \
--with-wolfssl
$ make -j$(nproc) check
```
Download and unzip https://github.com/user-attachments/files/17621329/failing.pcap.zip
From the ngtcp2 dir:
```
./examples/wsslserver 127.0.0.1 44433 /path/to/wolfssl/certs/server-key.pem /path/to/wolfssl/certs/server-cert.pem
```
Then run the following python script (`failing.pcap` has to be available in the running dir) (probably needs to be run as `sudo`):
```
from scapy.utils import rdpcap, PcapNgReader
from scapy.all import *
reader = PcapNgReader("failing.pcap")
for i in reader:
p = i[IP]
p.dport = 44433
p.dst = "127.0.0.1"
p[UDP].chksum=0
p.display()
send(p)
```
Then observe the log line:
```
I00000000 0xa48accb7b49ec1556ac7111c64d3a4572a81 frm tx 625216795 Initial CONNECTION_CLOSE(0x1c) error_code=CRYPTO_ERROR(0x100) frame_type=0 reason_len=0 reason=[]
```
You can also use `gdb` and place a break inside the following section in `wolfssl/src/quic.c`.
```
if (quic_record_complete(qr) || len == 0) {
return 0;
}
```
2025-01-16 11:39:57 -08:00
Sean Parkinson
6e383547dd
Entropy Apple: change time function called
...
Use clock_gettime_nsec_np and get the raw monotonic counter.
2025-01-16 04:14:55 +10:00
Sean Parkinson
e76186f060
Merge pull request #8356 from kareem-wolfssl/gh8355
...
Properly check for signature_algorithms from the client in a TLS 1.3 server.
2025-01-15 05:54:01 +10:00
Kareem
9f5c89ab4b
Properly check for signature_algorithms from the client in a TLS 1.3 server.
...
The server was checking ssl->extensions which will always have an entry for TLSX_SIGNATURE_ALGORITHMS
as it is unconditionally added by TLSX_PopulateExtensions earlier in the DoTls13ClientHello function.
Instead, check args->clSuites->hashSigAlgoSz which is only set if signature_algorithms is found and parsed by TLSX_Parse.
2025-01-13 16:22:28 -07:00
JacobBarthelmeh
e037e0875d
Merge pull request #8352 from douzzer/20240110-revert-8340
...
20240110-revert-8340
2025-01-10 17:31:34 -07:00
Daniel Pouzzner
d4c654205b
Revert "quic_record_append: return correct code"
...
This reverts commit bc12dad041
.
This commit broke builds that combine QUIC and PQ -- known failures are pq-all-valgrind-unittest, pq-hybrid-all-rpk, pq-hybrid-all-rpk-valgrind-unittest, quantum-safe-wolfssl-all-gcc-latest, quantum-safe-wolfssl-all-g++-latest, quantum-safe-wolfssl-all-fortify-source-asm, quantum-safe-wolfssl-all-fortify-source-asm-noasm, and quantum-safe-wolfssl-all-intelasm-sp-asm-valgrind.
Note that the unit.test asserts added by this commit fail both before and after reversion.
2025-01-10 17:38:02 -06:00
JacobBarthelmeh
99a6e82ff8
Merge pull request #8349 from douzzer/20250109-memory-errors
...
20250109-memory-errors
2025-01-10 15:58:30 -07:00
Eric Blankenhorn
462aa5bec6
Exclude new test for FIPS
2025-01-10 16:47:13 -06:00
Anthony Hu
4ca65f0ce7
Better guarding for LMS SHA256_256 vs LMS SHA256_192
2025-01-10 17:24:05 -05:00
Daniel Pouzzner
dc2ada117e
wolfcrypt/benchmark/benchmark.c: fix check_for_excessive_stime() to accept the algo and strength, for proper rendering on asym algs.
2025-01-10 15:48:24 -06:00
Daniel Pouzzner
b16bedf82a
more fixes guided by clang-tidy heap analyzer using clang-20.0.0_pre20250104:
...
wolfcrypt/src/integer.c: add additional guards against OOB access from uint wraps and null derefs of mp_int.dp, and refactor mp_grow() and mp_init_size() to use XMEMSET, for the benefit of clang-tidy. in mp_grow(), fix the condition for the realloc to assure always evaluated if a->alloc == 0.
wolfcrypt/src/asn.c: fix wc_CreatePKCS8Key() so that *outSz is always assigned when LENGTH_ONLY_E is returned.
wolfcrypt/src/pkcs7.c: remove redundant inner condition in wc_PKCS7_EncodeAuthEnvelopedData(), added in previous commit and caught on review by Jacob (thanks!).
wolfcrypt/src/sp_int.c: in sp_mont_norm(), add another suppression for the same false positive in sp_mul() suppressed in previous commit.
wolfcrypt/src/srp.c: refactor SrpHashSize() to return ALGO_ID_E rather than 0 when unknown/uncompiled alg is requested.
2025-01-10 15:48:05 -06:00
Daniel Pouzzner
7cd2fd3617
numerous fixes for memory errors reported by clang-tidy, most of them true positives, unmasked by CPPFLAGS=-DNO_WOLFSSL_MEMORY: clang-analyzer-unix.Malloc, clang-analyzer-core.NullDereference, clang-analyzer-core.uninitialized.Assign, clang-analyzer-core.UndefinedBinaryOperatorResult, and clang-analyzer-optin.portability.UnixAPI (re malloc(0)).
...
several fixes for defects reported by cppcheck:
wolfcrypt/src/ecc.c: fix for cppcheck oppositeInnerCondition from cppcheck-2.16.0 in _ecc_make_key_ex(), and fixes for related unhandled errors discovered by manual inspection;
wolfcrypt/test/test.c: fix XREALLOC call in memcb_test() to resolve cppcheck-detected memleak.
2025-01-10 14:30:42 -06:00
JacobBarthelmeh
21bdb76ede
Merge pull request #8340 from julek-wolfssl/gh/8156
...
quic_record_append: return correct code
2025-01-10 12:08:27 -07:00
Reda Chouk
d491e54c98
Fix heap hint usage in wc_RNG_HealthTest
...
Pass provided heap hint to XMALLOC instead of NULL in RNG health test
function to ensure proper memory allocation with custom heap.
2025-01-10 19:13:53 +01:00
JacobBarthelmeh
0e3020b99b
Merge pull request #8337 from julek-wolfssl/libvncserver-0.9.14
...
Add 0.9.14 to tested libvncserver builds
2025-01-10 10:58:12 -07:00
JacobBarthelmeh
c977d627ed
Merge pull request #8303 from night1rider/ZD-19038
...
Extended Master Secret Generation PK Callback
2025-01-10 10:53:26 -07:00
JacobBarthelmeh
dc6669b772
Merge pull request #8321 from julek-wolfssl/fips-check-update-help
...
fips-check.sh: Update the help output
2025-01-10 10:48:14 -07:00
Eric Blankenhorn
53831d0f32
Add test
2025-01-10 10:06:14 -06:00
David Garske
197a7e0ba3
Merge pull request #8348 from SparkiDev/aarch64_cpuid_freebsd_fix
...
Aarch64 CPU Id: FreeBSD/OpenBSD fix
2025-01-10 06:59:01 -08:00
Eric Blankenhorn
139504b9fd
Check r and s len before copying
2025-01-10 08:46:40 -06:00
Sean Parkinson
aa8a2144c8
Aarch64 CPU Id: FreeBSD/OpenBSD fix
...
Fix name and flags set.
2025-01-10 08:28:45 +10:00
David Garske
5b07d41cb3
Merge pull request #8342 from douzzer/20250108-reproducible-build-backtrace
...
20250108-reproducible-build-backtrace
2025-01-08 15:23:14 -08:00
mgrojo
8122181e45
Ada binding: add support for the PSK server callbacks
...
Plus fix location of the certificate files in the examples.
Tested with both Ada examples:
```
obj/tls_server_main --psk
obj/tls_client_main 127.0.0.1 --psk
```
2025-01-09 00:11:01 +01:00
Daniel Pouzzner
ad5018ee5d
configure.ac: fix --enable-debug-trace-errcodes=backtrace with --enable-reproducible-build: don't add -g0 to CFLAGS when both are enabled, because -g0 makes backtracing impossible.
2025-01-08 15:59:11 -06:00
David Garske
5f95fe3730
Merge pull request #8341 from douzzer/20250108-PKCS12_CoalesceOctetStrings-leak
...
20250108-PKCS12_CoalesceOctetStrings-leak
2025-01-08 12:29:30 -08:00
Daniel Pouzzner
8d85ab964d
wolfcrypt/src/pkcs12.c: fix resource leak in PKCS12_CoalesceOctetStrings().
2025-01-08 13:39:33 -06:00
David Garske
78776ba6b3
Merge pull request #8339 from douzzer/20250107-clang-tidy-xmss
...
20250107-clang-tidy-xmss
2025-01-08 10:16:15 -08:00
Juliusz Sosinowicz
bc12dad041
quic_record_append: return correct code
...
0-return from quic_record_append is an error. `quic_record_complete(qr) || len == 0` is not an error condition. We should return as normal on success.
The issue is that passing in buffers with length 1 then 3 causes `qr_length` (in `quic_record_make`) to return 0. Then when `quic_record_append` gets called the `len` gets consumed by the first `if` and `len == 0` is true. This causes the error return which is not correct behaviour.
Reported in https://github.com/wolfSSL/wolfssl/issues/8156 . Reproducing is a bit tricky. I couldn't get the docker to work.
First setup ngtcp2 as described in https://github.com/ngtcp2/ngtcp2/pkgs/container/ngtcp2-interop . The Relevant steps are (I tested with master/main branches of all libs):
```
$ git clone --depth 1 -b v5.7.4-stable https://github.com/wolfSSL/wolfssl
$ cd wolfssl
$ autoreconf -i
$ # For wolfSSL < v5.6.6, append --enable-quic.
$ ./configure --prefix=$PWD/build \
--enable-all --enable-aesni --enable-harden --enable-keylog-export \
--disable-ech
$ make -j$(nproc)
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/nghttp3
$ cd nghttp3
$ autoreconf -i
$ ./configure --prefix=$PWD/build --enable-lib-only
$ make -j$(nproc) check
$ make install
$ cd ..
$ git clone --recursive https://github.com/ngtcp2/ngtcp2
$ cd ngtcp2
$ autoreconf -i
$ # For Mac users who have installed libev with MacPorts, append
$ # LIBEV_CFLAGS="-I/opt/local/include" LIBEV_LIBS="-L/opt/local/lib -lev"
$ ./configure PKG_CONFIG_PATH=$PWD/../wolfssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig \
--with-wolfssl
$ make -j$(nproc) check
```
Download and unzip https://github.com/user-attachments/files/17621329/failing.pcap.zip
From the ngtcp2 dir:
```
./examples/wsslserver 127.0.0.1 44433 /path/to/wolfssl/certs/server-key.pem /path/to/wolfssl/certs/server-cert.pem
```
Then run the following python script (`failing.pcap` has to be available in the running dir) (probably needs to be run as `sudo`):
```
from scapy.utils import rdpcap, PcapNgReader
from scapy.all import *
reader = PcapNgReader("failing.pcap")
for i in reader:
p = i[IP]
p.dport = 44433
p.dst = "127.0.0.1"
p[UDP].chksum=0
p.display()
send(p)
```
Then observe the log line:
```
I00000000 0xa48accb7b49ec1556ac7111c64d3a4572a81 frm tx 625216795 Initial CONNECTION_CLOSE(0x1c) error_code=CRYPTO_ERROR(0x100) frame_type=0 reason_len=0 reason=[]
```
You can also use `gdb` and place a break inside the following section in `wolfssl/src/quic.c`.
```
if (quic_record_complete(qr) || len == 0) {
return 0;
}
```
2025-01-08 18:53:43 +01:00
Daniel Pouzzner
fd664fd597
wolfcrypt/src/integer.c: add sanity checks to mollify clang-tidy 20.0.0_pre20250104: in mp_grow(), error if the mp_int has a null .dp but nonzero .alloc; in s_mp_add() and s_mp_sub(), error if either operand has a null .dp but the constant of iteration (from .used) is positive. these fix 6 distinct clang-analyzer-core.NullDereferences, of undetermined accuracy (possibly benign).
2025-01-08 11:09:27 -06:00
Daniel Pouzzner
632d1c7ada
wolfcrypt/src/wc_xmss_impl.c: fix error-checking comparisons in wc_xmss_bds_state_load() and wc_xmss_bds_state_store(), and remove no-longer-needed suppression in wc_xmss_sign().
...
.wolfssl_known_macro_extras: remove unneeded WOLFSSL_GAISLER_BCC and WOLFSSL_NO_AES_CFB_1_8.
wolfcrypt/src/dh.c: reformat overlong lines.
2025-01-07 17:37:11 -06:00
Daniel Pouzzner
27c37b245f
tests/api.c: in test_dtls12_basic_connection_id(), add cast to fix a -Wformat on size_t j when building -m32.
2025-01-07 16:51:30 -06:00
mgrojo
815f99d0c2
Ada binding: improve comments and arguments in the PSK case
...
- Add comments for the PSK value in the example.
- Add runtime argument for executing the PSK test.
- Warn user that their callback implementation can't be in the SPARK subset.
2025-01-07 23:12:14 +01:00
Daniel Pouzzner
b6ce89c429
wolfcrypt/src/pkcs7.c: in wc_PKCS7_BuildSignedAttributes(), clear cannedAttribs[idx] before it's conditionally populated, to prevent possible uninited data read in subsequent EncodeAttributes().
2025-01-07 15:03:18 -06:00
Daniel Pouzzner
8c32238733
wolfcrypt/src/wc_xmss_impl.c: guided by clang-tidy 20.0.0_pre20250104, add some error-checking to wc_xmss_bds_state_load() and wc_xmss_bds_state_store(), but ultimately, suppress a pair of stubborn apparently-false "function call argument is an uninitialized value" warnings, one in wc_xmss_bds_state_store() and one in wc_xmss_sign().
2025-01-07 14:04:01 -06:00
Daniel Pouzzner
78c4a04cac
Merge pull request #8330 from dgarske/compat
...
Fix for SSL_set_mtu compat function return code
2025-01-07 10:52:59 -06:00
David Garske
a3d879f1c6
Merge pull request #8336 from douzzer/20250107-clang-tidy-null-derefs
...
20250107-clang-tidy-null-derefs
2025-01-07 08:07:06 -08:00
David Garske
4a12351a82
Merge pull request #8335 from douzzer/20250106-_DhSetKey-FFDHE-short-circuit
...
20250106-_DhSetKey-FFDHE-short-circuit
2025-01-07 08:06:37 -08:00
David Garske
d2ea3c67c5
Merge pull request #8329 from douzzer/20250103-Sha512Final-no-scratch-digest
...
20250103-Sha512Final-no-scratch-digest
2025-01-07 08:05:31 -08:00
Juliusz Sosinowicz
d704dda47b
Add openldap 2.6.7 testing
2025-01-07 13:01:56 +01:00
Juliusz Sosinowicz
cb4d161668
Add 0.9.14 to tested libvncserver builds
2025-01-07 11:45:43 +01:00
Juliusz Sosinowicz
40500e4f2b
fixup! Implement wolfSSL_X509_STORE_set_default_paths
2025-01-07 10:56:34 +01:00
Daniel Pouzzner
d6ead1b3e5
src/tls.c: fix possible null deref in TLSX_UseCertificateStatusRequestV2().
...
wolfcrypt/src/pkcs12.c: fix possible null deref in PKCS12_CoalesceOctetStrings(), and fix spelling of PKCS12_ConcatenateContent().
2025-01-07 00:00:48 -06:00
Daniel Pouzzner
fffafe661a
wolfcrypt/src/dh.c: in _DhSetKey(), add short-circuit comparisons to RFC 7919 known-good moduli, preempting overhead from mp_prime_is_prime().
...
wolfcrypt/test/test.c: in dh_ffdhe_test(), when defined(HAVE_PUBLIC_FFDHE), use wc_DhSetKey_ex() rather than wc_DhSetKey() to exercise the primality check in _DhSetKey().
2025-01-06 14:52:42 -06:00
David Garske
1679218a88
Merge pull request #8333 from SparkiDev/sp_int_rshb_codesonar
...
SP int: stop CodeSonar complaining about i being negatve
2025-01-06 11:44:32 -08:00
Daniel Pouzzner
5172ff7ee3
wolfcrypt/src/sha512.c: in Sha512FinalRaw() and wc_Sha384FinalRaw(), refactor out the scratch digest -- ByteReverseWords64() is safe in-place, and the scratch digest caused a SEGV in the XMEMCPY() on AVX512-capable targets built with gcc -march=native unless XALIGN(64), due to gcc bug(s).
2025-01-06 11:06:56 -06:00
Sean Parkinson
13ce92cc1f
SP int: stop CodeSonar complaining about i being negatve
...
n is checked for negative and fail out in that case.
i is n devided by a positive constant and can never be negative.
2025-01-06 10:04:14 +10:00
mgrojo
11a40a610e
Ada binding: add support for PSK client callback
...
Tested with:
`wolfSSL/wolfssl-examples/psk/server-psk.c`
after changing `DTLSv1_3_Client_Method` to `DTLSv1_2_Client_Method` to comply with the server example.
2025-01-04 20:03:04 +01:00
Juliusz Sosinowicz
341ed32223
Add bind9 CI testing
2025-01-03 20:47:51 +01:00
David Garske
d6440be4a9
Fix for SSL_set_mtu -> wolfSSL_set_mtu_compat return code. Update comment for wolfSSL_is_init_finished
indicating it works for TLS and DTLS.
2025-01-03 10:10:37 -08:00
Juliusz Sosinowicz
02e942334b
Define WOLFSSL_MAX_SSL_SESSION_ID_LENGTH
2025-01-03 17:09:47 +01:00
Juliusz Sosinowicz
4cc3eec587
Implement wolfSSL_X509_STORE_set_default_paths
2025-01-03 17:09:30 +01:00
Juliusz Sosinowicz
5ee8af2351
wolfSSL_i2o_ECPublicKey: use uncompressed when selected
2025-01-03 14:24:34 +01:00
David Garske
71b7d0c9de
Merge pull request #8328 from douzzer/20250102-fips-v6-update-to-5v7v6
...
20250102-fips-v6-update-to-5v7v6
2025-01-02 16:01:05 -08:00
David Garske
5a6e92c793
Merge pull request #8325 from SparkiDev/aarch64_cpuid_aesgcm_kyber
...
Aarch64 ASM: Use CPU features for more
2025-01-02 14:51:35 -08:00
kaleb-himes
bb482d1881
Order into respective groups
2025-01-02 15:41:47 -07:00
Daniel Pouzzner
7d856aebd0
update FIPS v6 to point to wolfcrypt WCv6.0.0-RC3 (aka v5.7.6-stable) and fips WCv6.0.0-RC3.
2025-01-02 15:42:19 -06:00
Juliusz Sosinowicz
853c108802
update libssh2 version to pass tests
2025-01-02 17:00:57 +01:00
Juliusz Sosinowicz
353986bbf6
fips-check.sh: Update the help output
2025-01-02 12:43:43 +01:00
Sean Parkinson
7d3ee74a71
Aarch64 ASM: Use CPU features for more
...
AES GCM streaming - fix GHASH_ONE_BLOCK to use CPU feature information.
AES-GCM uses EOR3 (SHA-3 instruction) - split assembly code.
Kyber uses SQRDMLSH - split assembly code.
Changed define from WOLFSSL_AARCH64_NO_SQRMLSH to
WOLFSSL_AARCH64_NO_SQRDMLSH to match instruction.
Improved array data format for inline assembly code.
2025-01-02 19:56:04 +10:00
Daniel Pouzzner
239b85c804
Merge pull request #8323 from JacobBarthelmeh/release
...
prepare for release 5.7.6
2024-12-31 11:58:22 -06:00
Juliusz Sosinowicz
c3ada2760a
Add ntp 4.2.8p17 to tested versions
2024-12-31 17:06:46 +01:00
Juliusz Sosinowicz
af96f294fa
Add MD4 to EVP layer
2024-12-31 16:58:58 +01:00
JacobBarthelmeh
70e41d1ed1
prepare for release 5.7.6
2024-12-31 08:27:53 -07:00
Juliusz Sosinowicz
3cb2bb3759
OBJ_sn2nid: use correct short names
2024-12-31 12:50:04 +01:00
Daniel Pouzzner
d40698a103
Merge pull request #8322 from JacobBarthelmeh/coverity
...
fix for dead code warning CID444417
2024-12-30 17:56:28 -06:00
JacobBarthelmeh
c9bcbd8c52
fix for dead code warning CID444417
2024-12-30 16:14:28 -07:00
David Garske
8d7c60017c
Merge pull request #8263 from JacobBarthelmeh/rsa_pss
...
account for rsa_pss_rsae vs rsa_pss_pss type
2024-12-28 13:47:30 -08:00
JacobBarthelmeh
af4b5c2097
only run RSA-PSS interop test if cipher suites with ephemeral keys are available
2024-12-28 11:34:17 -08:00
JacobBarthelmeh
1ae0f7c66f
do not do resume with new test case
...
add wolfssl_no_resume flag to openssl.test
check for version of openssl testing against
check if RSA is supported for test case
guard on test case for TLS versions supported
2024-12-28 02:09:49 -08:00
David Garske
2e8f0176c9
Merge pull request #8316 from JacobBarthelmeh/x509ref
...
Up X509 refrence count and add test case
2024-12-27 10:37:28 -08:00
JacobBarthelmeh
3ee08d81db
fix for check on number of objects when free'ing and add test case
2024-12-27 08:09:03 -08:00
David Garske
5c6fdb52f1
Merge pull request #8319 from philljj/fix_coverity
...
coverity: correct lock message, check fd value.
2024-12-26 12:53:36 -08:00
JacobBarthelmeh
f57f044b39
Merge pull request #8318 from dgarske/CID444418
...
Fix for finishedSz checking with TLSv1.3 and `WOLFSSL_HAVE_TLS_UNIQUE` (CID444418)
2024-12-24 15:41:25 -07:00
jordan
c71392bb7e
coverity: correct lock message, check fd value.
2024-12-24 16:31:16 -06:00
David Garske
e1baf27831
CID444418. Fix for finishSz checking with TLSv1.3 and WOLFSSL_HAVE_TLS_UNIQUE
.
2024-12-24 13:38:57 -08:00
JacobBarthelmeh
17c17cde13
Merge pull request #8317 from night1rider/CID_444416
...
Free Val and Oid before returning error
2024-12-24 10:38:26 -07:00
JacobBarthelmeh
838fe22e61
Merge pull request #8314 from SparkiDev/aarch64_no_crypto_fallback
...
Aarch64 ASM: check CPU features before hw crypto instr use
2024-12-24 10:15:23 -07:00
JacobBarthelmeh
98d212d60b
Merge pull request #8315 from SparkiDev/regression_fixes_16
...
Regression testing fixes
2024-12-24 09:56:20 -07:00
msi-debian
545257e498
CID 444416
2024-12-24 09:35:40 -07:00
JacobBarthelmeh
3aa2881cd4
account for rsa_pss_rsae vs rsa_pss_pss type
2024-12-23 23:45:33 -07:00
Sean Parkinson
cad2ebde04
Regression testing fixes
...
test.c: Dilithium private key not available in cert_test.h unless
signing is enabled.
./configure --disable-shared --enable-dilithium=make,44,65,87
./configure --disable-shared --enable-dilithium=make,sign,44,65,87
./configure --disable-shared --enable-dilithium=make,verify,44,65,87
test.c: Dilithium doesn't have decode/encode when
WOLFSSL_DILITHIUM_NO_ASN1 is defined.
./configure --disable-shared --enable-dilithium=yes
CFLAGS=-DWOLFSSL_DILITHIUM_NO_ASN1
2024-12-24 13:55:21 +10:00
Sean Parkinson
e1851cd482
Aarch64 ASM: check CPU features before hw crypto instr use
...
For SHA-256, SHA-512 and SHA3, get the CPU features to see if hardware
crypto is available. If not then fallback to an alternate
implementation.
2024-12-24 12:08:12 +10:00
Sean Parkinson
93812e4286
Merge pull request #8289 from JacobBarthelmeh/harden
...
add option for additional sanity checks
2024-12-24 09:17:08 +10:00
JacobBarthelmeh
ee9b88541f
change default to no for --enable-faultharden
2024-12-23 13:51:30 -07:00
Daniel Pouzzner
a13d0fdd86
Merge pull request #8311 from SparkiDev/aarch64_cpuid_fix
...
Aarch64 CPU id: fix for privilege instruction detection
2024-12-23 11:52:14 -06:00
JacobBarthelmeh
2409971b14
Merge pull request #8224 from julek-wolfssl/dtls-server-demux
...
DTLS: Add server side stateless and CID QoL API
2024-12-23 10:01:01 -07:00
JacobBarthelmeh
36d5342f6b
Merge pull request #8310 from douzzer/20241221-wolfCrypt-more-AES_BLOCK_SIZE
...
20241221-wolfCrypt-more-AES_BLOCK_SIZE
2024-12-23 09:26:05 -07:00
Sean Parkinson
e7d7e47e07
Aarch64 CPU id: fix for privilege instruction detection
...
AES/PMULL is in four bits 4-7.
When value is 0b0010, this indicates both AES and PMULL. Fix code to set
both.
2024-12-23 11:23:14 +10:00
David Garske
2bcad989da
Merge pull request #8309 from douzzer/20241221-fix-CEscape-bounds-check
...
20241221-fix-CEscape-bounds-check
2024-12-21 14:51:46 -08:00
Daniel Pouzzner
50a0773c09
Merge pull request #8285 from LinuxJedi/gaisler
...
Add initial support for Gaisler-BCC with Sparc
2024-12-21 11:03:39 -06:00
Daniel Pouzzner
ed18bf3deb
In wolfcrypt/src/port/ and IDE/, replace remaining uses of AES_BLOCK_SIZE with WC_AES_BLOCKSIZE for compatibility with OPENSSL_COEXIST.
...
Automated replacement with
```
git ls-files -z wolfcrypt/src/port/ IDE/ | xargs -0 pcre2grep -l '[^_]AES_BLOCK_SIZE' | xargs sed --regexp-extended --in-place 's/([^_])AES_BLOCK_SIZE/\1WC_AES_BLOCK_SIZE/g'
```
Checked for mis-transformations with
```
git ls-files -z | xargs -0 pcre2grep '[^-[()+*/[:space:]]WC_AES_BLOCK_SIZE' | less
```
Checked for residual hits with
```
git ls-files -z | xargs -0 pcre2grep '[^_]AES_BLOCK_SIZE' | less
```
Deliberately excluded:
* ChangeLog.md -- do not alter history.
* doc/ -- do not confuse documentation with newly prefixed macro, because AES_BLOCK_SIZE is available unless -DOPENSSL_COEXIST.
* tests/api.c -- the unit tests deliberately use compatibility names, and are not compatible with -DOPENSSL_COEXIST.
* wrapper/CSharp/wolfSSL_CSharp/wolfCrypt.cs -- false positive hits on C# names.
* wrapper/CSharp/wolfCrypt-Test/wolfCrypt-Test.cs -- false positive hits on C# names.
* reference in wolfssl/wolfcrypt/aes.h that defines AES_BLOCK_SIZE when -UOPENSSL_COEXIST.
* reference in wolfssl/wolfcrypt/settings.h that defines WC_AES_BLOCK_SIZE for old FIPS when -UWC_AES_BLOCK_SIZE.
2024-12-21 10:28:18 -06:00
Daniel Pouzzner
4ff73b9024
wolfssl/wolfcrypt/aes.h: fix stray reference to AES_BLOCK_SIZE in def for GHASH_ONE_BLOCK().
2024-12-21 10:08:17 -06:00
Daniel Pouzzner
33a47c1c04
Merge pull request #8265 from JacobBarthelmeh/armasm
...
armasm with opensslcoexist build
2024-12-21 10:06:27 -06:00
Daniel Pouzzner
b07f2cb461
wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape(), introduced in 8bbe8a7c8a
(before which there was no bounds check at all).
2024-12-21 09:47:07 -06:00
Andrew Hutchings
231cea34ef
Add initial support for Gaisler-BCC with Sparc
...
Slight modifications and documentation to get wolfSSL working with
Gaisler Sparc CPUs and their cross-compilers.
2024-12-21 09:19:58 +00:00
Daniel Pouzzner
ad20593569
Merge pull request #8279 from LinuxJedi/sk_push_comments
...
Fix code comments for some x509.c functions
2024-12-21 00:09:18 -06:00
Daniel Pouzzner
67800c3a22
Merge pull request #8292 from JacobBarthelmeh/xsocktlen
...
set dk-s7g2 socklent
2024-12-21 00:01:33 -06:00
Daniel Pouzzner
5ef4732745
Merge pull request #8299 from JacobBarthelmeh/cert_regen
...
end of year test certificate renewal
2024-12-20 17:41:33 -06:00
Daniel Pouzzner
9d3e477b63
src/ssl.c: gate wolfSSL_dtls_set_pending_peer() on !defined(WOLFSSL_NO_SOCK), not just defined(WOLFSSL_DTLS_CID).
...
tests/api.c: in test_dtls12_basic_connection_id(), omit chacha20 suites if defined(HAVE_FIPS), and fix gate on DHE-PSK-NULL-SHA256.
2024-12-20 17:24:13 -06:00
Daniel Pouzzner
afc7e0eb8c
Merge pull request #8308 from cconlon/sessTickLenCheck
...
Remove dead code in TLSX_PopulateExtensions() around MAX_PSK_ID_LEN check
2024-12-20 16:41:09 -06:00
JacobBarthelmeh
961453b5ee
fix for free'ing up memory after use
2024-12-20 14:58:57 -07:00
JacobBarthelmeh
b273bff4e9
regenerate certs_test.h with raw dilithium keys
2024-12-20 11:50:11 -07:00
JacobBarthelmeh
67f3343a5d
Merge pull request #8306 from SparkiDev/kyber_no_avx2_fix
...
ML-KEM/Kyber: fix kyber_prf() for when no AVX2
2024-12-20 11:40:46 -07:00
JacobBarthelmeh
7cebe95138
Merge pull request #8304 from SparkiDev/regression_fixes_15
...
Regression testing: fixes
2024-12-20 11:29:15 -07:00
JacobBarthelmeh
3dd9f4631d
Merge pull request #8305 from kareem-wolfssl/zd19044
...
Fix a couple of missing bounds checks found via code analyzer.
2024-12-20 11:20:19 -07:00
JacobBarthelmeh
19e68ea71a
add a faketime test and update cert buffers
2024-12-20 10:35:58 -07:00
Chris Conlon
f68f99b000
Remove dead code in TLSX_PopulateExtensions() around MAX_PSK_ID_LEN check
2024-12-20 09:48:01 -07:00
Sean Parkinson
e507c466d5
ML-KEM/Kyber: fix kyber_prf() for when no AVX2
...
When no AVX2 available, kyber_prf() is called to produce more than one
SHAKE-256 blocks worth of ouput. Otherwise only one block is needed.
Changed function to support an outlen of greater than one block.
2024-12-20 11:03:58 +10:00
Kareem
8bbe8a7c8a
Fix a couple of missing bounds checks found via code analyzer.
2024-12-19 17:01:25 -07:00
night1rider
6617a8afca
Updating Client/Server with myGenExtMaster Callback
2024-12-19 16:27:35 -07:00
Sean Parkinson
b7c1e1cf35
Regression testing: fixes
...
src/x509.c: wolfssl_x509_name_entry_set() ne->object is freed if call to
wolfSSL_OBJ_nid2obj_ex() fails. Always assign directly back to
ne->object.
wolfcrypt/test/test.c: aes_ctr_test() doesn't need AES decrypt
./configure '--disable-shared' '--enable-cryptonly'
'CFLAGS=-DNO_AES_DECRYPT' '--disable-aescbc' '--disable-aesofb'
'--disable-aescfb' '--disable-aesgcm' '--disable-aesccm'
'--enable-aesctr' '--disable-aesxts' '--disable-aeseax'
tests/api.c: test_X509_STORE_InvalidCa() only defined when !NO_RSA
./configure '--disable-shared' '--enable-opensslall' '--disable-rsa'
tests/api.c: test_wolfSSL_GENERAL_NAME_print() free ridObj if not
assigned into gn.
2024-12-20 09:25:03 +10:00
Sean Parkinson
00f83facb2
Merge pull request #8302 from cconlon/sessTickLenCheck
...
Loosen MAX_PSK_ID_LEN check in TLSX_PopulateExtensions() to only server side
2024-12-20 08:44:10 +10:00
night1rider
2f4329306b
Initial Extended Master Secret PK Callback ZD#19038
2024-12-19 15:43:58 -07:00
JacobBarthelmeh
8ca790218c
certs_test.h is using raw dilithium keys
2024-12-19 15:23:37 -07:00
Daniel Pouzzner
ad8f74b650
examples/client/client.c and examples/client/client.c: use XSTRLCPY() to assure proper null termination.
2024-12-19 16:14:59 -06:00
JacobBarthelmeh
8fa238e554
Merge pull request #8301 from douzzer/20241219-gating-fixes
...
20241219-gating-fixes
2024-12-19 14:38:55 -07:00
JacobBarthelmeh
5b6ffe0795
add *.revoked to codespell skip
2024-12-19 14:35:43 -07:00
JacobBarthelmeh
abc87f9c6f
add regression test for gencertbuf.pl
2024-12-19 14:32:46 -07:00
Chris Conlon
1101841b95
Loosen MAX_PSK_ID_LEN check in TLSX_PopulateExtensions() to only server side
2024-12-19 14:26:22 -07:00
JacobBarthelmeh
e66905aaf6
fix for gencertbuf script and add dilithium public key
2024-12-19 14:25:12 -07:00
Daniel Pouzzner
994f218fcb
src/ssl.c and wolfssl/internal.h: gate in wolfSSL_get_ciphers_compat() in OPENSSL_EXTRA builds, so that --with-sys-crypto-policy works with OPENSSL_EXTRA but without OPENSSL_ALL.
...
configure.ac: more fixes for FIPS v6 armasm settings, re ENABLED_ARMASM_CRYPTO.
2024-12-19 14:29:39 -06:00
Juliusz Sosinowicz
ca4b1667ee
strcpy -> strncpy
2024-12-19 11:19:47 +01:00
Juliusz Sosinowicz
feff68d4fd
Increase buffer to make room for \0
2024-12-19 11:01:27 +01:00
Daniel Pouzzner
836ee1cbd5
Merge pull request #8298 from lealem47/zd18920
...
Printing the rfc822Mailbox x509 attribute
2024-12-18 22:19:32 -06:00
Daniel Pouzzner
ed76d8ea10
Merge pull request #8297 from miyazakh/ra_jankins
...
Fix RA6M4 jankins failure
2024-12-18 22:18:43 -06:00
Daniel Pouzzner
be2e779280
Merge pull request #8205 from philljj/fedora_crypto_policy
...
fedora crypto-policies: initial support.
2024-12-18 20:54:36 -06:00
JacobBarthelmeh
a5f9ec67c9
Merge pull request #8251 from gojimmypi/pr-post-release-bdd62314-espressif
...
Espressif Managed Component wolfSSL 5.7.4 post-release update
2024-12-18 16:45:33 -07:00
JacobBarthelmeh
df3897d39f
adjust tests after cert renewal
2024-12-18 16:19:51 -07:00
JacobBarthelmeh
e998dda1db
update test certs to have v3
2024-12-18 16:12:08 -07:00
JacobBarthelmeh
4ed14af331
if no extensions are present a v1 certificate was generated, add a SKID extension to avoid that
2024-12-18 16:11:18 -07:00
jordan
b5c47d27e0
fedora crypto-policies: initial support.
2024-12-18 16:56:36 -06:00
JacobBarthelmeh
bf6ef15be4
update test certificates in header file
2024-12-18 14:27:26 -07:00
JacobBarthelmeh
28184dd8cc
update certificates in certs directory
2024-12-18 14:26:15 -07:00
David Garske
afff48f0d6
Merge pull request #8253 from douzzer/20241204-more-C89-expansion
...
20241204-more-C89-expansion
2024-12-18 10:44:18 -08:00
Daniel Pouzzner
122502e2b1
wolfCrypt -Wconversion expansion: fix numerous warnings, all benign, from -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion.
2024-12-18 11:51:06 -06:00
Juliusz Sosinowicz
9cb75ef5f8
fixup! DTLS: Add server side stateless and CID QoL API
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
fe9a5fcd42
fixup! Code review and jenkins fixes
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
faa7b8dfaa
wolfSSLReceive: Error return on interrupted connection
...
Interrupted connection should return control to the user since they may want to handle the signal that caused the interrupt. Otherwise, we might never give back control to the user (the timeout would error out but that causes a big delay).
socat.yml: in test 475, the test would send a SIGTERM after 3 seconds. We would continue to ignore this signal and continue to call `recvfrom`. Instead we should error out and give control back to the user.
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
a1ee953411
Protect peer access when WOLFSSL_RW_THREADED
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
4795e0d920
Refactor dtls pending peer processing
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
3ded2bc05d
Code review and jenkins fixes
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
71337d2959
Client TLS: Set traffic decrypt keys when parsing Finished
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
daa57c492d
DTLS: Add server side stateless and CID QoL API
...
- wolfDTLS_accept_stateless - statelessly listen for incoming connections
- wolfSSL_inject - insert data into WOLFSSL object
- wolfSSL_SSL(Enable|Disable)Read - enable/disable reading from IO
- wolfSSL_get_wfd - get the write side file descriptor
- wolfSSL_dtls_set_pending_peer - set the pending peer that will be upgraded to regular peer when we successfully de-protect a DTLS record
- wolfSSL_dtls_get0_peer - zero copy access to the peer address
- wolfSSL_is_stateful - boolean to check if we have entered stateful processing
- wolfSSL_dtls_cid_get0_rx - zero copy access to the rx cid
- wolfSSL_dtls_cid_get0_tx - zero copy access to the tx cid
- wolfSSL_dtls_cid_parse - extract cid from a datagram/message
2024-12-18 09:31:24 +01:00
Sean Parkinson
ba050d6a3f
Merge pull request #8296 from douzzer/20241217-FIPS-v6-ENABLED_ARMASM_CRYPTO-fixes
...
20241217-FIPS-v6-ENABLED_ARMASM_CRYPTO-fixes
2024-12-18 15:27:08 +10:00
Lealem Amedie
651dab3dbf
Printing the rfc822Mailbox x509 attribute
2024-12-17 15:39:23 -07:00
Hideki Miyazaki
39c11c269f
Fix RA6M jankins failure
2024-12-18 07:37:21 +09:00
Daniel Pouzzner
60afdb557d
Merge pull request #8273 from dgarske/no_tls
...
Enable support for no TLS while allowing certificate manager
2024-12-17 16:24:57 -06:00
JacobBarthelmeh
613c1aa16d
fix for no malloc build
2024-12-17 14:47:45 -07:00
David Garske
356889a528
Add --disable-tls
option that can be used with --enable-all
to disable TLS features and set NO_TLS
. Useful for allowing certificate manager and crypto compatibility API's only.
2024-12-17 13:40:03 -08:00
Daniel Pouzzner
f23a2f2f48
wolfcrypt/src/aes.c: add missing WOLFSSL_ARMASM gate clause around wolfCrypt_FIPS_aes_ro_sanity, necessitated by 514a92d6ee/#8293.
2024-12-17 14:17:52 -06:00
JacobBarthelmeh
87ae31b48f
some additional sanity checks with harden build
2024-12-17 12:47:42 -07:00
Daniel Pouzzner
7b57ef4912
configure.ac: fix faulty logic in FIPS v6 feature calculation re ENABLED_ARMASM_CRYPTO, originally added in 6e0a90190f
.
2024-12-17 12:21:47 -06:00
David Garske
6151160e58
Further fixes with NO_TLS to support use with compatibility layer.
2024-12-17 09:24:38 -08:00
Kaleb Himes
fcbea85ded
Merge pull request #8291 from douzzer/20241213-fips-check-refactor-assoc-arrays
...
20241213-fips-check-refactor-assoc-arrays
2024-12-17 10:23:51 -07:00
David Garske
a2b5da8651
Fix nested NO_TLS
.
2024-12-17 08:33:33 -08:00
David Garske
16b2884cf1
Fix issues in test_tls13_apis
with no filesystem or no RSA/ECC.
2024-12-17 08:33:33 -08:00
David Garske
14e3372826
Enable support for using certificate manager only. Fixes for building without TLS enabled (NO_TLS). ZD 19054. Tested using ./configure --disable-tlsv12 --disable-tls13 CFLAGS="-DNO_TLS" && make check
2024-12-17 08:33:32 -08:00
Daniel Pouzzner
22e95081cd
Merge pull request #8181 from gojimmypi/dev-compiler-message
...
Initialize vars & change types to appease Windows/VS
2024-12-16 23:19:05 -06:00
Daniel Pouzzner
058138eb00
Merge pull request #8286 from julek-wolfssl/hostap-action-update
...
Use source hostap repo
2024-12-16 23:07:05 -06:00
Daniel Pouzzner
5aeabbfa3c
Merge pull request #8245 from julek-wolfssl/mbed-interop
...
Add CID interop with mbedtls
2024-12-16 23:04:19 -06:00
Daniel Pouzzner
9d7c02589f
Merge pull request #8276 from SparkiDev/ed448_muladd_full_reduce
...
EdDSA Ed448: sc_muladd now does full reduction
2024-12-16 20:29:49 -06:00
Daniel Pouzzner
a1035cf8df
Merge pull request #8294 from LinuxJedi/test_compile_issue
...
Fix compile issue with NO_WOLFSSL_DIR
2024-12-16 19:26:24 -06:00
Daniel Pouzzner
b5935f38d7
Merge pull request #8282 from SparkiDev/iphone_no_sha3_instrs
...
MacOS: allow SHA-3 instructions to be explicitly not used
2024-12-16 16:55:09 -06:00
Daniel Pouzzner
fd22bfc0b7
Merge pull request #8293 from SparkiDev/aarch64_no_crypto
...
Aarch64: make code compile when no hardware crypto avail
2024-12-16 14:57:53 -06:00
philljj
c5c607bc87
Merge pull request #8295 from douzzer/20241216-linuxkm-export-ns-quotes
...
20241216-linuxkm-export-ns-quotes
2024-12-16 12:37:21 -06:00
Daniel Pouzzner
6fbc18f0dc
linuxkm/Kbuild and linuxkm/module_exports.c.template: on kernel >=6.13, add quotes around the namespace arg to EXPORT_SYMBOL_NS_GPL() (upstream change actually made in 6.13-rc2).
2024-12-16 11:43:26 -06:00
Andrew Hutchings
61cb5b479f
Fix compile issue with NO_WOLFSSL_DIR
...
`test_wolfSSL_CTX_load_system_CA_certs()` would try to use DIR functions
when `NO_WOLFSSL_DIR` was used.
2024-12-16 17:23:49 +00:00
Sean Parkinson
514a92d6ee
Aarch64: make code compile when no hardware crypto avail
...
Detects availability of instructions for Aarch64.
2024-12-16 17:46:08 +10:00
Sean Parkinson
e3876fcab7
Merge pull request #8287 from JacobBarthelmeh/sigfault
...
fix for sig fault harden build
2024-12-16 09:04:29 +10:00
Daniel Pouzzner
7c5451c742
fips-check.sh fixes + enhancements:
...
* change default WOLFSSL_REPO to the canonical upstream.
* refactor tag calculation without bash associative arrays, for backward compat.
* add support for fetching FIPS tags/branches into a persistent fips repo if one is found at ../fips.
* use --shared in git clones where applicable.
* always check out the master FIPS branch, for its tooling, and always make sure it's up to date with $FIPS_REPO.
* after each fetch for a previously unknown tag, explicitly associate the tag with the FETCH_HEAD.
2024-12-13 21:36:40 -06:00
Daniel Pouzzner
4bdccac584
Merge pull request #8290 from wolfSSL/revert-8277-aarch64_no_crypto
...
Revert "Aarch64: make code compile when no hardware crypto avail"
2024-12-13 20:43:01 -06:00
JacobBarthelmeh
ad03518aa8
armasm with opensslcoexist build
2024-12-13 17:11:32 -07:00
JacobBarthelmeh
6442689d22
set dk-s7g2 socklent
2024-12-13 17:01:58 -07:00
David Garske
71325a2a32
Revert "Aarch64: make code compile when no hardware crypto avail"
2024-12-13 13:52:53 -08:00
JacobBarthelmeh
f0f50f1837
add option for additional sanity checks
2024-12-13 14:42:51 -07:00
JacobBarthelmeh
d7e40e7413
Merge pull request #8264 from dgarske/various_20241206
...
Various cleanups and fixes
2024-12-13 13:48:10 -07:00
JacobBarthelmeh
68e85ef33a
Merge pull request #8252 from anhu/use_srtp_retcode
...
wolfSSL_CTX_set_tlsext_use_srtp() should return 1 on failure and 0 up…
2024-12-13 13:35:49 -07:00
JacobBarthelmeh
e76e0e33fd
Merge pull request #8283 from rlm2002/enableAlwaysKeepSNI
...
WOLFSSL_ALWAYS_KEEP_SNI enabled by default with --enable-jni
2024-12-13 13:32:47 -07:00
JacobBarthelmeh
a22176af40
fix for sig fault harden build
2024-12-13 10:34:23 -07:00
Juliusz Sosinowicz
3407f21e69
Use source hostap repo
2024-12-13 17:12:23 +01:00
David Garske
79d9b2d6c3
Merge pull request #8277 from SparkiDev/aarch64_no_crypto
...
Aarch64: make code compile when no hardware crypto avail
2024-12-12 15:49:57 -08:00
Sean Parkinson
24bb2b7fab
Aarch64: make code compile when no hardware crypto avail
...
Detects availability of instructions for Aarch64.
2024-12-13 09:16:11 +10:00
Ruby Martin
b34a39a6bc
WOLFSSL_ALWAYS_KEEP_SNI enabled by default with --enable-jni
2024-12-12 15:49:47 -07:00
Sean Parkinson
2aacc7cd87
MacOS: allow SHA-3 instructions to be explicitly not used
...
Some iPads and iPhones don't support SHA-3 instructions.
Allow SHA-3 instructions to explicitly not be used for these devices.
2024-12-13 08:25:39 +10:00
Sean Parkinson
65fc8f8d77
Merge pull request #8280 from kareem-wolfssl/zd19046
...
Add support for the RFC822 Mailbox attribute.
2024-12-13 08:07:46 +10:00
Kareem
d4af181593
Add support for the RFC822 Mailbox attribute.
2024-12-12 12:37:32 -07:00
Andrew Hutchings
8ecbd3479e
Fix code comments for some x509.c functions
...
The return of `wolfSSL_sk_push` was changed, but some of the functions
that use it did not have their return comments updated appropriately.
2024-12-12 16:21:16 +00:00
Daniel Pouzzner
dd3012682a
Merge pull request #8278 from JacobBarthelmeh/settings
...
adjustments on sanity check of build
2024-12-11 17:04:58 -06:00
Daniel Pouzzner
1f1e985d73
Merge pull request #8268 from bandi13/fixMemleak
...
Fix memory leak
2024-12-11 16:35:38 -06:00
Sean Parkinson
c9c28335ae
EdDSA Ed448: sc_muladd now does full reduction
...
sc_muladd was reducing to word boundary and not to order.
Now reduces to order as last step.
2024-12-12 08:33:35 +10:00
Daniel Pouzzner
d825b08e16
Merge pull request #8275 from SparkiDev/aarch64_poly1305_fix
...
Aarch64 Poly1305: fix corner case
2024-12-11 16:24:36 -06:00
Daniel Pouzzner
88241f1a2c
Merge pull request #8267 from ColtonWilley/pkcs11_cert_support
...
PKCS11 cert support
2024-12-11 16:04:58 -06:00
Daniel Pouzzner
ee4366acc5
Merge pull request #8162 from redbaron/find-threads
...
CMAKE: look for pthreads when importing wolfSSL if required
2024-12-11 14:36:04 -06:00
Colton Willey
2039d6371f
Remove redundant NULL check
2024-12-11 12:25:35 -08:00
Daniel Pouzzner
2ea2e6bf59
Merge pull request #8233 from ColtonWilley/x509_store_add_cert_ref_count
...
Use proper ref count handling when adding to x509 store
2024-12-11 11:54:29 -06:00
JacobBarthelmeh
2749884fdc
defining custom config avoids warning of library builds pulling in options.h
2024-12-11 09:50:52 -07:00
JacobBarthelmeh
45992164d6
make new sanity check be a warning
2024-12-11 09:46:39 -07:00
Sean Parkinson
c0f3b433b2
Aarch64 Poly1305: fix corner case
...
Don't mask top 26 bits as it may have next bit set as reduction step was
only approximate.
2024-12-11 12:49:21 +10:00
Anthony Hu
762c36687f
Add a test.
2024-12-10 21:21:41 -05:00
Sean Parkinson
7ef328548d
Merge pull request #8274 from douzzer/20241210-update-wolfssl_known_macro_extras
...
20241210-update-wolfssl_known_macro_extras
2024-12-11 10:45:11 +10:00
JacobBarthelmeh
59ea24f915
Merge pull request #8225 from gojimmypi/pr-espressif-improve-sha-msg
...
Improve Espressif SHA HW/SW mutex messages
2024-12-10 17:30:03 -07:00
Daniel Pouzzner
6a05ba7cce
.wolfssl_known_macro_extras: regenerate
2024-12-10 17:20:24 -06:00
JacobBarthelmeh
1208a7499b
Merge pull request #8272 from douzzer/20241210-fixes
...
20241210-fixes
2024-12-10 13:35:09 -07:00
Daniel Pouzzner
d257a59087
add support for WOLFSSL_NO_OPTIONS_H:
...
* activate WOLFSSL_NO_OPTIONS_H in linuxkm/Kbuild for in-module test.o and benchmark.o.
* refine explanatory comments in settings.h re WOLFSSL_USE_OPTIONS_H, WOLFSSL_NO_OPTIONS_H, and WOLFSSL_CUSTOM_CONFIG.
* add safety catch to options.h/options.h.in to inhibit inclusion if defined(WOLFSSL_NO_OPTIONS_H).
* for good measure, add explicit check for WOLFSSL_NO_OPTIONS_H to wolfcrypt/benchmark/benchmark.c and wolfcrypt/test/test.c.
2024-12-10 13:02:37 -06:00
Colton Willey
00386c76bf
No redundant NULL check on free
2024-12-10 09:43:03 -08:00
JacobBarthelmeh
e443366748
Merge pull request #8270 from julek-wolfssl/actions-ubuntu-22.04
...
Revert to ubuntu-22.04
2024-12-10 09:14:00 -07:00
Juliusz Sosinowicz
1d2acd9de6
Revert to ubuntu-22.04
2024-12-10 16:27:41 +01:00
JacobBarthelmeh
0772cf692d
Merge pull request #8262 from embhorn/zd18968
...
Add sanity check for configuration method
2024-12-09 21:22:54 -07:00
Colton Willey
0c20a20acc
Use char instead of sword8, sanity length check on CKA_VALUE
2024-12-09 16:09:04 -08:00
Daniel Pouzzner
ba59f1af19
wolfssl/wolfcrypt/settings.h: use #warning, not #error, for "No configuration for wolfSSL detected, check header order", to avoid unnecessary breakage of old projects with nonstandard custom settings.
2024-12-09 17:04:38 -06:00
gojimmypi
7bc026540b
Improve Espressif SHA HW/SW mutex messages
2024-12-09 14:51:18 -08:00
Colton Willey
0cda59e00e
Add support for cert format in get cert crypto callback
2024-12-09 14:32:02 -08:00
David Garske
c4e319b092
Cleanup the gating for WOLFSSL_NO_AES_CFB_1_8
.
2024-12-09 13:51:51 -08:00
Andras Fekete
ff66998575
Fix memory leak
2024-12-09 16:24:38 -05:00
Colton Willey
c83c9e68c9
Updates per review comments
2024-12-09 13:10:32 -08:00
Daniel Pouzzner
e248d8499a
move !defined(EXTERNAL_OPTS_OPENVPN) assert from src/internal.c to wolfssl/wolfcrypt/types.h with refinements; refine logic+message of assert in wolfssl/wolfcrypt/settings.h re "wolfssl/options.h included in compiled wolfssl library object..".
2024-12-09 15:02:41 -06:00
Colton Willey
324b87614e
Initial implementation for using PKCS11 to retrieve certificate for SSL CTX
2024-12-09 12:15:41 -08:00
Eric Blankenhorn
fcce09a4d3
Fix from review
2024-12-09 12:59:37 -06:00
Eric Blankenhorn
c77bea6691
Disable hitch OSP test
2024-12-09 12:45:54 -06:00
Eric Blankenhorn
3d0cc250b9
Add sanity check for configuration method
2024-12-09 12:03:25 -06:00
JacobBarthelmeh
67fb29a6f6
Merge pull request #8255 from julek-wolfssl/nss-interop
...
Add nss interop
2024-12-09 09:52:07 -07:00
David Garske
314f7575fa
Fixes for macro names.
2024-12-09 08:30:47 -08:00
Juliusz Sosinowicz
aa662ad50a
fix redirect order
2024-12-09 13:38:07 +01:00
Juliusz Sosinowicz
a3be826895
use unique key
2024-12-09 13:38:07 +01:00
Juliusz Sosinowicz
3275ebf54b
add shebang
2024-12-09 13:37:20 +01:00
Juliusz Sosinowicz
0961be7711
Add CID interop with mbedtls
2024-12-09 13:37:18 +01:00
Juliusz Sosinowicz
ba4d1e6815
Add nss interop
2024-12-09 12:42:32 +01:00
Juliusz Sosinowicz
0e8320347c
CID also supported in DTLS 1.2
2024-12-09 12:09:54 +01:00
David Garske
017f931f8b
Various cleanups and fixes:
...
* Fix to properly set configure.ac LMS/XMSS enables and build of those code files.
* Remove duplicate aes.c `wc_AesSetKeyLocal` call to `wc_AesSetIV`. Moved earlier in function in commit a10260ca5f
.
* Benchmark missing time.h with NO_ASN_TIME.
* Added option to support disabling AES CFB 1/8 `WOLFSSL_NO_AES_CFB_1_8`.
* Fixes for building with combinations of `WOLFSSL_RSA_VERIFY_ONLY` and `WOLFSSL_RSA_PUBLIC_ONLY`.
* Fix for building `--enable-stacksize=verbose` with single threaded.
* Various tab and formatting cleanups.
ZD 18996
2024-12-06 16:45:33 -08:00
JacobBarthelmeh
f764dbeee1
Merge pull request #8254 from douzzer/20241204-WOLF_AGG_DUMMY_MEMBER
...
20241204-WOLF_AGG_DUMMY_MEMBER
2024-12-06 14:07:32 -07:00
Daniel Pouzzner
0ad072a34b
src/internal.c: in HashSkeData(), remove unneeded logically faulty nullness check around XFREE(ssl->buffers.digest.buffer, ...).
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
0381a47d7e
peer review: refactor HAVE_ANONYMOUS_INLINE_AGGREGATES and HAVE_EMPTY_AGGREGATES to conform to wolfssl convention -- defined() for true, !defined() for false -- while retaining ability for user override-off by passing in explicit 0 definition.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
447d5ea6ee
fips-check.sh: add support for WOLFSSL_REPO and noautogen option; tweak git fetching to keep wolfssl and fips tags distinct, and fetch all needed tags by name to assure availability for checkout. also, hide stdout noise from pushd/popd.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
aec0345f90
update fips-check.sh for cert #4718 : remap linuxv5 as an alias for linuxv5.2.1, and add linuxv5-RC12.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
27e0df040f
src/ssl_crypto.c: revert FIPS gate threshold in wolfSSL_AES_decrypt() changed in d85c108952
-- original value was correct, misdiagnosed by faulty test.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
3dcc12b30a
wolfssl/wolfcrypt/types.h and wolfssl/wolfcrypt/hash.h: define WOLF_AGG_DUMMY_MEMBER, pivoting on HAVE_EMPTY_AGGREGATES, and use WOLF_AGG_DUMMY_MEMBER in wc_Hashes.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
37acac2eb3
configure.ac: fix SC1105 ("Shells disambiguate (( differently or not at all.").
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
66c874bded
configure.ac: add --enable-fips=cert4718 alias for v5, and make --enable-fips=v5 set FIPS to 5.2.1; set DEF_FAST_MATH and DEF_SP_MATH to "no" when "yes" would conflict with user-supplied arguments.
2024-12-06 13:01:40 -06:00
JacobBarthelmeh
86b24ef6fa
Merge pull request #8261 from julek-wolfssl/libspdm-action
...
Add libspdm action
2024-12-06 11:44:14 -07:00
Juliusz Sosinowicz
6cede13478
Add libspdm action
...
Depends on https://github.com/wolfSSL/osp/pull/217
2024-12-06 17:12:06 +01:00
David Garske
0ed187e16d
Merge pull request #8256 from LinuxJedi/ADA-7461
...
Fix broken verify on Ada wrapper
2024-12-06 07:59:01 -08:00
Andrew Hutchings
158d62591f
Fix broken verify on Ada wrapper
...
The Ada wrapper had an `&` operator for the verification mode. This
effectively caused the verification mode to equal `0`.
The operator has been switched to `or` now, in addition, a getter has
been added to the API. This allows for the test I've added to the server
code to verify that it is being set correctly.
`OPENSSL_ALL` flag added to Ada so that the verify mode getter function
is compiled in.
Fixes #7461
Thanks to @dalybrown for reporting it.
2024-12-06 12:44:15 +00:00
gojimmypi
06c0c09940
Espressif Managed Component wolfSSL 5.7.4 post-release update
2024-12-05 21:46:33 -08:00
JacobBarthelmeh
20643577e6
Merge pull request #8258 from dgarske/get_verify
...
Expose compatibility get_verify functions with openssl_extra
2024-12-05 17:08:59 -07:00
David Garske
56ed6762d8
Expose compatibility get_verify functions with openssl_extra.
2024-12-05 12:10:51 -08:00
JacobBarthelmeh
1bfbdb6c7f
Merge pull request #8257 from dgarske/settings_h
...
Fix issue with wc_lms_impl.c or wc_lms not including settings.h
2024-12-05 11:43:43 -07:00
David Garske
1e9607b65e
Fixes for ML-DSA and LMS cast warnings and spelling errors.
2024-12-05 08:34:58 -08:00
JacobBarthelmeh
aa32027c26
Merge pull request #8236 from philljj/zephyr_thread_type
...
wc_port: change zephyr struct k_thread tid member to pointer.
2024-12-05 09:29:30 -07:00
David Garske
19b486e1f7
Fix issue with wc_lms_impl.c or wc_lms not including settings.h. Caused issue enabling LMS from user_settings.h.
2024-12-05 08:15:11 -08:00
Anthony Hu
ab384ee945
wolfSSL_CTX_set_tlsext_use_srtp() should return 1 on failure and 0 upon success.
...
Same with wolfSSL_set_tlsext_use_srtp().
See https://docs.openssl.org/1.1.1/man3/SSL_CTX_set_tlsext_use_srtp/
2024-12-05 10:40:40 -05:00
David Garske
bbf1a86c45
Merge pull request #8238 from anhu/dsa_win
...
build dsa in visual studio
2024-12-04 16:00:35 -08:00
JacobBarthelmeh
bdbaa525c8
Merge pull request #8248 from lealem47/comp_key_fips
...
Fix for Compressed Keys with FIPS
2024-12-04 13:51:06 -07:00
Colton Willey
c192cbabe8
Free x509 on fail to push
2024-12-04 10:33:58 -08:00
Daniel Pouzzner
35e50742db
Merge pull request #8249 from julek-wolfssl/sessionIDSz-fix
...
Add size checks to sessionID
2024-12-04 10:06:25 -06:00
Juliusz Sosinowicz
8ff79dc26e
Add size checks to sessionID
2024-12-04 11:56:16 +01:00
Lealem Amedie
3476425967
Fix for Compressed Keys with FIPS
2024-12-03 14:56:30 -07:00
David Garske
f7a55c6e76
Merge pull request #8247 from bandi13/fixEspressifTests
...
Fix test environment
2024-12-03 13:09:42 -08:00
Andras Fekete
03ece60fe3
Fix test environment
2024-12-03 15:13:53 -05:00
David Garske
fa6df90518
Merge pull request #8246 from douzzer/20241203-wolfSSL_CTX_flush_sessions-sessionIDSz
...
20241203-wolfSSL_CTX_flush_sessions-sessionIDSz
2024-12-03 11:26:15 -08:00
Colton Willey
c5acceca5d
Dont use specific free function
2024-12-03 09:55:43 -08:00
Colton Willey
20e8ecec75
Merge branch 'master' of github.com:ColtonWilley/wolfssl into x509_store_add_cert_ref_count
2024-12-03 09:52:34 -08:00
Daniel Pouzzner
547cdeac11
src/ssl_sess.c: in wolfSSL_CTX_flush_sessions(), add missing check of s->sessionIDSz, similar to the fix to TlsSessionCacheGetAndLock() in #8182 ( ef67b1c06a
). also, add missing macro to .wolfssl_known_macro_extras.
2024-12-03 11:38:58 -06:00
Colton Willey
5684e56e0e
Always keep original x509 pointer with proper refcounts even for self signed trusted CA
2024-12-02 12:15:33 -08:00
JacobBarthelmeh
42afede3fc
Merge pull request #8235 from dgarske/fix_sp_rsa_publiconly
...
Fixes for building with SP RSA small and RSA Public only
2024-12-02 10:39:08 -07:00
JacobBarthelmeh
015d47b9cd
Merge pull request #8231 from LinuxJedi/STM32MP13
...
Add STM32MP13 HAL support for more SHA types
2024-12-02 10:18:38 -07:00
David Garske
ade917a977
Merge pull request #8241 from LinuxJedi/STM32MP13-Cube
...
Add STM32MP13 to Cube IDE
2024-11-29 08:37:02 -08:00
Andrew Hutchings
fbdb34a6e0
Add STM32MP13 to Cube IDE
2024-11-29 11:35:38 +00:00
Anthony Hu
3737c68797
build dsa in visual studio
2024-11-28 13:11:14 -05:00
David Garske
cf450a3f37
Fix STM32 example broken in #8143 .
2024-11-27 14:06:20 -08:00
jordan
a18f71c27b
wc_port: change zephyr struct k_thread tid member to pointer.
2024-11-27 16:05:48 -06:00
David Garske
9bec6da2ff
Merge pull request #8213 from JacobBarthelmeh/compat
...
adjustments to x509.h macro list
2024-11-27 13:35:14 -08:00
David Garske
57e1bf9fba
Fixes for building with SP RSA small and RSA Public only. ZD 18996
2024-11-27 13:26:45 -08:00
Colton Willey
c5df3cb6b6
Use proper ref count handling when adding to x509 store
2024-11-27 10:38:32 -08:00
JacobBarthelmeh
fbaabbe2e9
Merge pull request #8230 from douzzer/20241126-FIPS-OPENSSL_COEXIST
...
20241126-FIPS-OPENSSL_COEXIST
2024-11-27 11:33:06 -07:00
Andrew Hutchings
f15dbb9110
Add STM32MP13 HAL support for more SHA types
...
This adds STM32 HAL support for:
* SHA384
* SHA512 (with -224 and -256)
* SHA3 (all variants apart from SHAKE)
The partial FIFO block calculations have been adjusted based in the
STM32 code to support the larger hash sizes.
This should work with other chips such as the STM32U5xx, but is not
enabled for that yet.
2024-11-27 15:04:45 +00:00
Juliusz Sosinowicz
e9a4f7de5f
Merge pull request #8226 from ColtonWilley/x509_store_fix_get_objects
...
Fix wolfSSL_X509_STORE_get0_objects to handle no CA
2024-11-27 10:29:06 +01:00
Daniel Pouzzner
b65d3fff56
fixes for OPENSSL_COEXIST with FIPS and with/without TEST_OPENSSL_COEXIST.
2024-11-26 19:38:32 -06:00
JacobBarthelmeh
5e13fc2c84
Merge pull request #7410 from SparkiDev/sp_arm_big_endian
...
SP: big-endian support
2024-11-26 17:05:53 -07:00
JacobBarthelmeh
d620e937f0
Merge pull request #8229 from bigbrett/pqc-macro-protection-quickfix
...
PQC macro protection quickfixes
2024-11-26 17:02:17 -07:00
András Fekete
e7d801e8d0
Merge pull request #8228 from douzzer/20241126-WC_NO_COMPAT_AES_BLOCK_SIZE
...
20241126-WC_NO_COMPAT_AES_BLOCK_SIZE
2024-11-26 15:48:41 -05:00
JacobBarthelmeh
70d595478c
Merge pull request #8227 from douzzer/20241125-linuxkm-aarch64-pie
...
20241125-linuxkm-aarch64-pie
2024-11-26 13:31:01 -07:00
Brett Nicholas
1283325f65
wolfhsm-mldsa-fixes
2024-11-26 12:26:01 -08:00
Daniel Pouzzner
c6df620f81
wolfssl/wolfcrypt/aes.h: #define WC_NO_COMPAT_AES_BLOCK_SIZE in OPENSSL_COEXIST builds. see comment in source code with usage instructions.
2024-11-26 13:09:39 -06:00
David Garske
29dc0f5d0b
Merge pull request #8223 from LinuxJedi/STM32MP1
...
Initial support for STM32MP13 HAL
2024-11-26 09:34:04 -08:00
Andrew Hutchings
5d0ee8c9f3
Initial support for STM32MP13 HAL
...
This adds support for the STM32MP13 HAL, tested on the STM32MP135F MPU.
Using the HAL this modifies our previous RNG, AES-CBC, AES-GCM, HASH,
ECDSA and DES3 ST HAL acceleration to work with the MPU. It also works
around bugs found in the AES-GCM code of the HAL.
The HAL does not appear to have support for MD5 HASH at the moment, so
this has been given a flag to disable it on this MPU.
2024-11-26 14:15:57 +00:00
Daniel Pouzzner
7dcec3e62f
linuxkm: work around aarch64 dependency on alt_cb_patch_nops for enable-linuxkm-pie (FIPS support).
2024-11-26 00:12:29 -06:00
JacobBarthelmeh
ea8c7c8322
Merge pull request #8214 from bandi13/fixDockerWarnings
...
Use proper capitalization
2024-11-25 16:43:24 -07:00
JacobBarthelmeh
02432990dc
Merge pull request #8210 from night1rider/devcrypto-authtag-error
...
/dev/crypto auth error fix/adjustment for benchmark
2024-11-25 16:42:58 -07:00
Colton Willey
5460ba815b
Fix wolfSSL_X509_STORE_get0_objects to handle case where no CA has been loaded
2024-11-25 14:51:29 -08:00
David Garske
71abfa3b15
Merge pull request #8216 from douzzer/20241122-opensslcoexist-expansion
...
20241122-opensslcoexist-expansion
2024-11-25 14:22:03 -08:00
night1rider
02e6ec0c86
devcrypto auth error fix/adjustment
2024-11-25 14:43:12 -07:00
Daniel Pouzzner
fc7ba562d7
Merge pull request #8215 from kaleb-himes/SRTP-KDF-SCRIPT
...
Add SRTP-KDF (v6.0.0) to checkout scipt
2024-11-25 13:07:05 -06:00
kaleb-himes
8fbff480d7
Pickup asm changes since 5.7.4 release
2024-11-25 10:58:04 -07:00
David Garske
40154e18ab
Merge pull request #8219 from gojimmypi/pr-arduino-5.7.4
...
Update Arduino files for wolfssl 5.7.4
2024-11-25 09:37:21 -08:00
gojimmypi
560d89ed44
Update Arduino files for wolfssl 5.7.4
2024-11-23 13:26:46 -08:00
Daniel Pouzzner
bfeb0ad48e
expand opensslcoexist to all low level crypto APIs.
2024-11-22 19:27:56 -06:00
kaleb-himes
6791d3f759
Add SRTP-KDF (v6.0.0) to checkout scipt
2024-11-22 14:01:24 -07:00
Andras Fekete
93f865f2d4
Use proper capitalization
2024-11-22 15:39:57 -05:00
JacobBarthelmeh
2b11bd40b3
adjustments to x509.h macro list
2024-11-22 10:40:14 -07:00
gojimmypi
5d86031f57
Initialize vars & change types to appease Windows/VS
2024-11-17 17:50:17 -08:00
Sean Parkinson
10e8f6887e
SP ARM: big-endian support
...
Handle reading and writing from big-endian byte array when compiling for
big endian.
Rework little endian to be more effiecient too.
2024-11-18 10:29:04 +10:00
Maxim Ivanov
0319eb098d
CMAKE: look for pthreads when importing wolfSSL if required
...
All required dependencies of a package must also be found in the
package configuration file. Consumers of wolfSSL can't know
if it was built with or without threads support. This change
adds find_package(Threads) lookup in the file used for
find_package(wolfssl) if wolfSSL was built with threads support.
2024-11-07 21:42:11 +00:00
John Bland
36c89cc5ad
clean up some post-rebase issues
2024-01-02 20:12:13 -05:00
John Bland
b62f582fcc
copy full inner hashes to hsHashesEch so that it has
...
the unmodified hrr and sh in the digest
2024-01-02 19:33:22 -05:00
John Bland
f6555fd753
update ech to use separate hsHashes for the ech log
...
which are not restarted and the inner hsHashes which are restared on HRR. also send empty string with 0 encLen when sending clientHelloInner2. setup works wolfssl->wolfssl but fails to match acceptance for first HRR message when talking to an openssl server, does still work without HRR when talking to cloudflare's server without HRR.
2024-01-02 19:31:52 -05:00
John Bland
36623f0869
fix ech config parsing to handle 1 byte public name len
2024-01-02 19:30:39 -05:00
John Bland
a5963b4b9f
free the innerClientHello since it may be previously
...
allocated if an hrr happened
2024-01-02 19:30:38 -05:00
John Bland
c0b49ce443
stop double-populating the ech extension since that
...
blows away the ech and it's current hpke context, causing the hrr handling to fail
2024-01-02 19:30:38 -05:00
John Bland
a23edb84d4
only copy the hsHashes if the server is actually using ech
2023-12-29 16:31:13 -05:00
John Bland
4c63ec3fce
fix memory leaks
2023-12-29 16:31:13 -05:00
John Bland
bc77f9f466
fix writing empty string when sending enc in response
...
to an hrr, fix bad getSize for hrr ech, fix using the wrong transcript hash for hrr ech, add new hrr test for ech to api.c
2023-12-29 16:30:34 -05:00
John Bland
167c702b6f
don't mix declaration with code to satisfy compiler
2023-12-29 16:30:34 -05:00
John Bland
000c42ef70
fix implicit cast
2023-12-29 16:30:34 -05:00
John Bland
dfb45bc40e
fix unitialized variable
2023-12-29 16:30:31 -05:00
John Bland
037c44609d
refactor ECH code to handle hrr with special confirmation
2023-12-29 16:29:34 -05:00
John Bland
83d7225236
update ech to use multi use hpke context, still doesn' handle HRR
2023-12-29 16:15:56 -05:00
John Bland
34d7229d4e
add functions for using an hpke context multiple times
2023-12-29 16:15:54 -05:00