Devin AI
96d039c8dc
Remove ARC4 implementation while preserving RC4 API
...
Co-Authored-By: Anthony H <anthony@wolfssl.com >
2025-03-18 18:49:52 +00: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
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
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
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
Sean Parkinson
93acd466a7
Merge pull request #6805 from jpbland1/ech-hello-retry
...
Ech hello retry request
2025-03-13 09:17:58 +10: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
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
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
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
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
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
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
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
JacobBarthelmeh
53fa4ffbaf
conversion warning fixes
2025-03-07 11:03:12 -07: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
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
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
033a2a08e9
Merge pull request #8212 from bandi13/fixTestFailure
...
Fix Renesas test
2024-11-22 10:42:21 -07:00
JacobBarthelmeh
2b11bd40b3
adjustments to x509.h macro list
2024-11-22 10:40:14 -07:00
JacobBarthelmeh
6dd00abb74
Merge pull request #7771 from aidangarske/InitSuites_Orderadj
...
`InitSuites` changes to order making `BUILD_TLS_AES_256_GCM_SHA384` be prioritized over `BUILD_TLS_AES_128_GCM_SHA256`
2024-11-22 10:15:32 -07:00
JacobBarthelmeh
c5d7dc3df6
Merge pull request #8211 from douzzer/20241121-fixes
...
20241121-fixes
2024-11-22 09:49:59 -07:00
David Garske
401a64d112
Improve stdarg.h around uses of var_arg. Cleanup warning for XFREE/XMALLOC redef.
2024-11-22 08:11:32 -08:00
Andras Fekete
942c3a07ee
Fix Renesas test
...
In PR #8182 this line was accidentally wrapped in `#ifdef OPENSSL_EXTRA`
2024-11-22 09:57:55 -05:00
Daniel Pouzzner
d85c108952
wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c: add WC_FAILURE ("wolfCrypt generic failure") with value -1, for traceable error return of -1 in wolfCrypt.
...
configure.ac: add OPENSSL_EXTRA to --enable-wolfsentry.
linuxkm/linuxkm_wc_port.h, linuxkm/module_hooks.c, wolfssl/ssl.h: accommodate backward dependencies for wolfSSL_X509_NAME_add_entry_by_NID, wolfSSL_X509_NAME_free, and wolfSSL_X509_NAME_new_ex.
linuxkm/lkcapi_glue.c: if CONFIG_CRYPTO_MANAGER, assert match of CONFIG_CRYPTO_FIPS and HAVE_FIPS.
src/ssl_crypto.c, wolfcrypt/src/wc_lms.c, wolfcrypt/src/wc_lms_impl.c, wolfcrypt/src/wc_xmss.c, wolfcrypt/test/test.c: add missing casts for XMALLOC()s.
src/ssl_crypto.c: in wolfSSL_AES_decrypt(), fix gate for wc_AesDecryptDirect() return type.
wolfcrypt/test/test.c: smallstack refactor in test_dilithium_decode_level().
tests/api.c: fix uninited vars and "embedding a directive within macro arguments is not portable" in test_wc_dilithium_der().
2024-11-21 21:59:26 -06:00
Daniel Pouzzner
92f587c84f
Merge pull request #8209 from gasbytes/patch-wc-no-err-trace
...
Adding missing checks missing initialization of sp_int/mp_int
2024-11-21 18:34:11 -06:00
JacobBarthelmeh
03bafdfa36
Merge pull request #8208 from dgarske/engine_compat
...
Fixes from compatibility header decoupling (make install)
2024-11-21 16:40:15 -07:00
Reda Chouk
378519d7fb
Adding missing checks missing initialization of sp_int/mp_int initialization (
...
in case of MEMORY_E).
removed printf (added for previous debugging)
2024-11-21 23:55:34 +01:00
David Garske
3444d5c526
Fixes from compatibility header decoupling PR #8182 . Fixes issue with wolfEngine and wolfProvider. Change behavior for openssl compatibility headers to be installed unless --enable-opensslextra=noinstall is used. Removed dependency on X509 small with SESSION_CERTS, KEEP_PEER_CERTS and KEEP_OUR_CERT.
2024-11-21 12:09:57 -08:00
David Garske
39d4832b0b
Merge pull request #8207 from bigbrett/dilithium-nightly-fixes
...
dilithium fixes for FIPS 204 draft mode
2024-11-21 11:41:52 -08:00
Brett Nicholas
cceeb776f7
gate dilithium OID autodetection on FIPS 204 draft mode
2024-11-21 09:38:11 -08:00
Brett Nicholas
30f372ce16
add autogenerated error trace headers to gitignore
2024-11-21 09:38:11 -08:00
Brett Nicholas
e31b15875b
fix buffer overflow due to uninitialized idx variable
2024-11-21 09:38:11 -08:00
JacobBarthelmeh
04932dd97d
Merge pull request #8206 from dgarske/rx_tsip
...
Fixes for RSA TSIP RSA Sign/Verify
2024-11-21 09:30:48 -07:00
Daniel Pouzzner
2710b57df8
Merge pull request #8204 from JacobBarthelmeh/socket
...
change optval type to match system
2024-11-21 09:57:10 -06:00
JacobBarthelmeh
c06f65a8ac
Merge pull request #8182 from dgarske/no_compat_headers
...
Support for building without wolfssl/openssl header files
2024-11-20 21:33:18 -07:00
David Garske
6be70f9230
Fix for size increase on X509 small. Fix for CRL test with NO_RSA.
2024-11-20 15:54:02 -08:00
David Garske
96a0619d70
Enable compat layer with HAVE_WEBSERVER (--enable-webserver).
2024-11-20 14:24:11 -08:00
David Garske
c5e43280b9
Fix for RX TSIP AES GCM 128 unit test resultP/C sizes causing failure.
2024-11-20 13:48:05 -08:00
David Garske
7bf0533c48
Fix for building with HAVE_SECRET_CALLBACK only.
2024-11-20 13:33:10 -08:00
David Garske
d109f38cbd
Fixes for RSA TSIP RSA Sign/Verify. Tested on RX72N EnvisionKit. Added THREADX threading support.
...
```
Start wolf tsip crypt Test
simple crypt test by using TSIP
sha_test() passed
sha256_test() passed
tsip_aes_cbc_test() passed
tsip_aes256_test() passed
tsip_rsa_test(2048) passed
tsip_rsa_SignVerify_test(2048) passed
End wolf tsip crypt Test
```
2024-11-20 13:08:26 -08:00
JacobBarthelmeh
be70bea687
Merge pull request #8202 from LinuxJedi/fix-cryptodev-debug
...
Fix cryptodev debug output
2024-11-20 14:00:05 -07:00
David Garske
ef67b1c06a
Support for building without wolfssl/openssl header files. ZD 18465
...
* Fix for `TlsSessionCacheGetAndLock` that was not checking the sessionIDSz, so could return a pointer to an invalid session (if 0's). Resolves issue with `test_wolfSSL_CTX_sess_set_remove_cb` test.
* Fix cast warning with `HAVE_EX_DATA` in Windows VS.
* Fix openssl_extra without PKCS12.
* Refactor the EX data crypto and session API's to gate on `HAVE_EX_DATA_CRYPTO`.
* Grouped the EX data API's in ssl.h
* Moved API's in ssl.h to separate the compatibility ones from ours.
2024-11-20 12:32:32 -08:00
JacobBarthelmeh
b3e8fa7922
change optval type to match system
2024-11-20 09:34:11 -07:00
Andrew Hutchings
f5e6e17c7c
Fix cryptodev debug output
...
Cryptodev has two sections for the session info struct, cipher and hash.
Our debug mode was using hash for the output even if we were using
cipher, so would output random data. Simple 'if' statement to do the
correct thing.
2024-11-20 06:41:58 +00:00
JacobBarthelmeh
42825e82d2
Merge pull request #8200 from anhu/crl-orig
...
Fix for github issue 8198
2024-11-19 09:35:59 -07:00
David Garske
18f52b2573
Merge pull request #8177 from bigbrett/dilithium-get-algo-from-der
...
ML-DSA/Dilithium: obtain security level from DER when decoding
2024-11-19 07:32:39 -08:00
David Garske
261ddc13ad
Merge pull request #8006 from ColtonWilley/crl_update_cb
...
CRL improvements and update callback
2024-11-18 20:11:37 -08:00
Brett Nicholas
26d3b00a9c
added DER size macros to libOQS build
2024-11-18 17:53:12 -07:00
Brett Nicholas
48dcbe9caf
fix typo in comment
2024-11-18 16:50:35 -07:00
Brett Nicholas
9815fcd3ea
make inOutKeyType parameter mandatory for DecodeAsymKey_Assign
2024-11-18 16:46:10 -07:00
Brett Nicholas
d50fb63071
add macros for dilithium DER export buffer sizes
2024-11-18 16:14:26 -07:00
Brett Nicholas
63deea57e0
properly protect test.c calls to dilithium public/private API
2024-11-18 15:47:00 -07:00
Anthony Hu
237bb24f87
Fix for github issue 8198
2024-11-18 17:33:13 -05:00
aidan garske
43cea3e964
fix xmemset
2024-11-18 14:27:33 -08:00
aidan garske
6625d90f7f
reverted xmemset changes already done
2024-11-18 14:20:14 -08:00
aidan garske
337a34246e
xmemset fix for init suites changes
2024-11-18 13:54:38 -08:00
Colton Willey
d65c17b7ad
Update variable name from new to avoid g++ name clash
2024-11-18 11:16:39 -08:00
aidan garske
b79423fae9
Merge remote-tracking branch 'origin/master' into InitSuites_Orderadj
2024-11-18 10:07:10 -08:00
Colton Willey
55be5035a0
Merge branch 'master' of github.com:ColtonWilley/wolfssl into crl_update_cb
2024-11-18 09:52:51 -08:00
David Garske
c111bb87c9
Merge pull request #8196 from SparkiDev/pqc_kem_priv_key_fix
...
KeyShareEntry: include private key fields for KYBER
2024-11-18 09:46:08 -08:00
David Garske
5dabeb590c
Merge pull request #8192 from bandi13/fixSocat
...
Simple fix for 1.8.0.0 socat regressions
2024-11-18 07:26:15 -08: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
Sean Parkinson
5d61ca94c0
KeyShareEntry: include private key fields for KYBER
...
Originallt HAVE_PQC and then changed to HAVE_FALCON and HAVE_DILITHIUM.
The KEM PQC algorithm is actually KYBER.
2024-11-18 08:29:16 +10:00
David Garske
5afa0566b4
Merge pull request #8195 from douzzer/20241116-fixes
...
20241116-fixes
2024-11-17 09:12:38 -08:00
Daniel Pouzzner
18cc3e0c92
add .wolfssl_known_macro_extras;
...
src/wolfio.c: #include <errno.h> if necessary;
wolfcrypt/src/asn.c: gate WOLFSSL_MSG_EX() uses on defined(DEBUG_WOLFSSL), for pedantic C89 compatibility (no variadic macros);
wolfssl/wolfcrypt/wc_port.h: refine setup for XFENCE().
2024-11-16 18:23:11 -06:00
Daniel Pouzzner
ae0d73d9fd
Merge pull request #8122 from miyazakh/tsip_rsa_private_enc
...
Implement TSIP RSA Public Enc/Private Dec
2024-11-16 16:12:51 -06:00
Daniel Pouzzner
ff680994ba
Merge pull request #8146 from julek-wolfssl/dtls13-ooo-app-data
...
DTLS 1.3: Don't error out on app data before finishing handshake
2024-11-16 14:56:21 -06:00
Daniel Pouzzner
49393eca3c
Merge pull request #8060 from miyazakh/qt_jenkins_failure
...
Not add a cert to CA cache if it doesn't set "CA:TRUE" as basic constraints
2024-11-16 13:38:41 -06:00
Daniel Pouzzner
40148d3c0e
Merge pull request #8170 from kaleb-himes/OE8-sync
...
OS_Seed declarations with legacy compilers using correct header tags
2024-11-16 12:03:11 -06:00
Daniel Pouzzner
18a72fb38c
Merge pull request #7896 from kareem-wolfssl/wolfIoLogging
...
Log error code in TranslateIoReturnCode.
2024-11-16 11:12:02 -06:00
David Garske
649b78f460
Merge pull request #8193 from douzzer/20241115-macro-fixes
...
20241115-macro-fixes
2024-11-15 15:58:57 -08:00
David Garske
ada922be00
Merge pull request #8166 from philljj/fix_holder_entityname
...
acert: fix holder entityName parsing.
2024-11-15 14:49:00 -08:00
Andras Fekete
962b101db9
Add flaky tests to the exclusion list
2024-11-15 16:34:51 -05:00
Daniel Pouzzner
ebfde75d91
fixes for misspelled/malformed macro names, and add missing BUILD_AESCCM setup in wolfssl/internal.h
2024-11-15 15:33:51 -06:00
jordan
c71fdc3ca2
acert: review cleanup.
2024-11-15 13:48:17 -06:00
David Garske
c33d97b1ab
Merge pull request #8187 from douzzer/20241114-wolfSSL_CTX_UnloadIntermediateCerts-thread-safety
...
20241114-wolfSSL_CTX_UnloadIntermediateCerts-thread-safety
2024-11-15 11:35:45 -08:00
Brett Nicholas
07e2715f0c
update test in api.c to handle new dilithium security level DER parsing
2024-11-15 11:59:17 -07:00
Daniel Pouzzner
a95b759ffa
peer review for #8187 and unrelated bug fixes:
...
return error code from wolfSSL_RefWithMutexUnlock() to expose result to caller;
fix endianness bug in src/x509.c:wolfSSL_X509_add_ext() (fixes failing test_wolfSSL_X509_add_ext on BE targets);
fix possible file handle leak in tests/api.c:test_wolfSSL_d2i_X509_REQ() (reported by clang-tidy);
in wolfssl/ssl.h, define CONST_NUM_ERR_WOLFSSL_SUCCESS, so that WOLFSSL_SUCCESS can be benignly miswrapped in WC_NO_ERR_TRACE().
2024-11-15 12:52:50 -06:00
Daniel Pouzzner
595f55eceb
add struct wolfSSL_RefWithMutex, wolfSSL_RefWithMutexLock, and wolfSSL_RefWithMutexUnlock, and change WOLFSSL_CTX.ref from wolfSSL_Ref to wolfSSL_RefWithMutex.
...
in in wc_port.c, rename mutexful implementations of wolfSSL_Ref*() to wolfSSL_RefWithMutex*(), and build them even if defined(WOLFSSL_ATOMIC_OPS).
refactor wolfSSL_CTX_UnloadIntermediateCerts() to wrap the refcount check and deallocation with wolfSSL_RefWithMutexLock()...wolfSSL_RefWithMutexUnlock().
move port-specific setup for WARN_UNUSED_RESULT, WC_MAYBE_UNUSED, and WC_INLINE, from types.h to wc_port.h, to make them usable by port-specific definitions later in wc_port.h.
when defined(SINGLE_THREADED) and !defined(WOLFSSL_NO_ATOMICS), typedef int wolfSSL_Atomic_Int, so that access to wolfSSL_Atomic_Ints in SINGLE_THREADED builds is easy.
refactor fallback definitions of wolfSSL_Atomic_Int_FetchAdd and wolfSSL_Atomic_Int_FetchSub as WC_INLINE functions to avoid -Wunused-result.
2024-11-15 12:35:41 -06:00
Andras Fekete
3268df33f2
Simple fix for 1.8.0.0 socat regressions
...
Future versions probably won't need this.
2024-11-15 13:12:48 -05:00
Kareem
bb82be3911
Log error code in TranslateIoReturnCode.
2024-11-15 11:00:25 -07:00
David Garske
e1116e8e6b
Merge pull request #8161 from ColtonWilley/update_ssl_doxy
...
Update doxygen to use proper types in sample code
2024-11-15 09:43:38 -08:00
David Garske
3674980387
Merge pull request #8173 from kojo1/man
...
add API doc: wc_ecc_set_curve
2024-11-15 09:42:12 -08:00
jordan
622fc70d1e
acert: fix holder entityName parsing, light cleanup, better testing.
2024-11-15 11:38:19 -06:00
Brett Nicholas
2207791aab
removed DecodeAsymKeyXXX_Assign_ex function, functionality now included in original _Assign function
2024-11-15 10:25:10 -07:00
David Garske
55d2012139
Merge pull request #8189 from gojimmypi/pr-espressif-setup
...
remove trailing exit code
2024-11-15 08:37:20 -08:00
David Garske
5f06a7f732
Merge pull request #8188 from douzzer/20241114-wc_mp_sign_t
...
20241114-wc_mp_sign_t
2024-11-15 08:36:42 -08:00
David Garske
3b8373226a
Merge pull request #8191 from bandi13/fixTest
...
Fix missing cast
2024-11-15 08:35:55 -08:00
Andras Fekete
d99a1c6a13
Fix another compilation issue
...
In file included from ./wolfssl/error-ssl.h:27,
from ./wolfssl/ssl.h:35,
from ./wolfssl/internal.h:28,
from src/ssl.c:36:
./src/x509_str.c: In function 'int X509StoreLoadCertBuffer(WOLFSSL_X509_STORE*, byte*, word32, int)':
./wolfssl/wolfcrypt/error-crypt.h:336:37: error: 'CONST_NUM_ERR_WOLFSSL_SUCCESS' was not declared in this scope; did you mean 'CONST_NUM_ERR_WOLFSSL_UNKNOWN'?
336 | #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
| ^~~~~~~~~~~~~~
./src/x509_str.c:1456:15: note: in expansion of macro 'WC_NO_ERR_TRACE'
1456 | int ret = WC_NO_ERR_TRACE(WOLFSSL_SUCCESS);
| ^~~~~~~~~~~~~~~
2024-11-15 10:12:13 -05:00
Andras Fekete
ca8b465dbf
Fix missing cast
...
Introduced in PR#8176.
2024-11-15 09:17:41 -05:00
gojimmypi
4cce3db0d5
remove trailing exit code
2024-11-15 06:05:04 +01:00
David Garske
e22d17c09f
Merge pull request #8185 from SparkiDev/kyber_fixes_4
...
Kyber: Fix wolfSSL_get_curve_name()
2024-11-14 17:57:24 -08:00
David Garske
fcfd3be160
Merge pull request #8186 from SparkiDev/tfm_mask_cast
...
TFM: explicit cast of -1 to fp_digit
2024-11-14 17:57:00 -08:00
David Garske
c06b5fadc1
Merge pull request #8180 from JacobBarthelmeh/staticmemory
...
wc_UnloadStaticMemory should be used to free mutex
2024-11-14 17:54:56 -08:00
David Garske
21bfcaf666
Merge pull request #8136 from anhu/csr_version
...
Fix for setting wrong version in CSRs.
2024-11-14 17:52:58 -08:00
David Garske
54bdb39454
Merge pull request #8176 from SparkiDev/x509_coverage
...
X509: improve testing coverage
2024-11-14 17:49:33 -08:00
David Garske
8b1e9211b1
Merge pull request #8149 from SparkiDev/asn_getshortint
...
Make GetShortInt available with WOLFSSL_ASN_EXTRA
2024-11-14 17:47:11 -08:00
David Garske
8fe7d1076d
Merge pull request #8184 from douzzer/20241113-WC_THREADSHARED
...
20241113-WC_THREADSHARED
2024-11-14 17:46:19 -08:00
Daniel Pouzzner
469c410393
src/sniffer.c: remove build-time assert on HAVE_THREAD_LS || SINGLE_THREADED, as it breaks existing build tests. fix more later.
2024-11-14 18:22:42 -06:00
Daniel Pouzzner
154c5f0b56
rename mp_sign_t to wc_mp_sign_t and mp_size_t to wc_mp_size_t.
2024-11-14 18:14:45 -06:00
Daniel Pouzzner
4ad0dce84e
src/sniffer.c: revert refactor pending proper fixes.
2024-11-14 18:00:52 -06:00
Daniel Pouzzner
dd9f6378cb
rename WOLFSSL_GLOBAL to WC_THREADSHARED, and refactor mutex handling in src/sniffer.c for consistency and correctness, also adding gating on !SINGLE_THREADED for efficiency;
...
add wc_static_assert in wolfcrypt/test/test.h to assure that WC_TEST_RET_ENC() can correctly handle all error codes.
2024-11-14 16:35:04 -06:00
Sean Parkinson
9d8a3cc352
TFM: explicit cast of -1 to fp_digit
...
When -1 is needed as an fp_digit, as a mask. cast to fp_digit.
2024-11-15 08:25:44 +10:00
Sean Parkinson
b98af853f2
Kyber: Fix wolfSSL_get_curve_name()
...
Fix protection around Kyber hybrid strings when compiling for original
with wolfSSL implementation.
2024-11-15 08:17:02 +10:00
Daniel Pouzzner
6af54d3de2
Merge pull request #8183 from SparkiDev/kyber_fixes_3
...
Kyber: fixes to configure and wolfSSL_get_curve_name
2024-11-14 12:47:09 -06:00
Sean Parkinson
886f5b0a5b
Kyber: fixes to configure and wolfSSL_get_curve_name
...
Remote original-only option for kyber in configure.ac.
Default is ML-KEM only.
original is Kyber only.
ml-lem is ML-KEM.
to have both: all,original,ml-kem.
Use WOLFSSL_NO_ML_KEM* instead of WOLFSSL_WC_ML_KEM_* which requires the
inclusion of kyber headers.
2024-11-14 16:25:41 +10:00
Brett Nicholas
f672105d55
- Move automatic OID detection from Dilithium code into ASN code
2024-11-13 15:31:59 -07:00
David Garske
c8f56f035f
Merge pull request #8169 from douzzer/20241108-WOLFSSL_CLEANUP_THREADSAFE
...
20241108-WOLFSSL_CLEANUP_THREADSAFE
2024-11-13 12:45:33 -08:00
Daniel Pouzzner
0ebd86d668
add second wolfCrypt error code span, and add DEADLOCK_AVERTED_E.
2024-11-13 13:01:00 -06:00
JacobBarthelmeh
f74e73e8ce
wc_UnloadStaticMemory should be used to free mutex
2024-11-13 11:51:53 -07:00
Daniel Pouzzner
524f0f5799
peer review on "WOLFSSL_CLEANUP_THREADSAFE":
...
* add WOLFSSL_ATOMIC_INITIALIZER() to wc_port.h;
* rename feature macro to WOLFSSL_CLEANUP_THREADSAFE_BY_ATOMIC_OPS for clarity;
* remove spin lock logic in wolfSSL_Init() and instead return DEADLOCK_AVERTED_E on contended initialization;
* unless WOLFSSL_CLEANUP_THREADSAFE_BY_ATOMIC_OPS is user-defined to 0, automatically enable it when appropriate.
2024-11-12 23:57:35 -06:00
Hideki Miyazaki
fdb889303a
fix qt unit test qsslcertificate
...
fix trusted peer cert cache
2024-11-13 08:38:51 +09:00
Daniel Pouzzner
b8aeaf4fa8
src/ssl.c: implement WOLFSSL_CLEANUP_THREADSAFE in wolfSSL_Init() / wolfSSL_Cleanup().
2024-11-12 17:37:45 -06:00
Sean Parkinson
86ad96ca29
X509: improve testing coverage
2024-11-13 09:10:22 +10:00
Brett Nicholas
6b1b6ece00
guard use of dilithium_key->params on WC implementation
2024-11-12 16:08:11 -07:00
Anthony Hu
b1ccbbc7fa
Addressing review comments from dgarske
2024-11-12 16:36:12 -05:00
Brett Nicholas
0e6ac11d15
- Add ability to obtain Dilithium security level (parameters) from a DER
...
encoded key based on the algorithm type OID
- Add test coverage for decoding DER keys without level specified
2024-11-12 14:19:12 -07:00
Juliusz Sosinowicz
cf80eb8788
DTLS 1.3: Don't error out on app data before finishing handshake
...
Check epoch for early data
2024-11-12 12:19:02 +01:00
Daniel Pouzzner
878cf3afaa
Merge pull request #8155 from JacobBarthelmeh/x509_req
...
fix for memory leak due to missed WOLFSSL_GENERAL_NAME capability cha…
2024-11-11 23:03:52 -06:00
Daniel Pouzzner
c5f1acf960
Merge pull request #8172 from SparkiDev/kyber_bench_fix
...
Kyber benchmark: allow ML-KEM and Kyber
2024-11-11 23:00:51 -06:00
JacobBarthelmeh
ce935fddad
cast return of XMALLOC
2024-11-11 09:57:33 -07:00
JacobBarthelmeh
4996aed166
Merge pull request #8117 from rizlik/static_mem_fix_types
...
memory: fix types in wc_LoadStaticMemory_ex()
2024-11-11 09:48:25 -07:00
Takashi Kojo
718b3d46b2
add API doc: wc_ecc_set_curve
2024-11-11 16:38:38 +09:00
Sean Parkinson
cadafffb71
Kyber benchmark: allow ML-KEM and Kyber
...
Fix benchmark to use ML-KEM/Kyber depending on how code is built.
2024-11-11 10:34:32 +10:00
Daniel Pouzzner
c08bbf0333
Merge pull request #8168 from bandi13/fixCMakeTests
...
Use only one or the other
2024-11-09 00:43:15 -06:00
Daniel Pouzzner
9361603d8b
Merge pull request #8071 from JacobBarthelmeh/static
...
display heap pointer with debug enabled
2024-11-09 00:20:32 -06:00
Daniel Pouzzner
165b4afbeb
Merge pull request #8143 from SparkiDev/kyber_plus_mlkem
...
Kyber/ML-KEM: make both available
2024-11-09 00:09:51 -06:00
Daniel Pouzzner
23f46a1c3e
Merge pull request #8140 from dgarske/wildcard
...
Fix for building sources (wildcard *.c). Add macro guard on new files.
2024-11-08 23:36:00 -06:00
Hideki Miyazaki
2831eb3ca7
Fix TSIP TLS. Call rsa_pad crypt cb in the case of TSIP
2024-11-09 14:23:57 +09:00
kaleb-himes
309c0a8218
OS_Seed declarations with legacy compilers using correct header tags
2024-11-08 15:10:50 -07:00
Andras Fekete
a295aef0b2
Use only one or the other
2024-11-08 14:34:16 -05:00
David Garske
c868c3ecff
Merge pull request #8164 from douzzer/20241105-c89-expansion-etc
...
20241105-c89-expansion-etc
2024-11-08 10:15:00 -08:00
Daniel Pouzzner
469b9efc9e
wolfssl/test.h: revert heap shim refactor -- api.c relies on these being native heap allocations.
2024-11-08 01:03:44 -06:00
Daniel Pouzzner
aa18bbca55
assorted cleanups and refactors for C89 conformance, codespell and check-source-text, and consistent heap shim usage.
...
.github/workflows/codespell.yml: remove */README_jp.txt from "skip" list.
IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt: convert from SHIFT_JIS to UTF-8.
cmake/options.h.in: use "#cmakedefine HAVE_PTHREAD 1" to avoid conflict with config.h.
configure.ac: add --enable-c89, and remove !ENABLED_OPENSSLEXTRA dependency from AM_CONDITIONAL([BUILD_CRYPTONLY],...).
wolfcrypt/src/asn.c: refactor SetOthername() for efficiency, and add PRAGMA_GCC to suppress false positive -Wstringop-overflow associated with -fstack-protector.
wolfssl/wolfcrypt/rsa.h: add WC_ prefixes to RSA_PKCS1_PADDING_SIZE and RSA_PKCS1_OAEP_PADDING_SIZE, and define unprefixed compat aliases only if !OPENSSL_COEXIST.
wolfssl/wolfcrypt/types.h:
#ifdef WOLF_C89, #define WC_BITFIELD unsigned;
enhance WOLF_ENUM_DUMMY_LAST_ELEMENT() to include the line number, to construct unique labels given a per-filename argument, to accommodate anonymous enums.
examples/asn1/asn1.c:
examples/client/client.c:
examples/pem/pem.c:
examples/server/server.c:
wolfcrypt/src/sp_dsp32.c:
wolfcrypt/src/wc_port.c:
wolfssl/test.h:
use XMALLOC/XREALLOC/XFREE consistently, not malloc/realloc/free.
wolfcrypt/benchmark/benchmark.c:
wolfcrypt/src/memory.c:
wolfcrypt/test/test.c:
wolfssl/wolfcrypt/mem_track.h:
wolfssl/wolfcrypt/settings.h:
wolfssl/wolfcrypt/types.h:
annotate intentional native heap access with "/* native heap */".
wolfcrypt/src/asn.c:
wolfssl/callbacks.h:
wolfssl/openssl/ec.h:
wolfssl/openssl/ssl.h:
wolfssl/wolfcrypt/hpke.h:
wolfssl/wolfcrypt/types.h:
fix enum trailing commas.
wolfssl/openssl/ec.h:
wolfssl/openssl/evp.h:
wolfssl/openssl/rsa.h:
wolfssl/openssl/ssl.h:
use WC_BITFIELD in bitfield elements, not byte or word16, to allow for pedantic C89 conformant builds.
wolfssl/openssl/ec.h:
wolfssl/openssl/evp.h:
wolfssl/openssl/pem.h:
wolfssl/openssl/ssl.h:
wolfssl/wolfcrypt/logging.h:
avoid variadic macros wherever possible, and where unavoidable, #ifdef WOLF_NO_VARIADIC_MACROS, define them with empty arg lists, rather than ..., to support Watcom compiler.
wolfssl/wolfcrypt/settings.h: if defined(__WATCOMC__), define WOLF_NO_VARIADIC_MACROS.
2024-11-07 22:36:24 -06: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
Colton Willey
dbec1b2b0d
Update doxygen to use proper types in sample code
2024-11-07 12:50:55 -08:00
David Garske
b648d35449
Merge pull request #8138 from JacobBarthelmeh/wolfclu_config
...
wolfCLU added support for PKCS7
2024-11-07 12:44:06 -08:00
David Garske
364cd107ff
Merge pull request #8151 from SparkiDev/test_fixes_3
...
Testing fixes
2024-11-07 12:43:12 -08:00
David Garske
79d9aab5bd
Merge pull request #8159 from philljj/spelling_cleanup
...
spelling: tiny cleanup.
2024-11-07 12:00:04 -08:00
David Garske
1061518876
Merge pull request #8153 from LinuxJedi/Pi-pico
...
Add support for Raspberry Pi Pico
2024-11-07 11:59:34 -08:00
Andrew Hutchings
1d2c78e3be
Add support for Raspberry Pi Pico
...
This adds improved support for the Raspberry Pi Pico range of
microcontrollers.
Benchmark now compiles, and added support for the RNG functions of the
Pico SDK. This gives a ~2x RNG performance improvement on the RP2040 and
over 3x improvement on the RP2350.
The accelerated SHA256 in the RP2350 unfortunately cannot be used with
wolfSSL.
2024-11-07 17:26:51 +00:00
jordan
b4e8e57b59
spelling: tiny cleanup.
2024-11-07 07:40:02 -06:00
JacobBarthelmeh
a896c16ebd
fix for memory leak due to missed WOLFSSL_GENERAL_NAME capability changes
2024-11-06 17:10:54 -07:00
Anthony Hu
0508151ddf
Quick fix
2024-11-06 16:07:18 -05:00
Daniel Pouzzner
c577ad78df
Merge pull request #8154 from bandi13/fipsCheckAddFlag
...
Ability to bypass './configure' as some tests/scripts run it anyway
2024-11-06 15:07:17 -06:00
Andras Fekete
cbf4f014cd
Fix false positive error on gcc 9.4.0
...
"error: ‘nameSz’ may be used uninitialized in this function", but it's not actually going to be used uninitialized.
2024-11-06 14:54:02 -05:00
David Garske
43879f961d
Fix RSA TSIP to return the actual cipher or plain length on success. Fix crypto callback to properly support PKCSv1.5 sign/verify and encrypt/decrypt based on padding info.
2024-11-06 10:37:03 -08:00
Andras Fekete
b4f0789ce5
Ability to bypass './configure' as some tests/scripts run it anyway
2024-11-06 08:39:23 -05:00
Sean Parkinson
256c6708e0
Testing fixes
...
Fix header inclusion: settings.h after options.h.
pkcs8_encode(): dh is not available if NO_DH is defined.
2024-11-06 15:23:49 +10:00
David Garske
3179a2ff00
Cleanup the import function declarations.
2024-11-05 14:14:25 -08:00
David Garske
02c2f445d9
Cleanup unused variables and function (void).
2024-11-05 09:45:01 -08:00
David Garske
6b02d7879a
Add public decrypt and private encrypt. Cleanups.
2024-11-05 09:24:00 -08:00
András Fekete
7e291992c0
Merge pull request #8150 from douzzer/20241104-fixes
...
20241104-fixes
2024-11-05 11:00:20 -05:00
Daniel Pouzzner
0f31f5bad9
codespell fixes.
2024-11-05 00:19:07 -06:00
Daniel Pouzzner
a540c6ade5
configure.ac: activate opensslextra for --enable-curl even if ENABLED_OPENSSLCOEXIST; tests/api.c: in test_wolfSSL_SESSION(), use WOLFSSL_SUCCESS, not SSL_SUCCESS, in HAVE_SESSION_TICKET span reachable in non-OPENSSL_EXTRA builds.
2024-11-05 00:15:18 -06:00
Daniel Pouzzner
8ecf064314
Merge pull request #8098 from dgarske/x86_notwindows_2
...
More fixes for building x86 in Visual Studio for non-windows OS
2024-11-05 00:13:13 -06:00
David Garske
92f7e91655
Merge pull request #8120 from SparkiDev/asn_templ_doc
...
ASN template documentation: adding basics for decoding
2024-11-04 15:25:18 -08:00
Sean Parkinson
36515e8daf
Make GetShortInt available with WOLFSSL_ASN_EXTRA
...
Customers may need to use GetShortInt when doing custom ASN.1 parsing.
Was only available when !NO_PWDBASED.
GetShortInt is still an internal API.
2024-11-05 08:46:34 +10:00
Daniel Pouzzner
95b47714d5
Merge pull request #8147 from bandi13/regenScripts
...
Regen scripts
2024-11-04 16:37:24 -06:00
David Garske
aad0f6e08d
Peer review feedback: Improve workaround for variadic macros and cast warnings.
2024-11-04 11:15:00 -08:00
Andras Fekete
4083afe353
Ignore file with non-UTF-8 characters
2024-11-04 13:56:07 -05:00
David Garske
9757aa0adf
Merge pull request #8113 from philljj/tiny_dilithium_fix
...
dilithium: expose wc_MlDsaKey_GetX functions as API.
2024-11-04 10:52:30 -08:00
David Garske
8f2516c4be
Merge pull request #8141 from douzzer/20241102-fixes
...
20241102-fixes
2024-11-04 10:47:53 -08:00
Andras Fekete
f7691febd3
Update generated code from scripts
2024-11-04 13:46:37 -05:00
Marco Oliverio
dce9b2e7bd
memory: fix types in static memory functions
2024-11-04 16:21:04 +00:00
Sean Parkinson
7d42ddae48
Kyber/ML-KEM: make both available
...
Make Kyber and ML-KEM individually available as well as at the same
time.
Modified TLS layer to support both Kyber and ML-KEM.
Added new identifiers in TLS layer for ML-KEM.
2024-11-04 23:51:51 +10:00
Daniel Pouzzner
6f7c968c56
rename MAX_CERT_VERIFY_SZ to WC_MAX_CERT_VERIFY_SZ, and move its setup from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h.
...
rename WOLFSSL_MAX_RSA_BITS to WC_MAX_RSA_BITS, and move its setup from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, preceding setup for WC_MAX_CERT_VERIFY_SZ.
configure.ac: restore opensslextra-linuxkm assertion, with a twist: "--enable-opensslextra with --enable-linuxkm-pie and without --enable-cryptonly is incompatible with --enable-linuxkm."
wolfcrypt/src/asn.c: fix trailing comma in enum.
wolfcrypt/src/port/arm/armv8-aes.c: fix wc_AesCcmEncrypt() and wc_AesCcmDecrypt() for test_wolfssl_EVP_aes_ccm_zeroLen().
2024-11-02 23:50:34 -05:00
Daniel Pouzzner
6119c52802
Merge pull request #8043 from bandi13/addCodespell
...
Add Codespell test to PRs
2024-11-01 21:20:29 -05:00
David Garske
836b741402
Merge pull request #8132 from douzzer/20241024-opensslcoexist-opensslextra
...
20241024-opensslcoexist-opensslextra
2024-11-01 14:34:11 -07:00
David Garske
671f93135b
Fixes for consistency in ASSERT_SAVED_VECTOR_REGISTERS and RESTORE_VECTOR_REGISTERS.
2024-11-01 14:24:30 -07:00
David Garske
ca6d49da97
Merge pull request #8139 from douzzer/20241031-fixes
...
20241031-fixes
2024-11-01 14:03:48 -07:00
David Garske
99daac3974
Improvement for SAVE_VECTOR_REGISTERS
2024-11-01 13:57:02 -07:00
David Garske
f95c4d7b67
Fix for building sources (wildcard *.c). Add macro guard on new files.
2024-11-01 10:46:40 -07:00
Daniel Pouzzner
b41ce0427c
src/pk.c: in pem_read_bio_key(), fix invalid read (ZD#18875).
2024-11-01 12:43:08 -05:00
Andras Fekete
0915012b72
Fix new spelling errors
2024-11-01 13:00:59 -04:00
Andras Fekete
8612f15d2e
Don't modify Renesas config files
2024-11-01 12:59:01 -04:00
Andras Fekete
34298e8ada
More spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
e14abbdc79
Cleanup spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
9082baabd3
Change the name of the file.
2024-11-01 12:59:01 -04:00
Andras Fekete
e28316027e
Cleaner way to exclude words that are considered 'misspelled'
2024-11-01 12:59:01 -04:00
Andras Fekete
552968bd5d
Add explanations for excluded files
2024-11-01 12:59:01 -04:00
Andras Fekete
b8f9ac6fa5
Eliminate some UTF-8 errors
2024-11-01 12:59:01 -04:00
Andras Fekete
31d0dfb981
Add in some common code to keep Actions to a minimum
2024-11-01 12:59:01 -04:00
Andras Fekete
f4dae7cbaf
Few more spelling mistakes
2024-11-01 12:59:01 -04:00
Andras Fekete
c0cb206a80
Suspicious that codespell is not checking spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
8b81d6e099
Simple word fix
2024-11-01 12:59:01 -04:00
Andras Fekete
099c6e0e1f
Fix multiple filenames
2024-11-01 12:59:01 -04:00
Andras Fekete
b8253ac4c5
Final set of spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
8ecfe311d8
More spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
6c4b403fa4
More exceptions
2024-11-01 12:59:01 -04:00
Andras Fekete
b3fe71d9d9
Spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
88d4b4c815
Few more exceptions
2024-11-01 12:59:01 -04:00
Andras Fekete
97998d0713
Spellcheck on assembly
2024-11-01 12:59:01 -04:00
Andras Fekete
631eafacb8
Fix some spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
57acf721d4
Minor fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
725e4323e2
Use ignore words list instead of file
2024-11-01 12:59:01 -04:00
Andras Fekete
19e9e31b7c
Add Codespell test to PRs
2024-11-01 12:59:01 -04:00
Daniel Pouzzner
9db74dc128
configure.ac: add AM_MAINTAINER_MODE([disable]);
...
add config-time assert for "dual-alg-certs is incompatible with --enable-cryptonly.";
remove obsolete config-time check for "--enable-opensslextra without --enable-cryptonly is incompatible with --enable-linuxkm.";
linuxkm/linuxkm_wc_port.h: add fallback definitions for INT32_MAX and UINT32_MAX;
linuxkm/module_exports.c.template: add wolfssl/openssl/fips_rand.h;
wolfssl/wolfcrypt/settings.h: add #undef HAVE_ATEXIT to WOLFSSL_LINUXKM settings;
wolfssl/wolfcrypt/types.h: fix trailing comma in the DYNAMIC_TYPE_* enum.
2024-11-01 11:57:36 -05:00
Daniel Pouzzner
6b78726f13
Merge pull request #8134 from dgarske/ge448
...
Fix GE448 conversion warning
2024-11-01 11:55:01 -05:00
JacobBarthelmeh
13ad54cf46
wolfCLU added support for PKCS7
2024-11-01 09:44:46 -06:00
Anthony Hu
d959d9de7f
cast 1 to long
2024-11-01 11:34:22 -04:00
Sean Parkinson
24003b265a
Merge pull request #8129 from bigbrett/curve25519-generic-keyparsing
...
Curve25519 generic keyparsing
2024-11-01 09:04:50 +10:00
Sean Parkinson
76e421b557
Merge pull request #8118 from bigbrett/wc-test-ecc-zero-digest-disable
...
wolfcrypt tests: disable ecc sign/verify of all zero digest
2024-11-01 09:03:39 +10:00
David Garske
6e3f83d19e
Sync with script.
2024-10-31 15:54:05 -07:00
David Garske
652f7059ce
Merge pull request #8061 from wolfSSL/NDS_fix
...
Libnds : Added more descriptive README for IDE/NDS and MelonDS C-flag
2024-10-31 14:53:22 -07:00
Anthony Hu
2254ec89d3
Fix for setting wrong version in CSRs.
2024-10-31 17:08:42 -04:00
Brett Nicholas
aafd07d79a
remove ECC_SHAMIR macro protection for ECC sign/verify of zero digest
2024-10-31 14:20:57 -06:00
Brett Nicholas
325221707c
address review feedback
2024-10-31 13:02:21 -06:00
Daniel Pouzzner
950ee40111
additional fixes and enhancements for -DOPENSSL_EXTRA -DOPENSSL_COEXIST:
...
configure.ac:
* add --enable-all-osp to separate OSP meta-feature sets from --enable-all, allowing --enable-all --disable-all-osp --disable-opensslall (e.g. for testing OPENSSL_COEXIST).
* fix enable_all_crypto=yes in enable-all to be conditional on "$enable_all_crypto" = "".
* move enable_rsapss=yes from enable-all to enable-all-crypto.
examples/ and testsuite/: #undef OPENSSL_COEXIST unconditionally rather than only if defined(OPENSSL_EXTRA), to capture -DOPENSSL_EXTRA_X509_SMALL or any other such variants.
2024-10-31 13:42:04 -05:00
David Garske
0d495702e5
Fix GE448 conversion warning:
...
`error: conversion from ‘word32’ {aka ‘unsigned int’} to ‘byte’ {aka ‘unsigned char’} may change value`
2024-10-31 10:34:19 -07:00
Brett Nicholas
17c7b6cc3a
moved some macro logic from test.c to settings.h
2024-10-31 10:51:51 -06:00
David Garske
429e7c79e3
Merge pull request #8133 from SparkiDev/asm_no_uint_t
...
ASM: generated code not using uint*_t types
2024-10-31 07:42:12 -07:00
Daniel Pouzzner
39e8cb55bb
additional fixes and peer review for -DOPENSSL_EXTRA -DOPENSSL_COEXIST: cover -DWOLFSSL_QUIC, fix -DNO_ASN, rename WOLFSSL_ASN1_TYPE_* to WOLFSSL_V_ASN1_*, completed nativization of NID_*, and switch to prefix WC_NID_ rather than wc_NID_.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
a2bcbf7ecf
additional fixes and peer review for -DOPENSSL_EXTRA -DOPENSSL_COEXIST: cover -DWOLFSSL_QUIC, fix -DNO_ASN, rename WOLFSSL_ASN1_TYPE_* to WOLFSSL_V_ASN1_*, completed nativization of NID_*, and switch to prefix WC_NID_ rather than wc_NID_.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
ca9d012a24
wolfssl/ssl.h: remove OPENSSL_EXTRA gate on definitions for WOLFSSL_ASN1_TYPE_* -- some are used in non-OPENSSL_EXTRA builds, e.g. when -DWOLFSSL_X509_NAME_AVAILABLE.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
cf95fdc071
Globally remap & refactor conflicting symbols to allow -DOPENSSL_EXTRA -DOPENSSL_COEXIST, or equivalently, --enable-opensslextra --enable-opensslcoexist.
...
No functional changes.
Several compat symbols that were formerly enums are now macros.
All library source is refactored to use only native symbols in all code gated in with --enable-all-crypto --enable-opensslextra.
wolfcrypt/test/test.c is similarly refactored to use only native symbols.
examples/ and tests/ are unmodified except for header setup to disable OPENSSL_COEXIST and TEST_OPENSSL_COEXIST.
2024-10-31 00:10:21 -05:00
Sean Parkinson
dcd75df852
ASN template documentation: adding basics for decoding
...
First draft of ASN template documentation that helps with writing
parsing code.
2024-10-31 12:08:22 +10:00
Sean Parkinson
89d2964320
Merge pull request #8115 from miyazakh/ocsp_tls13_client
...
Check Intermediate cert OCSP when using tls1.3 for client side
2024-10-31 11:13:01 +10:00
Daniel Pouzzner
4b8c9bbb6d
Merge pull request #8130 from anhu/cks_tlsver_downgrade
...
Consider downgrade to TLS 1.2 when parsing CKS.
2024-10-30 19:20:24 -05:00
Sean Parkinson
26312141d8
ASM: generated code not using uint*_t types
...
Don't use uint*_t types as they may not be available.
2024-10-31 10:14:00 +10:00
Sean Parkinson
614a0e3f09
Merge pull request #8123 from dgarske/armasm
...
Fix issue with error: conflicting types for 'BlockSha3'
2024-10-31 09:37:26 +10:00
David Garske
544a7d93e1
Merge pull request #8103 from bandi13/addUncommonUtilities
...
Add less frequently used tools that are handy to have
2024-10-30 15:24:25 -07:00
David Garske
807975c864
Merge pull request #8127 from anhu/percentd
...
added a missing %d
2024-10-30 15:21:15 -07:00
David Garske
d147968aed
Merge pull request #8125 from philljj/fix_acert_test_defined_not_used
...
tests api: fix inconsistent do_acert_verify_test guards.
2024-10-30 15:21:04 -07:00
David Garske
fc56060873
Merge pull request #8102 from embhorn/topic2203
...
Fix docs for invalid hash requirements.
2024-10-30 15:15:19 -07:00
Anthony Hu
69f2529aa5
Consider downgrade to TLS 1.2 when parsing CKS.
2024-10-30 16:50:59 -04:00
JacobBarthelmeh
bc56129ed8
display heap pointer with debug enabled
2024-10-30 14:39:12 -06:00
Brett Nicholas
20cf6b74c1
fix curve25519 test sanitizer errors
2024-10-30 14:02:38 -06:00
Brett Nicholas
589bcaa12a
added doxygen for curve25519 DER functions
2024-10-30 12:56:14 -06:00
Brett Nicholas
62d7e90352
added additional curve25519 generic test
2024-10-30 12:56:10 -06:00
Anthony Hu
54dc8320d2
added a missing %d
2024-10-30 14:53:21 -04:00
David Garske
0669ba82c4
Avoid stdint types.
2024-10-30 10:28:45 -07:00
jordan
90648b1e79
tests api: fix inconsistent do_acert_verify_test guards.
2024-10-30 11:06:54 -05:00
Brett Nicholas
97a370ed08
added generic curve25519 encode/decode functions that can handle combined keypairs
2024-10-30 09:37:16 -06:00
David Garske
c557c6f2bd
Fix issue with error: conflicting types for 'BlockSha3'.
...
```
[CC-AARCH64] lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.o
lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:212:6: error: conflicting types for 'BlockSha3'; have 'void(long unsigned int *)'
212 | void BlockSha3(unsigned long* state)
| ^~~~~~~~~
In file included from lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:35:
lib/wolfssl/wolfssl/wolfcrypt/sha3.h:224:20: note: previous declaration of 'BlockSha3' with type 'void(word64 *)' {aka 'void(long long unsigned int *)'}
224 | WOLFSSL_LOCAL void BlockSha3(word64 *s);
| ^~~~~~~~~
```
2024-10-29 16:56:50 -07:00
Hideki Miyazaki
b409967f3b
fix spaces
2024-10-30 07:47:40 +09:00
David Garske
72306b9a67
Merge pull request #7973 from bandi13/fixSniffer
...
Fix sniffer
2024-10-29 15:21:41 -07:00
Hideki Miyazaki
b07a372b52
Fix spaces and tabs
2024-10-30 06:42:07 +09:00
David Garske
b982314ac6
Merge pull request #8101 from miyazakh/tsip_ca_add
...
Check Root CA by TSIP before adding it to ca-table
2024-10-29 14:23:47 -07:00
JacobBarthelmeh
2b8d43cef2
Merge pull request #8119 from dgarske/async_20241028
...
Fixes for asynchronous release - SHA3/HMAC devId
2024-10-29 15:11:43 -06:00
Andras Fekete
2cdecd85a2
If we have a capture on device 'any', then we need to handle the offset
...
Detect reading of packet errors
--enable-all and --enable-sniffer exposed this issue
Don't need variable
Rework argument parsing
Need a way to allow arguments to be supplied more granularly. Partucilarly, I needed a "-tracefile" argument without requiring the use of a PCAP file
Fix error prints to STDERR
Fix setting of port filtering
Fix 80 char limit
Not actually a bad packet when there are no more packets
Fix strcat size
Allow the sniffer to print the trace to STDOUT
Fix indexing
Take out superfluous error which is handled later
Set default port to 11111
Single return point
Combine chain to one contiguous memory block
Fix return
Add in error handling for XMALLOC
Add in debugging output when --enable-debug
It makes no sense to allocate a ton of small buffers to process chains
Ultimately, the code is slower because of the several small memcpy instead of a single large contiguous memcpy
Pass in a device name
Fix unused variable
Fix cast
Addressing PR comments
Add new flags to --help
2024-10-29 16:55:20 -04:00
Daniel Pouzzner
0ded8ba0c7
Merge pull request #8074 from bandi13/revertGithubFix
...
Revert "Merge pull request #8072 from rizlik/github-fix"
2024-10-29 15:17:50 -05:00
Daniel Pouzzner
5b07d47e7b
Merge pull request #8095 from embhorn/coverity-workflow
...
Add more configs to Coverity scan schedule.
2024-10-29 15:02:15 -05:00
David Garske
84b5d6613d
More fixes for building x86 in Visual Studio for non-windows OS (Watcom C compiler). Followup to PR #7884 . Fixes ZD 18465
...
* Consolidate the USE_WINDOWS_API to a single place.
* Expand the `WOLFSSL_NOT_WINDOWS_API` improvement for intrinsics and word sizes.
* Fix for macro variadic `...` when no variables are used (some compilers like Watcom C have issue with this).
* Fix for Watcom C compiler "long long" -> "__int64".
* Fix a couple of minor cast warnings reported from VS.
2024-10-29 11:50:24 -07:00
Hideki Miyazaki
32c1f8bbd7
implement TSIP RSA Public Enc/Private Dec
2024-10-29 20:09:22 +09:00
Daniel Pouzzner
57a5895d0e
Merge pull request #8110 from philljj/fix_infer
...
infer: fix uninit values in pkcs8_encode.
2024-10-29 01:16:04 -05:00
Sean Parkinson
202822c655
Merge pull request #8114 from douzzer/20241025-fixes
...
20241025-fixes
2024-10-29 09:55:03 +10:00
David Garske
ea35b98005
Fixed SHA3 issue with possible uninitialized devId when building with async. Fixed HMAC set key issue with devId/heap getting lost.
2024-10-28 11:30:05 -07:00
Brett Nicholas
cac11e3d09
add non-feature-specific macro to disable ECC sign/verify of all-zero digest
2024-10-28 12:22:10 -06:00
Hideki Miyazaki
79a9e0a709
intermediate cert check when using tls1.3 for client side
2024-10-26 14:09:58 +09:00
Daniel Pouzzner
6f87f57d7a
fixes for gating and ARM32 alignment defects:
...
wolfcrypt/src/port/arm/armv8-aes.c: in the WOLFSSL_ARMASM_NO_HW_CRYPTO version of wc_AesSetKey(), copy the supplied userKey to a properly aligned buffer if necessary before calling AES_set_encrypt_key();
src/dtls13.c: in Dtls13GetRnMask(), if defined(WOLFSSL_LINUXKM)), return retval of wc_AesEncryptDirect();
wolfcrypt/src/misc.c: add readUnalignedWord32(), writeUnalignedWord32(), readUnalignedWords32(), and writeUnalignedWords32();
wolfcrypt/src/siphash.c: use readUnalignedWord64(), readUnalignedWord32(), and writeUnalignedWord64(), to avoid unaligned access faults, and fix cast in byte-reversing version of GET_U32().
2024-10-25 23:52:32 -05:00
jordan
9d8c5a293f
dilithium: expose wc_MlDsaKey_GetX functions as API.
2024-10-25 13:29:06 -05:00
Daniel Pouzzner
bdd62314f0
Merge pull request #8111 from JacobBarthelmeh/release
...
prepare for release 5.7.4
2024-10-24 16:00:03 -05:00
JacobBarthelmeh
dd2b191c36
update version listed in wolfssl-fips.rc and Ada wrapper
2024-10-24 14:19:17 -06:00
JacobBarthelmeh
8c5e188dd4
remove trailing white space in README
2024-10-24 13:04:00 -06:00
JacobBarthelmeh
8604024b95
prepare for release 5.7.4
2024-10-24 11:32:33 -06:00
Daniel Pouzzner
3f651a8dd0
Merge pull request #8109 from JacobBarthelmeh/coverity
...
Recent coverity warnings
2024-10-23 21:18:44 -05:00
jordan
ce31b15608
infer: fix uninit values in pkcs8_encode.
2024-10-23 20:11:51 -05:00
Hideki Miyazaki
a14d7db58c
move trailing space
2024-10-24 09:31:00 +09:00
JacobBarthelmeh
52ba700eb3
CID 426426 code maintainability warning, stored NULL value overwritten before used
2024-10-23 18:05:12 -06:00
JacobBarthelmeh
077b070132
CID 426427 remove duplicate null checks
2024-10-23 17:57:14 -06:00
JacobBarthelmeh
9af8716e85
Merge pull request #8087 from ColtonWilley/x509_store_rewrite
...
Initial rewrite of X509 STORE to replicate openssl behavior
2024-10-23 17:14:40 -06:00
Daniel Pouzzner
e7e20532eb
Merge pull request #8097 from julek-wolfssl/zd/18822
...
Fix TLS v1.2 session resumption edge cases
2024-10-23 18:01:35 -05:00
JacobBarthelmeh
830c5dace6
Merge pull request #8106 from douzzer/20241023-fixes
...
20241023-fixes
2024-10-23 16:44:09 -06:00
David Garske
25e32c2539
Fix for TLS v1.2 session resumption with tickets where the server decides to do a full handshake. The wrong sessionIDSz was being checked and should be the arrays one since it get set from the server_hello.
2024-10-23 15:14:05 -07:00
Daniel Pouzzner
cab20fbdd2
add and use WOLFSSL_PARTIAL_CHAIN as native bitmask macro for compat layer X509_V_FLAG_PARTIAL_CHAIN;
...
in src/x509_str.c, fix several C++ "invalid conversion" errors in X509StoreFreeObjList() and wolfSSL_X509_STORE_get0_objects().
2024-10-23 16:57:58 -05:00
Colton Willey
6f0bcac737
Address review comments, rename WOLFSSL_INTER_CA, use up_ref for get issuer
2024-10-23 16:55:34 -05:00
Colton Willey
ee4e1b6262
Properly omit self signed CA from untrusted intermediates, handle memory leak for SSL case with proper flow
2024-10-23 16:55:34 -05:00
Colton Willey
95f8d74202
Fix loop to decrement
2024-10-23 16:55:34 -05:00
Colton Willey
96138e70f8
Restore proper error code handling for self signed CA in non-trusted intermediates
2024-10-23 16:55:34 -05:00
Colton Willey
4c63668295
Small changes per review comments
2024-10-23 16:55:34 -05:00
Colton Willey
3fc3a84a6b
Move X509_STORE_CTX_set_flags under OPENSSL_EXTRA
2024-10-23 16:55:34 -05:00
Colton Willey
1ddb2ce435
Properly implement set flags for X509_V_FLAG_PARTIAL_CHAIN
2024-10-23 16:55:34 -05:00
Colton Willey
87ce96527a
Changes for various failing build configs
2024-10-23 16:55:34 -05:00
Colton Willey
1afbf55a80
Fix new build error after refactor
2024-10-23 16:55:34 -05:00
Colton Willey
6607314dc6
Address code comments, rewrite get issuer internals, use better internal names, get rid of all lines over 80 chars
2024-10-23 16:55:34 -05:00
Colton Willey
f0fae6506f
Fix windows warnings
2024-10-23 16:55:34 -05:00
Colton Willey
98eb6b398c
Fix for windows builds
2024-10-23 16:55:34 -05:00
Colton Willey
f7bfa71d9f
Implement support for verify flag X509_V_FLAG_PARTIAL_CHAIN
2024-10-23 16:55:34 -05:00
Colton Willey
12f4f69fb4
Allow intermediate CA certs without keycertsign when added through X509 STORE
2024-10-23 16:55:34 -05:00
Colton Willey
38c7de1707
Fixes for CI build errors
2024-10-23 16:55:34 -05:00
Colton Willey
17c9e92b7f
Initial rewrite of X509 STORE to replicate openssl behavior
2024-10-23 16:55:34 -05:00
Daniel Pouzzner
82273094e0
Merge pull request #8107 from JacobBarthelmeh/aesgcm
...
fix for state of aes.gcm.H on re-use
2024-10-23 16:52:42 -05:00
JacobBarthelmeh
1d25e0f89b
Merge pull request #8104 from gojimmypi/pr-vs2022-wolfssl-name
...
Name VS2022 binary output wolfssl via project name
2024-10-23 15:36:55 -06:00
JacobBarthelmeh
8fbf6a59bc
Merge pull request #8105 from kareem-wolfssl/zd18825
...
Fix 256-bit ECC conditional in ecc_map_ex.
2024-10-23 15:19:50 -06:00
JacobBarthelmeh
d0f5778429
fix for state of aes.gcm.H on re-use
2024-10-23 15:04:06 -06:00
Andras Fekete
7cee9faa73
Addressing PR comments
2024-10-23 16:53:10 -04:00
Andras Fekete
19d738cecf
Revert "Don't need to upload/download artifacts"
...
This reverts commit b215398bd4 .
2024-10-23 14:28:24 -04:00
Kareem
8986a9dae0
Fix 256-bit ECC conditional in ecc_map_ex.
2024-10-23 11:12:48 -07:00
Daniel Pouzzner
afa5b0168e
fix HAVE_SHA* configurations in IDE/iotsafe/user_settings.h to also set WOLFSSL_SHA*, and in IDE/STM32Cube/default_conf.ftl, IDE/iotsafe/user_settings.h, and examples/configs/user_settings_stm32.h, comment HAVE_SHA* as "old freeRTOS settings.h requires this".
2024-10-23 12:46:32 -05:00
gojimmypi
e3c9c07393
Name VS2022 binary output wolfssl via project name
2024-10-23 09:51:18 -07:00
Daniel Pouzzner
6e14889758
Merge pull request #8094 from JacobBarthelmeh/coverity
...
minor fixes for Coverity reports
2024-10-23 11:26:33 -05:00
JacobBarthelmeh
beeda7bc6f
Merge pull request #8100 from douzzer/20241022-cleanups
...
20241022-cleanups
2024-10-23 10:08:57 -06:00
Andras Fekete
cf6975b603
Add less frequently used tools that are handy to have
2024-10-23 11:23:46 -04:00
Eric Blankenhorn
f20f96c8a2
Fix docs for invalid hash requirements.
2024-10-23 08:43:00 -05:00
Juliusz Sosinowicz
031656ee7a
Send a new ticket when rejecting a ticket and tickets enabled
2024-10-23 13:12:46 +02:00
Hideki Miyazaki
ba1cd85934
check Root CA by TSIP before adding it to ca-table
2024-10-23 18:02:56 +09:00
Daniel Pouzzner
ea491b80ef
tests/api.c: gate test_GENERAL_NAME_set0_othername() on OPENSSL_ALL, not OPENSSL_EXTRA, as it fails with --enable-all-crypto --enable-opensslextra, and is commented to require --enable-opensslall.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
3bbd00f918
wolfcrypt/src/asn.c: tweak retval handling in MakeSignature() CERTSIGN_STATE_DO section for the benefit of WOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
508555c927
configure.ac: add several missing low level crypto algorithms to all-crypto that are already included indirectly in enable-all.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
30181f2ced
configure.ac: for reproducible-build, use --build-id=sha1, not --build-id=none, to support users relying on build-id in the linked object.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
bffcfb7efc
wolfcrypt/src/ecc.c: in wc_ecc_get_curve_id_from_oid(), deconditionalize guard against zero-length len added in 03a6eed037, to fix test_wc_ecc_get_curve_id_from_oid() failing in cross-mingw-all-crypto.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
6429315216
fix references to misnamed HAVE_SHA224, HAVE_SHA384, HAVE_SHA512 (correct names have WOLFSSL_ prefixes).
2024-10-23 00:02:28 -05:00
JacobBarthelmeh
43fe46cf24
Merge pull request #8099 from dgarske/armasm_aes
...
Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member
2024-10-22 17:29:45 -06:00
David Garske
5a0bb3a3ed
Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member. ZD 18841.
2024-10-22 14:30:54 -07:00
JacobBarthelmeh
f21a763ae9
return out of test function if failing RNG init
2024-10-22 14:22:46 -06:00
Andras Fekete
d981cd5b36
Revert "Test using my branch"
...
This reverts commit 5a1da526da .
2024-10-22 12:22:08 -04:00
Andras Fekete
6255859925
Fix package name
2024-10-22 10:56:42 -04:00
Andras Fekete
5a1da526da
Test using my branch
2024-10-22 10:27:38 -04:00
Juliusz Sosinowicz
2847cbfbad
Simplify TLS 1.2 session ID logic
...
Optimize entropy use. Only generate the exact amount of random data that we will actually keep.
Refactor done as part of work on ZD18822
2024-10-22 14:31:46 +02:00
JacobBarthelmeh
18150a11aa
CID 426062,426063 initialization and free check
2024-10-22 00:24:29 -06:00
JacobBarthelmeh
27267d7d2e
CID 426066 fix check if null before free
2024-10-22 00:21:26 -06:00
Daniel Pouzzner
846ef1570d
Merge pull request #8096 from philljj/fix_coverity_more
...
Fix more coverity errors.
2024-10-21 23:57:56 -05:00
Daniel Pouzzner
f8fc31e134
Merge pull request #8090 from gojimmypi/pr-visual-studio-2022
...
Add Visual Studio 2022 Project Files for wolfSSL, Test, & Benchmark
2024-10-21 23:56:57 -05:00
Daniel Pouzzner
805eaa90cc
Merge pull request #7797 from julek-wolfssl/softhsm
...
Init SoftHSMv2 support
2024-10-21 23:56:12 -05:00
jordan
5fd9e99bbd
coverity: don't overwrite obj in wolfSSL_X509_get_ext_d2i.
2024-10-21 20:49:34 -05:00
JacobBarthelmeh
b535d9f752
Merge pull request #8093 from philljj/fix_coverity
...
Fix coverity
2024-10-21 16:45:51 -06:00
Eric Blankenhorn
4aa3d5f8ce
Add more configs to Coverity scan schedule.
2024-10-21 17:29:07 -05:00
gojimmypi
ee24446bee
Add Visual Studio 2022 Project Files for wolfSSL, Test, & Benchmark
2024-10-21 14:05:51 -07:00
jordan
5690af82dc
wolfcrypt test: fix double free.
2024-10-21 15:57:24 -05:00
jordan
35def11781
coverity: fix error, and cleanup.
2024-10-21 14:59:32 -05:00
JacobBarthelmeh
104c805b82
Merge pull request #8092 from douzzer/20241021-wc_FreeRsaKey-WOLFSSL_XILINX_CRYPT
...
20241021-wc_FreeRsaKey-WOLFSSL_XILINX_CRYPT
2024-10-21 13:26:55 -06:00
Daniel Pouzzner
38c337967e
Merge pull request #8086 from bandi13/addDependency
...
Need 'libfile' for license.pl
2024-10-21 14:20:42 -05:00
Daniel Pouzzner
25da3bfe5f
Merge pull request #8070 from JacobBarthelmeh/testing_static_memory
...
use heap hint with wolfSSL_CTX_check_private_key
2024-10-21 13:57:55 -05:00
JacobBarthelmeh
8a71c3b3db
Merge pull request #8066 from gojimmypi/pr-espressif-wolfcrypt
...
Apply various Espressif compatibility updates
2024-10-21 11:36:24 -06:00
Daniel Pouzzner
f24b987f59
wolfcrypt/src/rsa.c: fix wc_FreeRsaKey() WOLFSSL_XILINX_CRYPT XFREE() call to pass key->heap as before.
2024-10-21 12:26:29 -05:00
gojimmypi
187a9b5b4d
Apply various Espressif compatibility updates
2024-10-21 09:20:32 -07:00
JacobBarthelmeh
bc0a2c43e6
avoid warning for unused parameter with certain build configurations
2024-10-21 10:04:26 -06:00
JacobBarthelmeh
efff8e096c
Merge pull request #8076 from gojimmypi/pr-update-espressif-examples
...
Update Espressif Examples
2024-10-21 09:57:29 -06:00
Juliusz Sosinowicz
901384e704
Init SoftHSMv2 support
...
- wolfSSL_EVP_PKEY_set1_DH: If both private and public present, output private key
- ToTraditionalInline_ex2: Add DH checking
- wc_ecc_get_curve_id: check index is not negative
- Fix i2d_PKCS8_PRIV_KEY_INFO to actually output pkcs8 instead of just der
- wolfSSL_EVP_PKEY2PKCS8: Create duplicate to avoid double free
- wolfSSL_DH_generate_key: Fix case where not enough buffer was allocated for 128 bit case
- pkcs8_encode: Add DSA and DH support
- wolfSSL_d2i_PKCS8_PKEY: Correctly advance buffer
- RSA_LOW_MEM: export all integers in compat layer
- Add softhsm action
- Define
- OPENSSL_DH_MAX_MODULUS_BITS
- OPENSSL_DSA_MAX_MODULUS_BITS
- OPENSSL_RSA_MAX_MODULUS_BITS
- Implement
- BN_mul_word
- i2d_ECPKParameters
- PEM_write_bio_PKCS8_PRIV_KEY_INFO
- PEM_read_bio_PKCS8_PRIV_KEY_INFO
- i2d_PKCS8_PRIV_KEY_INFO
- RSA_padding_add_PKCS1_PSS_mgf1
- RSA_verify_PKCS1_PSS_mgf1
2024-10-21 17:26:42 +02:00
JacobBarthelmeh
8fda4ce147
use heap hint with wolfSSL_CTX_check_private_key
2024-10-21 08:53:15 -06:00
JacobBarthelmeh
ef063aac2f
Merge pull request #8091 from julek-wolfssl/openvpn-action-update
...
openvpn action: remove v2.6.0 as certs have expired
2024-10-21 08:50:53 -06:00
Juliusz Sosinowicz
e1aba52e51
openvpn action: remove v2.6.0 as certs have expired
2024-10-21 13:50:36 +02:00
philljj
ea3a79e216
Merge pull request #8089 from douzzer/20241017-wc-delete-methods
...
20241017-wc-delete-methods
2024-10-19 11:07:19 -05:00
Daniel Pouzzner
996986d0c1
refactor wc_AesDelete, wc_curve25519_delete, wc_ed25519_delete, wc_HashDelete, and wc_DeleteRsaKey to take two arguments, the first a required pointer to the object, the second an optional pointer to the pointer to be zeroed upon successful deletion, for the benefit of calling from C# without unsafe code.
...
wrapper/CSharp/wolfSSL_CSharp/wolfCrypt.cs: update for new calling conventions around wc_AesNew, wc_curve25519_new, wc_ed25519_new, wc_HashNew, and wc_NewRsaKey, and the corresponding delete functions.
2024-10-18 21:13:38 -05:00
Daniel Pouzzner
f44d12026a
wolfssl/wolfcrypt/{aes.h,curve25519.h,ed25519.h,hash.h,rsa.h}: remove unneeded .isAllocated member from struct definitions, and add int *result_code argument to constructor prototypes;
...
wolfssl/wolfcrypt/aes.h: add Aes.streamData_sz;
src/tls13.c: fix devId passed to wc_HmacInit() in CreateCookieExt() and TlsCheckCookie();
src/keys.c: in SetKeys(), call wc_HmacInit() on hmacs only if newly allocated;
wolfcrypt/src/aes.c:
* in wc_Gmac(), wc_GmacVerify(), and AesSivCipher(), use wc_AesNew() and wc_AesDelete();
* in wc_AesInit(), zero the object on entry, and remove superseded piecemeal initializations to zero;
* in wc_AesFree(), zero aes->streamData, and zero the entire object as final cleanup;
wolfcrypt/src/curve25519.c: in wc_curve25519_free(), zero the entire object rather than zeroing piecemeal;
wolfcrypt/test/test.c:
* add fallback implementations (for old FIPS) of wc_HashNew(), wc_HashDelete(), wc_curve25519_new(), wc_curve25519_delete(), wc_ed25519_new(), and wc_ed25519_delete();
* update constructor calls throughout for new semantics;
* refactor ed25519_test() for proper cleanup and error encoding.
2024-10-18 17:49:28 -05:00
Daniel Pouzzner
984d16b727
refactor wolfcrypt constructors:
...
add delete APIs, matching recently added wc_AesNew, wc_curve25519_new, wc_ed25519_new, wc_HashNew, and wc_NewRsaKey:
* wc_AesDelete()
* wc_HashDelete()
* wc_DeleteRsaKey()
* wc_curve25519_delete()
* wc_ed25519_delete()
* remove handling in corresponding preexisting free APIs for recently added .isAllocated member -- this restores preexisting semantics;
* add WC_NO_CONSTRUCTORS gate, and auto-activate it when NO_WOLFSSL_MEMORY && WOLFSSL_NO_MALLOC (unless preempted by XMALLOC_USER or XMALLOC_OVERRIDE);
* exclude recently added .isAllocated members from wolfcrypt structs when defined(WC_NO_CONSTRUCTORS);
* adjust wolfcrypt/test/test.c for consistency with the above, and fix cleanup codes/dynamics in several tests.
2024-10-17 18:48:07 -05:00
Andras Fekete
b215398bd4
Don't need to upload/download artifacts
2024-10-17 16:49:27 -04:00
philljj
61b726fae7
Merge pull request #8088 from douzzer/20241016-dtls13-cleanup
...
20241016-dtls13-cleanup
2024-10-17 15:58:07 -04:00
Andras Fekete
752b2c075c
Add exception to forked repos
2024-10-17 15:09:03 -04:00
Andras Fekete
8ed406c69d
Fix test issues
2024-10-17 12:08:21 -04:00
Daniel Pouzzner
06de22e72b
api.c:test_wolfSSL_dtls_stateless_maxfrag(): add missing condition (clang-analyzer-core.NullDereference).
2024-10-17 10:57:19 -05:00
Daniel Pouzzner
fa65da7bb0
analyzer-driven cleanups of --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch:
...
Dtls13HashClientHello(): fix wc_HashType handling;
Dtls13SendFragment(): fix identicalConditionAfterEarlyExit;
GetDtlsRecordHeader(): fix error handling around GetDtls13RecordHeader() (incorrectLogicOperator);
test_wolfSSL_dtls_stateless_maxfrag(): fix a clang-analyzer-core.NullDereference,
test_dtls_frag_ch(): fix a clang-diagnostic-embedded-directive,
test_AEAD_limit_client(): fix an united-data defect found by valgrind.
2024-10-17 00:06:32 -05:00
Daniel Pouzzner
abc6edf4c7
Merge pull request #7796 from SparkiDev/dtls_read_write_threaded
...
SSL asynchronous read/write and encrypt
2024-10-17 00:05:47 -05:00
Daniel Pouzzner
8803f3dd70
Merge pull request #8085 from philljj/fix_coverity
...
Fix coverity errors
2024-10-16 17:18:31 -05:00
Daniel Pouzzner
cc421ddace
Merge pull request #8075 from night1rider/MAX-HW-SHA-FIX
...
Fixing CB needing HAVE_AES_ECB and SHA struct issue for MAX32666/5 port
2024-10-16 17:17:01 -05:00
Daniel Pouzzner
0c640eb3c5
Merge pull request #8081 from SparkiDev/arm32_thumb2_asm_fix
...
Thumb2 ASM: indicated by WOLFSSL_ARMASM_THUMB2
2024-10-16 17:00:01 -05:00
Daniel Pouzzner
49ad2d5c46
Merge pull request #8079 from SparkiDev/arm32_asm_regen
...
ARM32 ASM: regeneration after scripts changes
2024-10-16 16:45:28 -05:00
Andras Fekete
4ca0176668
Need 'libfile' for license.pl
2024-10-16 17:37:17 -04:00
Daniel Pouzzner
9665434694
Merge pull request #8080 from SparkiDev/coverity_fix_5
...
Unit test: fix coverity issue
2024-10-16 16:31:27 -05:00
Daniel Pouzzner
4ed3c00b29
Merge pull request #8078 from SparkiDev/sp_c_cast_and
...
SP C: cast after and with constant
2024-10-16 16:30:15 -05:00
jordan
554ebc2e9e
coverity: fix double free of encryptedContent.
2024-10-16 16:27:44 -05:00
Daniel Pouzzner
a833d6e9b2
Merge pull request #8084 from anhu/kyber_levels
...
Correct kyber levels. Was copy and paste error.
2024-10-16 15:54:18 -05:00
jordan
115507e0c0
coverity: null check.
2024-10-16 13:08:06 -05:00
Anthony Hu
db6df887a6
Correct kyber levels. Was copy and paste error.
2024-10-16 13:39:57 -04:00
jordan
d6fe15af8c
coverity: check mp_sub_d return values.
2024-10-16 11:23:33 -05:00
philljj
2abbab2fd8
Merge pull request #8082 from SparkiDev/bn_bin2bn_fix
...
BN API: fix BN_bin2bn to handle NULL data properly
2024-10-16 12:00:41 -04:00
Sean Parkinson
64a9e6f7c4
BN API: fix BN_bin2bn to handle NULL data properly
...
BN_bin2bn was freeing the BN and returning it.
Added test for this.
2024-10-16 14:08:55 +10:00
Sean Parkinson
1ce90cc8a5
Thumb2 ASM: indicated by WOLFSSL_ARMASM_THUMB2
...
Detecting ARM or Thumb2 is not simple so making our own define that will
work: WOLFSSL_ARMASM_THUMB2 to indicate to use Thumb2 assembly code.
2024-10-16 13:56:44 +10:00
Sean Parkinson
b8d3b990ea
Unit test: fix coverity issue
...
test_wolfSSL_i2d_ASN1_TYPE: don't use str after freeing it.
2024-10-16 12:40:02 +10:00
gojimmypi
a13f48aea0
Update Espressif Examples
2024-10-15 18:36:28 -07:00
Sean Parkinson
db6a2ccdca
Merge pull request #8077 from douzzer/20241015-C89-pedantic-fixes
...
20241015-C89-pedantic-fixes
2024-10-16 10:47:54 +10:00
Sean Parkinson
fb8d2fc42f
ARM32 ASM: regeneration after scripts changes
...
Scripts changed to make generated code not go over 80 characters per
line but SP not updated.
Fix input register formatting in all ARM32 C assembly code.
2024-10-16 10:25:16 +10:00
Sean Parkinson
e4a661ff6e
SSL asynchronous read/write and encrypt
...
Add support for being able to read and write in different threads with
same SSL object.
Add support for encrypt in threads.
2024-10-16 10:14:21 +10:00
Sean Parkinson
a81aa287a5
SP C: cast after and with constant
...
Always cast to sp_digit after and with a constant that would convert
value to integer.
2024-10-16 09:48:10 +10:00
Daniel Pouzzner
ffc07215a4
clean up wolfcrypt code base for -std=c89 -pedantic: add WC_BITFIELD macro to avoid -Wpedantics for "type of bit-field ... is a GCC extension", with overrideable default definition "byte", and replace parent types of all bitfields with WC_BITFIELD;
...
fix numerous trailing commas in enums, mostly by removing them, but one (in asn.h, enum Extensions_Sum) using WOLF_ENUM_DUMMY_LAST_ELEMENT();
rearrange bitfields in struct ed25519_key for contiguity;
always define WOLFSSL_SP_NO_DYN_STACK when defined(WOLF_C89).
2024-10-15 18:24:03 -05:00
Daniel Pouzzner
4fd33b6b5d
Merge pull request #8014 from SparkiDev/lms_sha256_192
...
LMS: SHA-256/192 parameters
2024-10-15 17:24:46 -05:00
Sean Parkinson
ae46f52a66
LMS: SHA-256/192 parameters
...
Add support for parameter sets with SHA-256/192.
2024-10-16 07:15:18 +10:00
philljj
6cde74436e
Merge pull request #8065 from douzzer/20241010-WOLFSSL_NO_MALLOC
...
20241010-WOLFSSL_NO_MALLOC
2024-10-15 17:03:25 -04:00
Daniel Pouzzner
cd8d158964
Merge pull request #8073 from philljj/fix_infer_issues
...
infer: fix dead store, and uninitialized value errors.
2024-10-15 15:42:48 -05:00
Daniel Pouzzner
c7146640f9
Merge pull request #8055 from rizlik/ocsp-cb-ret-propagate
...
ocsp: propagate ocsp cb return error
2024-10-15 15:38:09 -05:00
night1rider
1449f4f4d7
Fixing CB needing HAVE_AES_ECB and SHA struct issue for MAX3266X Hardware
2024-10-15 14:18:07 -06:00
jordan
f5074772da
infer: fix more uninitialized value errors.
2024-10-15 12:41:09 -05:00
Daniel Pouzzner
3e1f365e75
Merge pull request #8064 from SparkiDev/regression_fixes_14
...
Regression test fixes
2024-10-15 11:47:37 -05:00
Andras Fekete
a5331d406c
Revert "Merge pull request #8072 from rizlik/github-fix"
...
This reverts commit 0f8b4dbc63 , reversing
changes made to 743a78dc85 .
2024-10-15 12:39:01 -04:00
Marco Oliverio
724fdae7d7
ocsp: propagate ocsp cb return error
2024-10-15 10:03:15 +00:00
jordan
e3c2c650aa
infer: fix dead store, and uninitialized value errors.
2024-10-14 22:45:17 -05:00
Daniele Lacamera
cc7ccf951a
Move heap variable to all sha implementations
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
260a0dee47
examples/client/client.c: fix numbering annotations, and fix string literal grouping for "-H".
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0d5d05d44d
more WOLFSSL_NO_MALLOC fixes:
...
wolfcrypt/src/dh.c: in wc_DhGenerateParams(), use named constant for buf size, and only XFREE it if !WOLFSSL_NO_MALLOC;
wolfcrypt/src/ecc.c and wolfssl/wolfcrypt/ecc.h: in wc_ecc_new_point_ex(), remove !WOLFSSL_NO_MALLOC gate around XMALLOC(), and if XMALLOC()ed, set ecc_point.isAllocated, then in wc_ecc_del_point_ex, XFREE() iff ecc_point.isAllocated;
wolfcrypt/src/pkcs7.c: in wc_PKCS7_RsaVerify(), when WOLFSSL_NO_MALLOC, jumbo-size the digest buffer to cope with in-place dynamics in RsaUnPad();
wolfcrypt/test/test.c: add !WOLFSSL_NO_MALLOC gates around various XFREE()s of objects that are on the stack in WOLFSSL_NO_MALLOC builds;
wolfssl/wolfcrypt/types.h: add an unconditional include of memory.h (itself guarded against multiple inclusion) to assure availability of WC_DEBUG_CIPHER_LIFECYCLE prototypes/macros.
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
9312f3cb86
wolfssl/wolfcrypt/types.h: define USE_WOLF_STRDUP for the fallback definition of XSTRDUP regardless of WOLFSSL_NO_MALLOC (wc_strdup_ex() uses XMALLOC(), which may be a user or static pool allocator).
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0665ff9de7
wolfcrypt/src/asn.c: revert earlier WOLFSSL_NO_MALLOC changes (not needed, after proper gating in test.c).
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
551eb3f44b
wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree().
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
dc2a8118de
Revert "Allow compiling aes.c with WOLFSSL_NO_MALLOC"
...
This reverts commit 56a96ba609 .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
ee92f38f88
Revert "fix unused variables"
...
This reverts commit 06195a2e2a .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
2ca3e1100e
Revert "Move heap variable to all sha implementations"
...
This reverts commit a3f6babfdc .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
886ebb6ec0
fixes for enable-all-crypto enable-cryptonly WOLFSSL_NO_MALLOC:
...
wolfcrypt/src//asn.c: add stack buffer codepaths in ParseKeyUsageStr(), SetKeyIdFromPublicKey(), and EncodePolicyOID;
wolfcrypt/src/dh.c: add stack buffer codepath in wc_DhGenerateParams();
wolfcrypt/src/ecc.c: add always-fail codepath to find_hole() to preempt heap allocation attempts;
wolfcrypt/test/test.c: gate out several heap-dependent subtests when defined(WOLFSSL_NO_MALLOC), and add a stack buffer codepath in ed448_test();
wolfssl/wolfcrypt/types.h: harmonize macro definitions of XFREE() to use do { ... } while (0) wrappers to assure syntactic indivisibility.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
0f8b4dbc63
Merge pull request #8072 from rizlik/github-fix
...
ci: github: fix ubuntu version to 22.04
2024-10-14 13:47:44 -05:00
Marco Oliverio
5d3f7c2528
ci: github: fix ubuntu version to 22.04
2024-10-14 16:46:45 +00:00
Juliusz Sosinowicz
743a78dc85
Merge pull request #8046 from embhorn/zd18758
...
Clear ctx in wolfSSL_EVP_DigestInit
2024-10-14 14:35:20 +02:00
Daniel Pouzzner
caf920100c
Merge pull request #8051 from cconlon/eccOidCacheLock
...
Add lock around static ECC ecc_oid_cache
2024-10-11 17:34:54 -05:00
Daniel Pouzzner
dfd8ead95e
Merge pull request #8050 from philljj/fix_acert_defines
...
Fix acert defines, add more tests, cleanup.
2024-10-11 16:22:34 -05:00
Daniel Pouzzner
f8da04d8b0
Merge pull request #7766 from miyazakh/zd18141_tls13_ocsp
...
Add OCSP response for intermediate cert into Certificate extension on TLS1.3
2024-10-11 15:49:19 -05:00
Sean Parkinson
65742c4a7a
ARM32 ASM: regenerated with fixes
...
Fix thumb interwork def check to be consistent and update #endif.
Remove duplicate check in generated C files.
2024-10-11 09:07:57 +02:00
Sean Parkinson
5f1ddadf71
Regression test fixes
...
Fix unit tests to not compile when NO_RSA is defined and RSA used.
test_wc_PKCS7_EncodeSignedData: only RSA supported with streaming.
test_wolfSSL_RSA when SP math and SP: CRT parameters required.
test_wolfSSL_OCSP_REQ_CTX to compile with NO_ASN_TIME.
test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS: make sure all objects freed even
on memory allocation failure.
test_wolfSSL_error_cb: don't use bio if is NULL.
test_wolfSSL_BN_enc_dec: don't free a twice on memory allocation error.
test_wc_dilithium_der: remove debug printing
test_othername_and_SID_ext: make sid_oid NULL after free to ensure no
double free on later memory allocation failure.
test_wolfSSL_RSA: don't leak when BN_dup fails.
test_wolfSSL_i2d_ASN1_TYPE: free ASN1 string whn no ASN1 type to put it
into.
test_tls13_rpk_handshake: don't leak on failure
test_dtls_client_hello_timeout_downgrade: only move memory when test is
wolfSSL_certs_clear, wolfSSL_set_SSL_CTX, SetSSL_CTX: Check return from
AllocCopyDer.
d2i_generic: make sure impBuf is only freed once.
wolfSSL_BIO_write: don't dereference front unless it is not NULL.
wolfssl_dns_entry_othername_to_gn: don't free obj twice
wolfSSL_X509_REQ_add1_attr_by_NID: don't access reqAttributes if NULL.
succeeding.
2024-10-11 11:49:01 +10:00
Sean Parkinson
9c4960f3fa
Merge pull request #8035 from danielinux/armv8-armasm-ARMv7-A
...
Allow armv8-asm on ARMv7-A with -mthumb-interwork
2024-10-11 09:49:31 +10:00
Daniel Pouzzner
daef866313
Merge pull request #8053 from danielinux/fix-no-malloc
...
Allow building with WOLFSSL_NO_MALLOC again
2024-10-10 16:27:28 -05:00
JacobBarthelmeh
c49f571a79
Merge pull request #8059 from douzzer/20241010-WOLFCRYPT_TEST_LINT
...
20241010-WOLFCRYPT_TEST_LINT
2024-10-10 14:16:51 -06:00
Jack Tjaden
864eaaeef9
Added more discriptive README for NDS and MelonDS C-flag
2024-10-10 12:50:09 -06:00
Daniel Pouzzner
bcc65a09ca
wolfcrypt/test/test.c: harmonize gating for hpke_test() and berder_test(), so that --enable-all-crypto passes -DWOLFCRYPT_TEST_LINT.
2024-10-10 01:06:05 -05:00
Daniel Pouzzner
b5475f3d81
wolfcrypt/test/test.c: add WOLFSSL_WOLFCRYPT_TEST_LINT, allowing testing for -Wunused-function in enable-all configurations. No functional changes, but several missing or inconsistent gates fixed.
2024-10-10 00:25:39 -05:00
Daniel Pouzzner
8b2a26a691
Merge pull request #8054 from bandi13/fixUncalledTest
...
Test was never called
2024-10-10 00:00:07 -05:00
John Safranek
8d3ed05272
Merge pull request #8058 from douzzer/20241009-wolfcrypt_test-FIPS-SMALL_STACK
...
20241009-wolfcrypt_test-FIPS-SMALL_STACK
2024-10-09 17:52:52 -07:00
Daniel Pouzzner
12ba4355d2
configure.ac and wolfssl/wolfcrypt/settings.h: define WOLFSSL_FIPS_READY for fips=ready, WOLFSSL_FIPS_DEV for fips=dev, and add predefined override FIPS version values when defined(WOLFSSL_FIPS_READY) || defined(WOLFSSL_FIPS_DEV).
2024-10-09 17:58:31 -05:00
Daniel Pouzzner
74d14d9687
wolfcrypt/test/test.c: fix for FIPS <6.0.0 with WOLFSSL_SMALL_STACK.
2024-10-09 16:40:48 -05:00
Aidan Garske
64a359c501
Merge pull request #8057 from gojimmypi/workflow-update
2024-10-09 13:41:28 -07:00
Chris Conlon
7b805d7a7d
Add lock around static ECC ecc_oid_cache
2024-10-09 14:35:14 -06:00
gojimmypi
e81ae7bcb6
Run win-csharp-test only for wolfssl owner
2024-10-09 11:14:28 -07:00
Daniel Pouzzner
10e449dc00
Merge pull request #8056 from bandi13/fixCoverity
...
Add several fixes to coverity scan
2024-10-09 10:59:41 -05:00
Andras Fekete
c8840a53ad
Add several fixes to coverity scan
2024-10-09 11:51:56 -04:00
Andras Fekete
d3f143aa2a
Test was never called
2024-10-09 09:20:17 -04:00
Daniele Lacamera
a3f6babfdc
Move heap variable to all sha implementations
2024-10-09 15:11:42 +02:00
Daniele Lacamera
06195a2e2a
fix unused variables
2024-10-09 14:06:38 +02:00
Daniele Lacamera
56a96ba609
Allow compiling aes.c with WOLFSSL_NO_MALLOC
2024-10-09 13:55:42 +02:00
Daniele Lacamera
43574e2255
Allow building with WOLFSSL_NO_MALLOC again
2024-10-09 13:44:03 +02:00
Daniele Lacamera
a23d384e06
Improve guards to build with -mthumb-interwork
2024-10-09 12:41:55 +02:00
jordan
244fff844f
acert: pacify c++ style comment warning.
2024-10-08 21:21:25 -05:00
jordan
bed680a96c
acert: line length.
2024-10-08 20:47:49 -05:00
jordan
deda512598
acert: fix unused store error.
2024-10-08 17:05:53 -05:00
jordan
410e2f148c
Missing free call.
2024-10-08 16:17:16 -05:00
jordan
052cf77233
acert: fix defines, cleanup, more testing.
2024-10-08 16:11:46 -05:00
Daniel Pouzzner
ce9d0e236c
Merge pull request #8047 from ColtonWilley/x509_store_free_ref
...
Free X509 store ref on store free
2024-10-08 15:25:16 -05:00
Daniel Pouzzner
e6dac68ce3
Merge pull request #7966 from cconlon/x509CheckHostLeftWildcardOnly
...
Add left-most wildcard matching support to X509_check_host()
2024-10-08 15:17:27 -05:00
Daniel Pouzzner
4a37947d8f
Merge pull request #3166 from dgarske/csharp_wolfcrypt
...
wolfCrypt CSharp Wrapper
2024-10-08 14:52:40 -05:00
David Garske
e4f4274b4a
Fix AesSivCipher heap hint on cleanup.
2024-10-08 12:11:15 -07:00
David Garske
4753e1c32e
Use byte for isAllocated bit-field. Cleanup some of the "heap" hint logic.
2024-10-08 10:37:45 -07:00
Chris Conlon
f878220b81
add WOLFSSL_LEFT_MOST_WILDCARD_ONLY support to X509_check_host()
2024-10-08 10:38:14 -06:00
Colton Willey
b4146bad18
Free X509 store ref on store free
2024-10-07 13:09:47 -07:00
Eric Blankenhorn
cd5ddeb1c5
Clear ctx in wolfSSL_EVP_DigestInit
2024-10-07 14:20:50 -05:00
David Garske
bf29b68600
Merge pull request #8045 from rizlik/sniffer-fix
...
sniffer: set ssl->curSize before invoking Do* routines
2024-10-07 07:38:27 -07:00
Marco Oliverio
92faa915e4
sniffer: set ssl->curSize before invoking Do* routines
...
commit 99a99e3d6e changes DoApplication to
use ssl->curSize as the size of the current decrypted record. Fix
sniffer code to set this value.
2024-10-07 08:56:35 +00:00
David Garske
59389a0ef5
Fix possible AES leaks detected with sanitizer and clang-tidy.
2024-10-05 11:52:22 -07:00
David Garske
b9de3bbf1a
Fixes for memory leaks in test.c with wc_AesNew and wc_HashNew.
2024-10-05 11:44:59 -07:00
David Garske
dbd3484fdc
Fix for issue with wc_HashAlg being a union.
2024-10-05 11:44:59 -07:00
David Garske
0bb41e1eb4
Resolve hash new leak due to improper heap hint check. Make sure isAllocated is initialized to 0.
2024-10-05 11:44:58 -07:00
David Garske
7989dd8713
Refactor the AES ECB/Direct, CBC and CTR tests.
2024-10-05 11:44:58 -07:00
Aidan Garske
e10c943bf3
wolfCrypt CSharp Wrapper:
...
* Adds RNG, ECC(ECIES and ECDHE), RSA, ED25519/Curve25519, AES-GCM, and Hashing to the CSharp wrapper.
* Adds GitHub action for building the CSharp wrapper solution and running wolfCrypt test and a TLS server/client example.
* Adds "new" API's for wolfCrypt for platforms that cannot tolerate the structs directly.
* Fixes for several scan-build warnings.
2024-10-05 11:44:58 -07:00
David Garske
c230e10f4a
Merge pull request #8044 from douzzer/20241004-wc_static_assert
...
20241004-wc_static_assert
2024-10-05 09:11:11 -07:00
Hideki Miyazaki
5105082a1f
addressed review comments
2024-10-05 15:25:34 +09:00
Hideki Miyazaki
b84a4e1c8d
fix pr unit test
2024-10-05 15:25:34 +09:00
Hideki Miyazaki
7a1d0e0dc8
addressed review comment
2024-10-05 15:25:34 +09:00
Juliusz Sosinowicz
16dc67f421
SendTls13Certificate: set variables directly instead of incrementing
2024-10-05 15:25:32 +09:00
Juliusz Sosinowicz
29e27889ee
TLSX_CSR_InitRequest_ex: decrement csr->requests when reusing
2024-10-05 15:25:08 +09:00
Hideki Miyazaki
dab764a08e
fix pr test
2024-10-05 15:25:08 +09:00
Hideki Miyazaki
69e390f8b9
works OCSP Stapling with TLS1.3 like OCSPv2Multi
2024-10-05 15:25:03 +09:00
Daniel Pouzzner
e944967731
wolfssl/wolfcrypt/types.h: add WC_NO_STATIC_ASSERT path, and add C89-compatible live fallback definition for wc_static_assert().
...
wolfssl/internal.h: refactor WOLFSSL_ASSERT_EQ() and WOLFSSL_ASSERT_SIZEOF_GE() to use wc_static_assert(), and drop unused WOLFSSL_ASSERT_TEST() and WOLFSSL_ASSERT_SIZEOF_TEST().
src/ssl_crypto.c and wolfcrypt/src/evp.c: refactor ad hoc asserts in wolfSSL_DES_ecb_encrypt(), wolfSSL_CRYPTO_cts128_decrypt(), and wolfSSL_EVP_DigestInit(), to use wc_static_assert().
2024-10-04 21:11:25 -05:00
Daniel Pouzzner
a25c0244a7
wolfssl/wolfcrypt/types.h: refactor static_assert*() as wc_static_assert*() to avoid conflicts with target-native static_assert(), and add additional coverage for C23 and MSVC C11.
...
wolfcrypt/test/test.c: in render_error_message(), in tests for strerror_r(), test for __USE_GNU.
2024-10-04 16:41:33 -05:00
András Fekete
4962180a93
Merge pull request #7726 from embhorn/coverity-workflow
...
Add Coverity scan workflow
2024-10-04 14:06:01 -04:00
Eric Blankenhorn
f4b603fa4e
test cron 2xd
2024-10-04 12:37:27 -05:00
Eric Blankenhorn
032ab3b57e
Add Coverity scan workflow
2024-10-04 12:37:26 -05:00
JacobBarthelmeh
898815f11b
Merge pull request #8042 from douzzer/20241004-WOLFSSL_ARM_ARCH_7M
...
20241004-WOLFSSL_ARM_ARCH_7M
2024-10-04 10:15:41 -06:00
Daniel Pouzzner
7ff3b9b79d
wolfssl/wolfcrypt/settings.h: add setup for WOLFSSL_ARM_ARCH_7M.
2024-10-04 10:04:30 -05:00
Daniel Pouzzner
2e539ef70c
Merge pull request #7983 from philljj/tiny_dilithium_cleanup
...
dilithium: small cleanup to support wolfboot.
2024-10-03 23:37:11 -05:00
Daniel Pouzzner
f1e6dd2bac
Merge pull request #8037 from gojimmypi/pr-espressif-benchmark
...
Improve benchmark for Espressif devices
2024-10-03 23:36:27 -05:00
Daniel Pouzzner
ea4d6c00f6
Merge pull request #8040 from SparkiDev/kyber_arm32_asm_base
...
Kyber ARM32 ASM: add assembly using base instructions
2024-10-03 23:24:45 -05:00
Sean Parkinson
f7afc47d98
Kyber ARM32 ASM: add assembly using base instructions
...
Support ARMv4 up to ARMv8.
Base instructions only - faster implemenation will use NEON.
2024-10-04 11:06:18 +10:00
jordan
c3410f2cb8
dilithium: support building dilithium with wolfboot.
2024-10-03 16:38:12 -05:00
David Garske
d0d802a2df
Merge pull request #8038 from SparkiDev/sp_math_ppc_li_fix
...
SP Maths: PowerPC ASM fix
2024-10-03 11:03:31 -07:00
David Garske
afe5209427
Merge pull request #7706 from SparkiDev/kyber_thumb2_asm
...
Kyber ASM ARMv7E-M/ARMv7-M: added assembly code
2024-10-03 10:56:42 -07:00
Sean Parkinson
0668c6ea5d
Merge pull request #8039 from douzzer/20241002-fix-for-cppcheck-force-source
...
20241002-fix-for-cppcheck-force-source
2024-10-03 20:57:09 +10:00
Sean Parkinson
d2047986d9
Kyber ASM ARMv7E-M/ARMv7-M: added assembly code
...
Improved performance by reworking kyber_ntt, kyber_invtt,
kyber_basemul_mont, kyber_basemul_mont_add, kyber_rej_uniform_c to be
in assembly.
Replace WOLFSSL_SP_NO_UMAAL with WOLFSSL_ARM_ARCH_7M
2024-10-03 18:11:31 +10:00
Daniel Pouzzner
b81cc50a70
src/internal.c: in ProcessReplyEx() in the verifyMessage case, refactor some gating/conditionalization around ATOMIC_USER, HAVE_ENCRYPT_THEN_MAC, atomicUser, and ssl->options.startedETMRead, to avoid "Logical disjunction always evaluates to true" from cppcheck incorrectLogicOperator (via multi-test cppcheck-force-source) (warned code introduced by 99a99e3d6e).
2024-10-02 19:19:39 -05:00
Sean Parkinson
695914ed33
SP Maths: PowerPC ASM fix
...
The instruction 'li' is a pseduo instruction for 'load immediate'.
With some compilers, the immediate was interpretted R0[0].
Change to use XOR instead.
2024-10-03 09:00:06 +10:00
Daniel Pouzzner
e814d1baea
Merge pull request #8016 from SparkiDev/dilithium_draft_final_fix
...
Dilithium: Final and draft available in one build
2024-10-02 14:02:00 -05:00
Daniel Pouzzner
24d1b11993
Merge pull request #7988 from gasbytes/fix-conversion
...
Fix Wconversion in the tls* and api/test* files
2024-10-02 12:26:38 -05:00
gojimmypi
cd6bea852b
Improve benchmark for Espressif devices
2024-10-02 09:54:48 -07:00
Reda Chouk
ea852c1c67
missing argument
2024-10-02 17:21:50 +02:00
Reda Chouk
10f0885d88
Merge branch 'master' into fix-conversion
2024-10-02 17:14:06 +02:00
Sean Parkinson
50bbdbbe42
Dilithium: Final and draft available in one build
...
Make draft version of ML-DSA compiled in with final.
Use WC_ML_DSA_44_DRAFT, WC_ML_DSA_65_DRAFT and WC_ML_DSA_87_DRAFT for
the level to get the draft implementation.
2024-10-02 22:23:25 +10:00
Daniel Pouzzner
925fbf3bf7
Merge pull request #8034 from philljj/acert_fix_staticmem_build
...
acert: correct XFREE call.
2024-10-01 23:09:21 -05:00
jordan
1690ad7366
acert: correct XFREE call.
2024-10-01 21:57:53 -04:00
Sean Parkinson
ac788ec40d
Merge pull request #7995 from julek-wolfssl/dtls12-cid
...
Implement DTLS 1.2 Connection ID (CID)
2024-10-02 09:00:59 +10:00
Sean Parkinson
b8dff12e06
Merge pull request #8033 from douzzer/20241001-fixes
...
20241001-fixes
2024-10-02 07:50:40 +10:00
Daniel Pouzzner
a04871f153
examples/pem/pem.c: fix double-free introduced in 65853a41b9;
...
configure.ac and src/include.am: add ENABLED_ARM_THUMB, BUILD_ARM_THUMB, BUILD_ARM_NONTHUMB, ENABLED_ARM_64, BUILD_ARM_64, ENABLED_ARM_32. and BUILD_ARM_32, and use them to gate building of ARM asm files, to fix "ISO C forbids an empty translation unit" warnings (the warning only affects inline asm files, but the gating is deployed more widely).
2024-10-01 16:03:37 -05:00
Reda Chouk
666e658398
trailing spaces and overlong lines fixes
2024-10-01 16:28:31 +02:00
David Garske
59279515f4
Merge pull request #8030 from gojimmypi/pr-fix-thread_local_start
...
Espressif _thread_local_start and _thread_local_end fix
2024-10-01 06:49:06 -07:00
Reda Chouk
3193ecb2c3
fixed Wconversion in the api.c file
2024-10-01 15:07:59 +02:00
Sean Parkinson
f15700f1f6
Merge pull request #8031 from douzzer/20240930-clang-tidy
...
20240930-clang-tidy
2024-10-01 22:38:18 +10:00
gojimmypi
75a676bc7e
Espressif _thread_local_start and _thread_local_end fix
2024-10-01 03:19:31 -07:00
Marco Oliverio
7e69c2049b
dtls cid: address reviewer's comments
2024-10-01 06:45:37 +00:00
Daniel Pouzzner
65853a41b9
fixes, coddling, and suppressions for clang-tidy complaints:
...
examples/pem/pem.c: fix stdio stream leaks.
src/ssl.c and src/ssl_load.c: suppress concurrency-mt-unsafe around getenv(). getenv() is threadsafe as long as no threads putenv() or setenv().
wolfssl/openssl/asn1.h: add parentheses to fix bugprone-macro-parentheses in ASN1_EX_TEMPLATE_TYPE(), and suppress misfiring bugprone-macro-parentheses around IMPLEMENT_ASN1_FUNCTIONS().
2024-09-30 23:19:49 -05:00
JacobBarthelmeh
984dd9146f
Merge pull request #8005 from ColtonWilley/copy_key_option
...
New option to always copy over key to SSL object
2024-09-30 14:20:07 -06:00
JacobBarthelmeh
ee7f02bbd6
Merge pull request #8004 from SparkiDev/dilithium_fixes_1
...
Dilithium: fixes
2024-09-30 10:01:16 -06:00
JacobBarthelmeh
113a61c11e
Merge pull request #8025 from douzzer/20240927-fixes2
...
20240927-fixes2
2024-09-30 09:43:12 -06:00
David Garske
2db2bedd5f
Merge pull request #8027 from SparkiDev/kyber_original_fix
...
Kyber original: fix to work
2024-09-30 07:58:30 -07:00
David Garske
47add7e9e2
Merge pull request #8020 from SparkiDev/arm32_base_chacha20_poly1305
...
ARM32 ChaCha20, Poly1305: assembly code
2024-09-30 06:53:37 -07:00
Sean Parkinson
bb67069e4a
Kyber original: fix to work
...
Encapsulate the message (hash of rand) for original.
Final of FIPS 203 uses rand.
2024-09-30 22:05:26 +10:00
Sean Parkinson
e4301bc554
ARM32 generated files: fix line lengths
...
Generated ARM32 assembly files no longer have lines with more than 80
characters.
2024-09-30 08:50:31 +10:00
Daniel Pouzzner
60c2499602
wolfssl/wolfcrypt/types.h: when defining fallback do-nothing SAVE_VECTOR_REGISTERS2(), also define SAVE_VECTOR_REGISTERS2_DOES_NOTHING, and likewise for fallback CAN_SAVE_VECTOR_REGISTERS, define CAN_SAVE_VECTOR_REGISTERS_ALWAYS_TRUE;
...
wolfcrypt/src/aes.c:
* when SAVE_VECTOR_REGISTERS2_DOES_NOTHING, define do-nothing VECTOR_REGISTERS_PUSH and VECTOR_REGISTERS_POP, to mollify Coverity CONSTANT_EXPRESSION_RESULT;
* in AesGcmDecryptUpdate_aesni(), omit " && (c != NULL)" clause from computation of endA argument to AesGcmAadUpdate_aesni(), to mollify Coverity FORWARD_NULL (impermissible nullness is already checked and BAD_FUNC_ARGed by the sole caller, wc_AesGcmDecryptUpdate());
wolfcrypt/src/misc.c: add readUnalignedWord64(), writeUnalignedWord64(), readUnalignedWords64(), and writeUnalignedWords64(), for safe word64 access to possibly-unaligned data;
wolfcrypt/src/wc_kyber_poly.c: use readUnalignedWords64() and readUnalignedWord64() to mitigate sanitizer-reported "load of misaligned address".
2024-09-27 17:15:53 -05:00
JacobBarthelmeh
b96e73f9ed
Merge pull request #7936 from gojimmypi/pr-add-espressif-esp-tls-cert-bundle
...
Add wolfSSL esp-tls and Certificate Bundle Support
2024-09-27 15:22:49 -06:00
JacobBarthelmeh
3178ce60c6
Merge pull request #8022 from douzzer/20240927-fixes
...
20240927-fixes
2024-09-27 10:48:27 -06:00
Daniel Pouzzner
794f0d8d19
src/pk.c: add missing "keySz = padded_keySz" in _DH_compute_key() ct cleanup path.
...
wolfcrypt/src/wc_kyber_poly.c: add SAVE_VECTOR_REGISTERS2()...RESTORE_VECTOR_REGISTERS() wrappers for AVX2 implementations.
src/bio.c and src/ssl.c: add several missing WC_NO_ERR_TRACE()s, and tweak several returns to generate error traces.
2024-09-27 00:28:45 -05:00
Colton Willey
3d9a4ccddc
Use GetShortInt instead for CRL number extension parsing
2024-09-26 15:43:30 -07:00
JacobBarthelmeh
dd2186f68a
Merge pull request #8021 from bigbrett/cmake-curl-uintptr_t-fix
...
fix cmake build error for curl builds
2024-09-26 15:31:07 -06:00
Colton Willey
6414cf61a7
Update comments for new flags in settings.h
2024-09-26 13:18:06 -07:00
David Garske
2285c02f1c
Merge pull request #7998 from SparkiDev/kyber_aarch64_asm
...
Kyber Aarch64: assembly implementations of functions
2024-09-26 11:59:06 -07:00
Brett Nicholas
32ebaea158
add uintptr_t to config.h fixing curl cmake build error
2024-09-26 10:31:31 -06:00
András Fekete
a1a3a0b04f
Merge pull request #7871 from gojimmypi/pr-repo-owner-check
...
Add conditional repository_owner to workflow
2024-09-26 12:18:58 -04:00
David Garske
46f6a60c9e
Merge pull request #8019 from JacobBarthelmeh/nds
...
minor adjustments for NDS port
2024-09-26 08:58:43 -07:00
Sean Parkinson
2323a5cf59
ARM32 ChaCha20, Poly1305: assembly code
...
Add assembly code for ChaCha20 and Poly1305 on ARM32 when no NEON
available.
2024-09-26 20:24:58 +10:00
gojimmypi
2a354905cb
Add wolfSSL esp-tls and Certificate Bundle Support, improve esp32_mp RSA
2024-09-25 19:42:21 -07:00
Sean Parkinson
de657787cf
Kyber Aarch64: assembly implementations of functions
...
Aarch64 assembly implementation of Kyber functions.
SHA-3 assembly implementations when not hardware crypto.
2024-09-26 09:10:05 +10:00
David Garske
e26ac5e122
Merge pull request #8018 from JacobBarthelmeh/ci
...
initialize values for -Og test
2024-09-25 15:25:03 -07:00
JacobBarthelmeh
45b88048c2
make macro unique to wolfSSL
2024-09-25 15:59:57 -06:00
JacobBarthelmeh
4893017005
feature support will be listed in the next release notes
2024-09-25 15:54:59 -06:00
JacobBarthelmeh
d72c0b372c
Merge pull request #7990 from buchstabenwurst/master
...
Add support for (DevkitPro)libnds
2024-09-25 15:52:34 -06:00
JacobBarthelmeh
bea285c8ef
initialize values for -Og test
2024-09-25 14:57:09 -06:00
JacobBarthelmeh
efd4127b84
Merge pull request #8013 from douzzer/20240924-static_assert-MSVC
...
20240924-static_assert-MSVC
2024-09-25 11:55:05 -06:00
JacobBarthelmeh
79b5ec86f6
Merge pull request #8015 from gojimmypi/pr-mp_read_radix
...
gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC
2024-09-25 11:35:57 -06:00
JacobBarthelmeh
2328a7e407
Merge pull request #8017 from philljj/misc_cleanup
...
misc cleanup: extra spaces, typos.
2024-09-25 11:26:31 -06:00
JacobBarthelmeh
4db1605914
Merge pull request #8012 from rizlik/dtls13-either-side
...
dtls13: support either side DTLSv1_3 method
2024-09-25 11:25:19 -06:00
JacobBarthelmeh
67b0c4d03f
Merge pull request #8009 from philljj/asn_cleanup
...
asn: cleanup around edPubKeyASN.
2024-09-25 10:09:40 -06:00
jordan
e5109b3f41
misc cleanup: extra spaces, typos.
2024-09-25 09:51:48 -05:00
Brett Nicholas
7592241a46
Merge pull request #8007 from billphipps/fix_cmac_cryptocb
...
Update to separate CMAC and AES conditional compiles. Correct update.
2024-09-25 08:43:27 -06:00
gojimmypi
393072037a
gate test mp_read_radix on OPENSSL_EXTRA || !NO_DSA || HAVE_ECC
2024-09-24 17:23:04 -07:00
Bill Phipps
60dbe38226
Update cmac.c to eliminate extra spaces
2024-09-24 18:34:19 -04:00
Bill Phipps
13b26bc46b
Update cryptocb.c to fix comment
2024-09-24 18:27:58 -04:00
Bill Phipps
60e1c03e46
Update cmac.h to move CmacType down for build compatibility
2024-09-24 18:23:26 -04:00
Daniel Pouzzner
267add1fb3
wolfssl/wolfcrypt/types.h: in static_assert setup section, test for _MSVC_LANG >= 201103L alongside __cplusplus >= 201103L.
2024-09-24 17:14:33 -05:00
JacobBarthelmeh
72711b4e15
Merge pull request #8010 from res0nance/win-arm64-support
...
Add ARM64 to Visual Studio Project
2024-09-24 14:34:42 -06:00
Daniel Pouzzner
f3e41aaf3a
Merge pull request #8011 from ejohnstown/revert-small-stack-fp
...
Revert "FP SmallStack Fix"
2024-09-24 15:24:22 -05:00
JacobBarthelmeh
6b806f8bda
Merge pull request #8008 from bandi13/fixFipsCheck
...
Fix '--depth=1' repos
2024-09-24 13:30:12 -06:00
Brett Nicholas
967dc443fa
remove trailing whitespace
2024-09-24 12:58:01 -06:00
jordan
c6124d573a
asn: tiny peer review cleanup.
2024-09-24 13:01:13 -05:00
Bill Phipps
8aa63e3aad
One more time to quiet clang tidy
2024-09-24 13:43:56 -04:00
Bill Phipps
5e1db686e1
Update logic to avoid clang-tidy warning.
2024-09-24 13:14:00 -04:00
Marco Oliverio
76f71a31f1
dtls13: support either side DTLSv1_3 method
2024-09-24 16:56:02 +00:00
Bill Phipps
35442d27b5
Fixed overlong lines. Thanks clang-tidy
2024-09-24 12:48:54 -04:00
Joshua Okeleke
6c5b174e51
Replace dummy iovec with #define NO_WRITEV
2024-09-24 18:37:10 +02:00
John Safranek
17261467a6
Revert "FP SmallStack Fix"
...
This reverts commit 47e51400bb .
Turns out we don't want to put those fp_ints on the stack unless
absolutely necessary.
2024-09-24 09:19:43 -07:00
Bill Phipps
0d158fc663
Updates due to peer review
2024-09-24 12:06:19 -04:00
Joshua Okeleke
1896b47399
Change comment style
2024-09-24 16:35:29 +02:00
Marco Oliverio
9dccd66a3a
address review: better guarding in test
2024-09-24 12:54:15 +00:00
res0nance
62c6a3d892
ci: add Win32 and ARM64 windows CI
2024-09-24 19:35:39 +08:00
res0nance
34224d84d3
win: add arm64 to wolfssl64.sln
2024-09-24 19:26:05 +08:00
res0nance
665fd89c55
win: add arm64 to sslsnifftest.vcxproj
2024-09-24 18:18:10 +08:00
res0nance
4f856773cf
win: add arm64 to server.vcxproj
2024-09-24 18:15:40 +08:00
res0nance
8bf196f32c
win: add arm64 to client.vcxproj
2024-09-24 18:11:42 +08:00
res0nance
45d51bfe49
win: add arm64 to echoserver.vcxproj
2024-09-24 18:07:41 +08:00
res0nance
28cebe8c7e
win: add arm64 to echoclient.vcxproj
2024-09-24 18:04:07 +08:00
res0nance
f599a0a7c3
win: add arm64 to sslsniffer.vcxproj
2024-09-24 17:59:00 +08:00
res0nance
6735fcf695
win: add arm64 to testsuite.vcxproj
2024-09-24 17:55:44 +08:00
res0nance
112a4ddbad
win: add arm64 to wolfssl.vcxproj
2024-09-24 17:25:26 +08:00
jordan
0f646b6e4b
asn: cleanup around edPubKeyASN.
2024-09-23 23:24:36 -05:00
Colton Willey
720e24209a
Updates for doxygen and review comments
2024-09-23 13:29:41 -07:00
Andras Fekete
09b5362ed8
Fix '--depth=1' repos
...
When the repo was checked out as a shallow copy, we need to unshallow so FIPS builds can successfully find all the required tags and branches.
2024-09-23 16:21:50 -04:00
Bill Phipps
c16ebaeb47
Update to seperate CMAC and AES conditional compiles. Correct update.
2024-09-23 15:33:52 -04:00
Colton Willey
e5022e3ef0
Fix broken endif
2024-09-23 12:11:04 -07:00
Colton Willey
183aef241c
CRL improvements, add parsing for CRL number, do not allow CRL duplicates, add callback for when CRL entry is updated.
2024-09-23 11:52:39 -07:00
Colton Willey
1a4b821c64
Add pthread link for liboqs testing
2024-09-23 11:46:19 -07:00
gojimmypi
27adc66cca
Add conditional repository_owner to workflow, remove socat strategy
2024-09-23 11:30:58 -07:00
Colton Willey
cad2bbd7a7
Add NULL checks on key copy
2024-09-23 10:18:23 -07:00
Colton Willey
634e547fba
Initial implementation of new option to always copy over key to SSL ctx
2024-09-23 10:04:33 -07:00
Sean Parkinson
67528f91b3
Dilithium: fixes
...
Fixes to hint error dectection.
Fix public key decode to fail when DER length is zero for the public key
data.
2024-09-23 09:05:17 +10:00
Daniel Pouzzner
bc6881974d
Merge pull request #8001 from ejohnstown/ecc-test-fix
...
ECC Test Fix
2024-09-20 20:53:28 -05:00
John Safranek
735c0f6b3a
ECC Test Fix
...
The ECC key generation test was failing due not using large enough of a
buffer. Fixed to use a better size.
1. Set the shared digest/sig buffer size in
_ecc_pairwise_consistency_test() to the maximum possible based on the
math in wc_ecc_sig_sz().
2024-09-20 17:25:21 -07:00
David Garske
a9cc880f65
Merge pull request #7993 from miyazakh/renesas_rx65n_rsk_update
...
Update TSIP driver version to v1.21 for RX65N RSK
2024-09-20 17:07:21 -07:00
David Garske
3c67abc664
Merge pull request #7954 from JacobBarthelmeh/pkcs7
...
add option to set custom SKID with PKCS7 bundle creation
2024-09-20 17:05:44 -07:00
JacobBarthelmeh
554d52b069
Merge pull request #7777 from night1rider/MAX32666-port
...
MAX32665 and MAX32666 TPU HW and ARM ASM Crypto Callback Support
2024-09-20 17:14:34 -06:00
JacobBarthelmeh
9781c1fea4
Merge pull request #7999 from douzzer/20240920-fixes
...
20240920-fixes
2024-09-20 17:01:11 -06:00
Hideki Miyazaki
3f0a17b331
Update TSIP driver version to v1.21
...
Use ASN_TEMPLATE
Extracting YEAR and MONTH from __DATE__
2024-09-21 06:23:59 +09:00
ZackLabPC
1ffcf4000b
Making HW Mutex Functions Private Api
2024-09-20 15:21:27 -06:00
JacobBarthelmeh
baab3348f4
Merge pull request #7997 from dgarske/stm32g4
...
Support for STM32G4
2024-09-20 14:05:43 -06:00
Daniel Pouzzner
55cd8a800f
FIPS v5 gating fixes:
...
configure.ac:
* fix logic in "Forcing off" test expressions, first flubbed in 19106a9510;
* fix auto-enable of compkey to exclude v5 even if v5-dev.
src/tls13.c: fix gating for HKDF _ex() variants (>=6.0, not >=5.3).
wolfcrypt/src/error.c: snip out stray spaces at start of several ECC error message strings.
wolfcrypt/test/test.c:
* in render_error_message(), use wolfSSL_ERR_reason_error_string() if available rather than wc_GetErrorString(), to render non-wolfcrypt error strings;
* in ecc_test_deterministic_k(), ecc384_test_deterministic_k(), ecc521_test_deterministic_k(), on FIPS <6.0, gate out SHA384 and SHA512 tests (FIPS v5 only supports SHA256 in wc_ecc_gen_deterministic_k());
* in cmac_test(), gate use of wc_AesCmacGenerate_ex() and wc_AesCmacVerify_ex() on >=6.0, not >=5.3.
2024-09-20 13:53:36 -05:00
ZackLabPC
9881edfabe
Crypto Callback Support for ARM ASM: AES-ECB/CBC, SHA-1/256/384/512 + Fix SP SHA CB Bug
2024-09-20 09:42:53 -06:00
night1rider
1cb324affa
Expanding mutexing and Adding in AES Callbacks for HW
2024-09-20 09:42:53 -06:00
night1rider
a7ef540344
Making so hw mutex define is not needed
2024-09-20 09:42:53 -06:00
night1rider
8f8b4e6665
Addressing Feedback, Adding Null Checks and Mutex Around TRNG
2024-09-20 09:42:53 -06:00
night1rider
fe7987f241
Adding SHA-384/512 support, Null Checks, RNG Health Test for HW, and MAA call update for MAX3266X Port.
2024-09-20 09:42:52 -06:00
night1rider
d714e55a2b
Addressing PR comments typos and cleanup and support HAVE_AES_ECB, Sha1, and Sha224
2024-09-20 09:42:52 -06:00
msi-debian
2e8cf39feb
Initial PR for MAX32665 and MAX32666 TPU HW Support
2024-09-20 09:42:52 -06:00
JacobBarthelmeh
8017c816bb
check on RNG init return with test, and make input const
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
5adad7d869
fix for sanity check of null input
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
ca3b1a1412
add test case
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
7a23cff27f
add PKCS7 set custom SKID
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
d796d8c107
Merge pull request #7994 from miyazakh/renesas_ra6m4_update
...
Update FSP version to v5.4.0 for RA6M4
2024-09-20 09:27:56 -06:00
JacobBarthelmeh
bddb83b62a
Merge pull request #7992 from ejohnstown/ecc-pct-ss
...
Small Stack ECC Pairwise Consistency Test
2024-09-20 09:13:21 -06:00
András Fekete
005a57f745
Merge pull request #7989 from billphipps/atomic_fence
...
Update to use memory_order_seq_cst instead of GCC internal for C11
2024-09-20 09:46:27 -04:00
Juliusz Sosinowicz
cf96ab22ba
Address code review
2024-09-20 15:31:01 +02:00
Juliusz Sosinowicz
99a99e3d6e
Implement DTLS 1.2 Connection ID (CID)
2024-09-20 15:31:01 +02:00
András Fekete
bbbc40dacc
Merge pull request #7996 from julek-wolfssl/move-mymemmem
...
memmem is only being used in testing so move it there
Failing test is disabled in: 5be198fa0e
2024-09-20 09:08:44 -04:00
Sean Parkinson
8768c55579
Merge pull request #7991 from douzzer/20240917-fixes
...
20240917-fixes
2024-09-20 15:20:51 +10:00
Daniel Pouzzner
5be198fa0e
.github/workflows/packaging.yml: disable broken RedHat/Fedora rpm packaging tests.
2024-09-19 17:44:27 -05:00
Daniel Pouzzner
af8feed531
Revert "wolfssl/wolfcrypt/ecc.h: fixes for more linker relocation errors in Fedora packaging test: always export ECC_API functions, but when !WOLFSSL_PUBLIC_ECC_ADD_DBL, remap them with wc_ prefixes."
...
This reverts commit a31e914b98 .
2024-09-19 17:44:08 -05:00
Daniel Pouzzner
a31e914b98
wolfssl/wolfcrypt/ecc.h: fixes for more linker relocation errors in Fedora packaging test: always export ECC_API functions, but when !WOLFSSL_PUBLIC_ECC_ADD_DBL, remap them with wc_ prefixes.
2024-09-19 17:30:44 -05:00
Daniel Pouzzner
da1b8358dc
wolfcrypt/benchmark/benchmark.c: add RSA3072 to keygen bench.
2024-09-19 17:07:19 -05:00
Daniel Pouzzner
212708e3b4
wolfssl/wolfcrypt/ecc.h and wolfcrypt/src/ecc.c: refactor ecc_sets and ecc_sets_count using accessor functions, to fix linker relocation errors in Fedora packaging test.
2024-09-19 17:03:07 -05:00
David Garske
9d24480379
Fix WOLF_CONF_AESGCM=2.
2024-09-19 14:19:39 -07:00
Daniel Pouzzner
510d6a07bf
wolfssl/wolfcrypt/types.h: dial in the __static_assert() gating+definitions, and add static_assert2().
2024-09-19 13:10:47 -05:00
David Garske
9815d9bd03
Support for STM32G4. ZD 18675
2024-09-19 10:54:29 -07:00
Juliusz Sosinowicz
d7303664b5
memmem is only being used in testing so move it there
2024-09-19 15:54:20 +02:00
Daniel Pouzzner
fbbb2b876b
wolfssl/wolfcrypt/types.h: add static_assert() definitions;
...
wolfssl/internal.h: add DTLS13_HANDSHAKE_HEADER_SZ;
src/tls13.c: in EchHashHelloInner(), use falseHeader[DTLS13_HANDSHAKE_HEADER_SZ] to fix buffer overrun;
src/dtls13.c: add static assert for DTLS13_HANDSHAKE_HEADER_SZ.
2024-09-19 01:15:42 -05:00
Hideki Miyazaki
1e0c2604dd
Update FSP version to v5.4.0 for RA6M4
...
add example keys for signing CA
Update READNE
2024-09-19 14:19:05 +09:00
Daniel Pouzzner
263cb5bf78
tests/api.c:test_Sha512_Family_Final(): fix unreachable null pointer deref reported by clang-tidy in FIPS/Async configs.
2024-09-18 17:42:05 -05:00
John Safranek
a81efc0f6f
Small Stack ECC Pairwise Consistency Test
...
1. Update the ECC PCT to use the key's heap to allocate any buffers for
the test. This is similar to how RSA does it.
2. Put the buffers on the stack if not using small stack option.
2024-09-18 15:14:52 -07:00
Daniel Pouzzner
072c5311a5
m4/ax_atomic.m4: fixes for C++ compatibility.
...
wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_API attribute to wolfSSL_Atomic_Int_Init, wolfSSL_Atomic_Int_FetchAdd, and wolfSSL_Atomic_Int_FetchAdd, and add fallback definitions for them, allowing elimination of SINGLE_THREADED implementations of wolfSSL_Ref*(), and allowing ungated use of wolfSSL_Atomic_* calls in api.c.
wolfcrypt/src/dh.c: in wc_DhAgree_ct(), remove frivolous XMEMSET() and stray semicolon.
wolfcrypt/benchmark/benchmark.c: fix bench_rsaKeyGen() to skip tests of key sizes below RSA_MIN_SIZE, and add 4096 bit benchmark if RSA_MAX_SIZE is big enough.
tests/unit.h:
* adopt definitions of TEST_FAIL, TEST_SUCCESS, and TEST_SKIPPED from unit.c, remap TEST_SKIPPED from -7777 to 3, and add TEST_SUCCESS_NO_MSGS, TEST_SKIPPED_NO_MSGS, EXPECT_DECLS_NO_MSGS(), and EXPECT_FAILURE_CODEPOINT_ID, to support existing and future expected-particular-failure test cases without log noise.
* rename outer gate from CyaSSL_UNIT_H to TESTS_UNIT_H.
tests/api.c:
* use EXPECT_DECLS_NO_MSGS() in test_ssl_memio_setup(), test_ssl_memio_read_write(), and test_wolfSSL_client_server_nofail_memio(), and globally update affected expected error codes to correspond.
* use atomics for {client,server}SessRemCount{Malloc,free} to fix races in SessRemCtxCb() and SessRemSslSetupCb().
2024-09-18 16:25:26 -05:00
Joshua Okeleke
337456cc1e
Add support for (DevkitPro)libnds
2024-09-18 21:27:53 +02:00
Bill Phipps
7122001dd6
Update to use memory_order_seq_cst instead of GCC internal for C11
2024-09-18 13:48:26 -04:00
JacobBarthelmeh
b9908409d4
Merge pull request #7987 from bandi13/betterEngineFlagsFix
...
FIPS defines RSA_MIN_SIZE and users may want to override
2024-09-18 11:18:24 -06:00
JacobBarthelmeh
87dc45b938
Merge pull request #7986 from julek-wolfssl/crl-cb
...
Add crl error override callback
2024-09-18 10:43:37 -06:00
JacobBarthelmeh
46f2b21abf
Merge pull request #7985 from julek-wolfssl/curl-ci
...
Use nproc not nproc+1 threads
2024-09-18 10:35:08 -06:00
JacobBarthelmeh
ffd0fb23f7
Merge pull request #7979 from SparkiDev/sp_x86_64_no_avx_fix
...
SP x86_64 asm: check for AVX2 support
2024-09-18 10:23:12 -06:00
JacobBarthelmeh
ec8a1ba956
Merge pull request #7962 from embhorn/zd18558
...
Add cmake support for WOLFSSL_CUSTOM_CURVES
2024-09-18 10:18:38 -06:00
JacobBarthelmeh
fcb8d3ffc5
Merge pull request #7887 from kojo1/crl-pss
...
allow sigParamsSz is zero and malloc(0) to return NULL
2024-09-18 10:04:29 -06:00
JacobBarthelmeh
fb2144d290
Merge pull request #7951 from julek-wolfssl/dtls13-cid-fixes
...
DTLS 1.3 CID fixes
2024-09-18 09:38:15 -06:00
Reda Chouk
949565f156
Merge branch 'wolfSSL:master' into fix-conversion
2024-09-18 17:16:48 +02:00
Reda Chouk
be88ddda15
more Wconversion fixes: api/test* block
2024-09-18 16:53:39 +02:00
Andras Fekete
bd77ee4f37
FIPS defines RSA_MIN_SIZE and users may want to override
2024-09-18 10:28:10 -04:00
Juliusz Sosinowicz
ae6c872797
Add crl error override callback
2024-09-18 11:58:53 +02:00
Juliusz Sosinowicz
84c80b4c0f
make mymemmem available for linking
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
1e75a2367c
Address code review
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
74ac2cd07d
dtls 1.3: pad plaintext when too short for record header protection
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
29f51b6245
CheckcipherList: Check Cipher minor to detect TLS 1.3 ciphersuite
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
4a26af0dfa
dtls 1.3: Add cid size to output buffer length
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
ee2b77c0bd
Move manual memio to api.c
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
6d5fefde4a
dtls 1.3: Check header length before copying
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
8ce6f17144
Add dtls 1.3 cid api test
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
c166b9dd77
Use nproc not nproc+1 threads
2024-09-18 10:28:28 +02:00
JacobBarthelmeh
c3900470aa
Merge pull request #7982 from bandi13/fixEngineFlags
...
Engine needs to have a RSA_MIN_SIZE=1024
2024-09-17 17:03:11 -06:00
Daniel Pouzzner
ef6f1562d6
Merge pull request #7980 from ejohnstown/small-stack-fp
...
FP SmallStack Fix
2024-09-17 17:28:46 -05:00
Andras Fekete
41b3a729d2
Engine needs to have a RSA_MIN_SIZE=1024
2024-09-17 17:36:37 -04:00
John Safranek
47e51400bb
FP SmallStack Fix
...
The function _fp_exptmod_nct() is using WOLFSSL_NO_MALLOC to guard
using stack allocation vs malloc. It's twin function _fp_exptmod_ct()
is using WOLFSSL_SMALL_STACK for this. This is causing inappropriate use
of malloc() in a small stack environment. The no-malloc case will also
be kept so static memory and no-malloc fix still works.
1. Change the guards for `#ifndef WOLFSSL_NO_MALLOC` in the function
`_fp_exptmod_nct()` to `#if defined(WOLFSSL_SMALL_STACK) &&
!defined(WOLFSSL_NO_MALLOC)`.
2024-09-17 10:55:11 -07:00
Sean Parkinson
aa41e09937
SP x86_64 asm: check for AVX2 support
...
Check for AVX2 as well as BMI2 and ADX.
Some virtual machines may not have AVX2 with the others.
2024-09-17 14:14:27 +10:00
Sean Parkinson
5ef617a75a
Merge pull request #7978 from douzzer/20240916-wc_DhAgree_ct-sp-math
...
20240916-wc_DhAgree_ct-sp-math
2024-09-17 09:38:07 +10:00
Daniel Pouzzner
04c781ad9b
wolfcrypt/src/dh.c: in wc_DhAgree_ct(), implement failsafe constant-time key size fixup, to work around sp-math constant-time key clamping.
...
also fix a -Wunused in src/ssl_load.c:DataToDerBuffer() teased out by configuration permutations.
2024-09-16 17:33:25 -05:00
András Fekete
9666394b73
Merge pull request #7977 from billphipps/have_rsa_fix
...
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
2024-09-16 16:26:26 -04:00
Bill Phipps
b4a491de12
Add missing guard to api.c
2024-09-16 14:03:31 -04:00
Bill Phipps
92f3a808b0
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
2024-09-16 13:29:38 -04:00
Sean Parkinson
e6b466dd71
Merge pull request #7923 from embhorn/rsa2048_min
...
Set RSA_MIN_SIZE default to 2048 bits
2024-09-16 21:38:19 +10:00
Daniel Pouzzner
52030f182b
Merge pull request #7972 from miyazakh/renesas_tsip_update_
...
Renesas TSIP version update
2024-09-14 00:41:19 -05:00
Daniel Pouzzner
990d38a068
Merge pull request #7974 from dgarske/noasn
...
Support for NO_ASN when wildcard *.c is used
2024-09-14 00:34:15 -05:00
Daniel Pouzzner
80f3b0d3d8
Merge pull request #7926 from philljj/x509_acert_support
...
x509 attribute cert support
2024-09-14 00:30:29 -05:00
Daniel Pouzzner
4545a9b4a2
Merge pull request #7960 from night1rider/mmcau-DesEcb
...
DES ECB using mmcau HW Library, and DES ECB basic test
2024-09-14 00:07:18 -05:00
David Garske
0d5659ff2d
Merge pull request #7975 from douzzer/20240913-fixes
...
20240913-fixes
2024-09-13 17:20:36 -07:00
Daniel Pouzzner
84f0800b96
configure.ac:
...
* set DEFAULT_ENABLED_ALL_ASM=no if enable_afalg or ENABLED_32BIT;
* omit enable_srtp_kdf from enable-all-crypto if enable_afalg.
linuxkm: add GetCAByAKID to wolfssl_linuxkm_pie_redirect_table.
src/x509.c: in GenerateDNSEntryIPString(), use XMEMSET() to initialize tmpName, not = {0}, to avoid unmaskable compiler emission of memset() call.
wolfssl/openssl/ssl.h: add OPENSSL_EXTRA to an existing OPENSSL_ALL-gated section, consistent with gating of correspinding section in wolfssl/ssl.h.
wolfssl/wolfcrypt/settings.h: adopt setup for WOLFSSL_SP_NO_UMAAL from wolfssl/wolfcrypt/sp_int.h now that it's used by wolfcrypt/src/port/arm/thumb2-poly1305-asm.S.
2024-09-13 18:01:11 -05:00
Eric Blankenhorn
91e411b4b9
Set RSA_MIN_SIZE default to 2048 bits
2024-09-13 16:02:05 -05:00
David Garske
8cea8283db
Support for NO_ASN when wildcard *.c is used. Added STM32H743xx support.
2024-09-13 13:52:21 -07:00
jordan
7df446bf4e
cleanup: fix cast warning, and small cleanup.
2024-09-13 09:26:19 -05:00
jordan
7faed6cded
X509 attribute cert (acert) support.
2024-09-13 08:03:55 -05:00
Hideki Miyazaki
c49f1e22bd
Update TSIP version for RX72N and GR-ROSE
...
fix readme
2024-09-13 14:12:39 +09:00
Sean Parkinson
4fa20cb770
Merge pull request #7965 from ColtonWilley/pkcs12_use_indef_len
...
Use context specific for PKCS7 encrypted data encoding
2024-09-13 12:17:08 +10:00
Colton Willey
b0ddccc802
Change PKCS7 encrypted content encoding to use ASN_CONTEXT_SPECIFIC
2024-09-12 16:46:35 -07:00
Daniel Pouzzner
5b337e69d9
Merge pull request #7961 from philljj/fips_pkcallback
...
Update HAVE_FIPS define guard in test.h.
2024-09-12 18:18:48 -05:00
Sean Parkinson
171ab4b13a
Merge pull request #7967 from douzzer/20240910-configure-enable-all-asm-and-sp-cleanup
...
20240910-configure-enable-all-asm-and-sp-cleanup
2024-09-13 09:18:37 +10:00
Daniel Pouzzner
f6d40ad229
Merge pull request #7955 from gojimmypi/pr-espressif-port-updates
...
Update Espressif sha, util, mem, time helpers
2024-09-12 18:15:25 -05:00
Daniel Pouzzner
95c94f52d9
Merge pull request #7953 from gojimmypi/pr-espressif-settings
...
Update wolfcrypt settings.h for Espressif ESP-IDF, template update
2024-09-12 18:11:34 -05:00
Daniel Pouzzner
e9d820b730
Merge pull request #7799 from anhu/fips_macro_guard
...
Better macro guarding fix undeclared var error
2024-09-12 17:56:00 -05:00
Daniel Pouzzner
b736d78950
Merge pull request #7948 from anhu/MATCH_SUITE
...
Convert MATCH_SUITE_ERROR to OpenSSL error in wolfSSL_get_error()
2024-09-12 17:50:35 -05:00
David Garske
de3c45a02c
Merge pull request #7971 from douzzer/20240912-gating-tweaks
...
20240912-gating-tweaks
2024-09-12 15:30:11 -07:00
Daniel Pouzzner
e3301b06f6
OpenSSL coexistence tweaks
2024-09-12 16:37:41 -05:00
Daniel Pouzzner
ad7c25b409
Merge pull request #7823 from cconlon/rsaPssSignPkCallbackNoPrehashTls13
...
PK callbacks: add build option to give full data to TLS 1.3 RSA-PSS sign callback instead of hash
2024-09-12 15:40:59 -05:00
Daniel Pouzzner
eb53a95f57
wolfcrypt/src/asn.c:DecodeSingleResponse(): fix gating for "at" working var, by refactoring gating for WOLFSSL_OCSP_PARSE_STATUS sections for clarity.
2024-09-12 14:38:50 -05:00
Daniel Pouzzner
3fac3b71ca
configure.ac:
...
* move leanpsk and asn option processing early to make their results available to existing math back end selector logic;
* add -DWOLFSSL_ASN_ALL to enable-all-crypto;
* tweak asn option processing to preserve "original" value in case later configure logic wants to pivot on that.
2024-09-12 13:29:02 -05:00
Daniel Pouzzner
53c4c0095a
wolfcrypt/src/sp_cortexm.c: update from scripts#423.
2024-09-12 13:29:02 -05:00
Daniel Pouzzner
98a51029f8
configure.ac: in --enable-all-asm handler, support only x86_64 and aarch64, and enable sp-asm only for them, to avoid "ASM not available for CPU" error from sp-asm handler.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
8d0047fedf
SP: fixes for several bugprone-macro-parentheses and -Wconversions.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
428e15816f
configure.ac:
...
* in handling for enable-all-asm, add check for full Gnu C and don't auto-enable all-asm unless full Gnu C and enable-all-crypto, among other sanity checks.
* in enable-all and enable-all-crypto, correctly conditionalize several FIPS-v6-only features/algorithms.
* in FIPS v5 setup, force off SRTP and SRTP-KDF (with warnings).
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
e227b2ad7d
wolfcrypt/src/sp_int.c: fix bugprone-too-small-loop-variable in _sp_mul().
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
5b8e9e692f
wolfcrypt/src/siphash.c: fixes for bugprone-macro-parentheses.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
1b0ef048ba
configure.ac: move handling for enable-all-asm to precede handling for enable-all-crypto, and compute DEFAULT_ENABLED_ALL_ASM appropriately.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
430d104430
configure.ac: render warnings when FIPS setup forces off options supplied to configure.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
723d8efd1c
configure.ac: consolidate enable-all-crypto settings in one place.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
cf8f9a80fc
configure.ac: add --enable-all-asm, and add it to --enable-all and --enable-all-crypto.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
3cb66ad18a
configure.ac: update help and error messages re fastmath.
2024-09-12 13:29:01 -05:00
David Garske
20e2e33e25
Merge pull request #7939 from SparkiDev/thumb2_poly1305
...
undefined
2024-09-12 11:15:53 -07:00
András Fekete
75c6633039
Merge pull request #7970 from night1rider/XILINX-AFLAG-Fix
...
Fixing Redefine Errors/Warnings for --enable-afalg=xilinx
2024-09-12 13:04:29 -04:00
night1rider
c88f1c4d54
Fixing Redefine Errors/Warnings
2024-09-12 09:54:03 -06:00
Siert Wieringa
9e2a7b3653
Feature/multiple aes siv ads ( #7911 )
...
* Proposed new interface for AesSivEncrypt with number of ADs != 1.
* Implement AES SIV S2V computation with a number of ADs not equal to 1.
* Add Example A.1 from RFC5297 to AES SIV test vectors.
* Add tests for new AES SIV interface, and add test vectors for examples given in RFC5297.
* Include the nonce in count of maximum number of ADs.
* Addressing review comments.
* Addressing review comments: Use uppercase 'U' suffix on unsigned constant.
* Rename local variables named 'ad0' to 'ad', since the zero makes no sense, especially since in the RFC 5297 document they're actually counting the ADs from 1.
2024-09-12 07:55:29 -07:00
JacobBarthelmeh
088dfab22a
Merge pull request #7968 from douzzer/20240911-fix-whitespace
...
20240911-fix-whitespace
2024-09-11 22:18:36 -06:00
Daniel Pouzzner
4159ba0a95
.github/workflows/openldap.yml: fix whitespace.
2024-09-11 23:01:42 -05:00
Daniel Pouzzner
974506db28
Merge pull request #7933 from julek-wolfssl/openldap-action
...
Add openldap action
2024-09-11 22:54:31 -05:00
Sean Parkinson
27033c225f
Thumb-2 ChaCha, Poly1305: implemention in assembly
...
Implementation of ChaCha algorithm for ARM Thumb-2.
Implementation of Poly1305 algorithm for ARM Thumb-2.
2024-09-12 10:59:01 +10:00
Sean Parkinson
d23bfd2eb9
Merge pull request #7963 from anhu/p11nopin
...
Check for PIN before saving it.
2024-09-12 10:20:47 +10:00
Colton Willey
88d1ed7393
Modify pkcs8 pbe encryption to use indefinite length encoding, making it consistent with both old ASN code and openssl
2024-09-11 15:55:05 -07:00
Anthony Hu
246228e410
Check for PIN before saving it.
2024-09-11 14:39:03 -04:00
Eric Blankenhorn
a75c73cdef
Add cmake support for WOLFSSL_CUSTOM_CURVES
2024-09-11 10:45:21 -05:00
jordan
ea57e82395
Update HAVE_FIPS define guard in test.h.
2024-09-11 08:20:15 -05:00
Sean Parkinson
1c8f1e6921
Merge pull request #7802 from douzzer/20240725-wc_DhAgree_ct
...
20240725-wc_DhAgree_ct
2024-09-11 08:06:58 +10:00
Reda Chouk
79d3b955ed
tls.c type conversion fixed.
2024-09-10 13:51:21 +02:00
Daniel Pouzzner
213ac1ac0a
Merge pull request #7959 from billphipps/sgx_c99_fix
...
Update to use C99 instead of C11 because of lack of SGX support
2024-09-10 00:39:40 -05:00
Sean Parkinson
10c1fa2088
Merge pull request #7931 from barracuda156/powerpc-darwin
...
Fixes for PowerPC
2024-09-10 10:34:09 +10:00
Sean Parkinson
500a3b41e4
Merge pull request #7932 from barracuda156/dispatch
...
Fixes for earlier macOS
2024-09-10 10:29:45 +10:00
night1rider
e912aff7e5
DES ECB using mmcau HW Library, and DES ECB basic test
2024-09-09 15:32:21 -06:00
Daniel Pouzzner
49a680540c
add constant time DH key agreement APIs:
...
* adds wc_DhAgree_ct().
* adds wolfSSL_DH_compute_key_padded(), using wc_DhAgree_ct() if available, with fallback fixup code.
* adds unit test coverage in api.c:test_wolfSSL_DH() for expected-success calls to wolfSSL_DH_compute_key() and wolfSSL_DH_compute_key_padded().
2024-09-09 16:24:07 -05:00
Bill Phipps
232314039d
Update to use C99 instead of C11 because of lack of SGX support
2024-09-09 12:10:53 -04:00
David Garske
dbfebeac43
Merge pull request #7956 from douzzer/20240906-errcode-fixups
...
20240906-errcode-fixups
2024-09-09 08:42:46 -07:00
Reda Chouk
884b51151b
Merge branch 'fix-conversion' of github.com:gasbytes/wolfssl into fix-conversion
2024-09-09 16:06:16 +02:00
Reda Chouk
65db4b15d6
api type conversion errors, first half of tls* files
2024-09-09 16:05:15 +02:00
Daniel Pouzzner
c81c9be9ce
error code fixes:
...
* fix TLS layer to consistently use WOLFSSL_FATAL_ERROR for error retvals, rather than literal -1.
* add WC_NO_ERR_TRACE() wrapper around LENGTH_ONLY_E (it does not signify an error condition).
* refactor errcode handling for traceability in wolfSSL_DSA_do_sign(), wolfSSL_DH_size(), wolfSSL_EC_KEY_get_conv_form(), wolfSSL_d2i_DSA_SIG(), wolfSSL_DSA_do_sign(), SetDhInternal(), and wolfSSL_EC_KEY_get_conv_form().
2024-09-06 19:33:48 -05:00
gojimmypi
b57fcd0bd8
Update Espressif sha, util, mem, time helpers
2024-09-06 16:33:04 -07:00
JacobBarthelmeh
398f8c90e2
Merge pull request #7952 from douzzer/20240906-GetCAByKeyHash-wolfssl_linuxkm_pie_redirect_table
...
20240906-GetCAByKeyHash-wolfssl_linuxkm_pie_redirect_table
2024-09-06 15:37:37 -06:00
gojimmypi
282e559113
Update wolfcrypt settings.h for Espressif ESP-IDF
2024-09-06 14:24:38 -07:00
Daniel Pouzzner
e708ef3b56
Merge pull request #7946 from gasbytes/fix-conversion
...
Fix conversion in ssl* files and in internal.c
2024-09-06 16:13:55 -05:00
Anthony Hu
9e204dc023
Convert MATCH_SUITE_ERROR to OpenSSL error in wolfSSL_get_error()
2024-09-06 16:29:30 -04:00
Anthony Hu
4bd39aa52e
Better macro guarding fix undeclared var error
2024-09-06 15:15:34 -04:00
Daniel Pouzzner
87aef05f16
linuxkm: add GetCAByKeyHash to wolfssl_linuxkm_pie_redirect_table.
2024-09-06 14:15:19 -05:00
David Garske
80a63a3fce
Merge pull request #7924 from anhu/pqm4_purge
...
Get rid of pqm4 in favour our own Kyber/MLDSA implementation
2024-09-06 12:00:26 -07:00
Daniel Pouzzner
945f97636a
Merge pull request #7945 from ColtonWilley/no_external_network_test_option
...
Add option to skip all tests requiring an internet connection
2024-09-06 10:48:33 -05:00
Sean Parkinson
5f40f9a140
Thumb-2 ChaCha: implemention in assembly
...
Implementation of ChaCha algorithm for ARM Thumb-2.
2024-09-06 10:16:45 +10:00
Sean Parkinson
96e2c51f07
Merge pull request #7907 from ColtonWilley/rsa_pad_crypto_cb
...
Add new crypto callback for RSA with padding.
2024-09-06 08:48:36 +10:00
Sean Parkinson
6fc9dcae07
Merge pull request #7947 from douzzer/20240905-mp_sign_t
...
20240905-mp_sign_t
2024-09-06 08:46:23 +10:00
Colton Willey
9ad4e565fe
Restore original comments
2024-09-05 15:10:50 -07:00
Daniel Pouzzner
dcaff9dff4
Merge pull request #7944 from JacobBarthelmeh/pkcs12
...
add parsing over optional PKCS8 attributes
2024-09-05 16:55:44 -05:00
David Garske
887c5abcb1
Merge pull request #7949 from douzzer/20240905-whitespace-and-utf8-cleanup
...
20240905-whitespace-and-utf8-cleanup
2024-09-05 14:38:19 -07:00
Daniel Pouzzner
9f6a75cdfd
Merge pull request #7934 from rizlik/ocsp-get-ca-keyhash-fix
...
ocsp: search CA by key hash instead of ext key id
2024-09-05 15:03:54 -05:00
Daniel Pouzzner
a3fb5029f8
clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text.
2024-09-05 14:52:18 -05:00
Reda Chouk
73786112ec
review addressed
2024-09-05 20:55:00 +02:00
Daniel Pouzzner
603c03c0be
MPI: add mp_sign_t and sp_sign_t.
2024-09-05 10:37:02 -05:00
Marco Oliverio
6114691fd6
ocsp: try lookup certificate using keyHash as KeyId
...
try to lookup the certificate using the key hash as key identifier
first. If we can't find a certificate, it means that the certificate
uses another method to compute the key identifier so we need to fallback
to linear search.
2024-09-05 09:49:01 +00:00
Daniel Pouzzner
a3fea482db
Merge pull request #7914 from julek-wolfssl/gh/7825
...
Fix failing test_dtls_frag_ch
2024-09-04 19:35:06 -05:00
Colton Willey
f749ca387d
Rewrite to use test to make old mac sh versions happy
2024-09-04 16:34:09 -07:00
Colton Willey
8661cf6fee
Update no network test option to overload meaning of existing WOLFSSL_EXTERNAL_TEST instead of using new flag
2024-09-04 16:09:16 -07:00
JacobBarthelmeh
9a8573afc9
touch up pkcs8 create function and test case warning
2024-09-04 15:48:44 -06:00
Colton Willey
8aa5f463b1
Add option to skip all tests requiring an internet connection.
2024-09-04 14:48:25 -07:00
JacobBarthelmeh
2a1165460e
add parsing over optional PKCS8 attributes
2024-09-04 15:15:53 -06:00
David Garske
1c8767b4d3
Merge pull request #7942 from douzzer/20240904-fix-test_wolfSSL_EVP_sm3
...
20240904-fix-test_wolfSSL_EVP_sm3
2024-09-04 12:40:51 -07:00
Daniel Pouzzner
a31733db85
Merge pull request #7909 from SparkiDev/dilithium_fips204_draft
...
Dilithium: Support FIPS 204 Draft
2024-09-04 14:34:59 -05:00
Daniel Pouzzner
7e16016311
tests/api.c: fix expected retval from EVP_DigestInit() in test_wolfSSL_EVP_sm3() -- before 2c9a3c5c1c, EVP_DigestInit() incorrectly returned BAD_FUNC_ARG when passed a null ctx.
2024-09-04 14:04:29 -05:00
Daniel Pouzzner
53aec861a4
Merge pull request #7938 from billphipps/atomic_fence
...
Modernized memory fence support for C11 and clang
2024-09-04 13:17:26 -05:00
Daniel Pouzzner
c9ff15da21
Merge pull request #7901 from SparkiDev/memusage_8
...
Memory usage improvements
2024-09-04 12:34:44 -05:00
Colton Willey
3b5d0aa85a
Fix up whitespace changes from editor autoformat
2024-09-04 10:25:20 -07:00
Colton Willey
f9af463db1
Update RSA verify documentation to specify that the output should be compared with the original plaintext
2024-09-04 10:13:40 -07:00
András Fekete
fb86818251
Merge pull request #7930 from mpsuzuki/fix-ocsp-test
...
[scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem.
2024-09-04 12:59:25 -04:00
David Garske
0580c1a83a
Merge pull request #7889 from miyazakh/renesas_rx65n_update
...
Update rx64n support on gr-rose
2024-09-04 08:08:49 -07:00
David Garske
7c7de235d8
Merge pull request #7937 from douzzer/20240903-missing-WC_NO_ERR_TRACEs
...
20240903-missing-WC_NO_ERR_TRACEs
2024-09-04 08:07:19 -07:00
David Garske
990b4d62ea
Merge pull request #7940 from Irvise/master
...
Ada binding: correct Alire manifest and fix build
2024-09-04 08:05:58 -07:00
Sean Parkinson
88c3e0af22
Memory usage improvements
...
kdf.c: wc_PRF() - No need for previous, reuse current.
sha256.c: Transform_Sha256() - Add slow but small version for many
register implementation.
sp_int.h: Change 'used' and 'size' fields to 16-bit types when possible.
sp_int.c: Fixes for 16-bit used.
2024-09-04 22:51:31 +10:00
Irvise
2a96981dbe
Ada binding: correct Alire manifest and fix build
2024-09-04 09:42:24 +02:00
Daniel Pouzzner
b26fa6cf59
Merge pull request #7918 from SparkiDev/type_conversion_fixes_3
...
Type conversion fixes
2024-09-03 20:18:00 -05:00
Daniel Pouzzner
121b8c52f8
Merge pull request #7869 from julek-wolfssl/libspdm-x509
...
libspdm x509 parts
2024-09-03 20:09:31 -05:00
Bill Phipps
ae939e9e6a
Modernized memory fence support for C11 and clang
2024-09-03 21:09:30 -04:00
Daniel Pouzzner
806df85477
backfill more missing WC_NO_ERR_TRACE()s on error code operands, and refactor away the obsolete GEN_MEM_ERR macro mechanism in wolfcrypt/src/ecc.c.
2024-09-03 17:44:11 -05:00
Sean Parkinson
ec6c7051a8
Merge pull request #7928 from dgarske/riscv_fixes
...
Fixes for building on RISC-V
2024-09-04 08:03:45 +10:00
David Garske
b7a6c6c314
Fixes for building RISCV ASM with enable-all.
...
* Fix type warning for SHA512 ByteReverseWords call
* Fix issue with riscv-asm and xchacha.
2024-09-03 09:37:01 -07:00
Reda Chouk
a80a2cdcff
Addressed type conversion error in internal.c
2024-09-03 16:26:32 +02:00
Reda Chouk
b237730dad
fix type conversion in ssl* files
2024-09-02 18:08:14 +02:00
Marco Oliverio
293719c168
ocsp: search CA by key hash instead of ext key id
2024-09-02 15:25:53 +00:00
Juliusz Sosinowicz
9254e270be
Add openldap action
2024-09-02 13:29:18 +02:00
Sean Parkinson
ed7beb4e0e
Type conversion fixes
...
Changes to get compilation with -Wconversion passing on the files.
2024-09-02 19:19:23 +10:00
Juliusz Sosinowicz
2c9a3c5c1c
Missing libspdm features
...
- RsaFunctionPrivate: detect when only n,e,d are available
- wolfSSL_EVP_add_digest: return success
- wolfSSL_EVP_add_cipher: return success
- wolfSSL_BN_bin2bn: accept NULL data if len is 0 (checked in mp_read_unsigned_bin)
- wolfssl_read_bio: advance correct bio
- wolfSSL_X509_set_ext: return raw extension data for BASIC_CA_OID
- Implement
- sk_X509_EXTENSION_free
- d2i_EC_PUBKEY_bio
- d2i_RSA_PUBKEY_bio
- d2i_X509_REQ_INFO
- X509_REQ_INFO_free
- ASN1_TIME_set_string_X509
2024-09-02 10:01:12 +02:00
Sergey Fedorov
70caed572a
crl.c: use EV_TRIGGER when NOTE_TRIGGER unavailable
2024-09-01 21:03:18 +08:00
Sergey Fedorov
2ddfe15c4f
Fix libdispatch usage condition
2024-09-01 21:03:18 +08:00
Sergey Fedorov
94478cb208
wc_port.h: fix macros for powerpc
2024-09-01 20:17:11 +08:00
Sergey Fedorov
ef2424336c
sp_int.c: fix ppc asm for macOS
2024-09-01 20:17:11 +08:00
Sergey Fedorov
b6bfae9c24
asm.c: fix ppc asm for macOS
2024-09-01 20:17:11 +08:00
Sergey Fedorov
765e5d1689
types.h: add powerpc macros
2024-09-01 20:17:11 +08:00
suzuki toshiya
2fa0da74e4
[scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem.
2024-08-31 18:22:20 +09:00
Daniel Pouzzner
4d837e74c4
Merge pull request #7303 from Irvise/master
...
[Ada] Initial library support
2024-08-31 00:26:29 -05:00
Colton Willey
2bcfff3497
Expand testing to include SW implementation of RSA with padding callback, code cleanup to address review comments.
2024-08-30 13:41:51 -07:00
David Garske
72fc08ede8
Merge pull request #7927 from douzzer/20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
...
20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
2024-08-30 13:17:32 -07:00
Daniel Pouzzner
126df1d9ee
src/internal.c: in wolfSSL_ERR_reason_error_string(), return "unknown error number" when error==0 and !OPENSSL_EXTRA, to avoid provoking clang-analyzer-optin.core.EnumCastOutOfRange.
2024-08-30 14:32:56 -05:00
David Garske
13ec0f0694
Merge pull request #7916 from SparkiDev/riscv-sha3-asm
...
RISC-V ASM: SHA-3
2024-08-30 09:06:36 -07:00
Juliusz Sosinowicz
b67fd6f29c
Fix failing test_dtls_frag_ch
...
- Add option to disable ECH
- InitSuites: clean up DTLS paths
- wolfSSL_parse_cipher_list: remove WOLFSSL_MAX_SUITE_SZ setting
- wolfSSL_parse_cipher_list: add rationale for keeping ciphersuites
- test_dtls_frag_ch: ECH and ciphersuites were pushing the ClientHello message over the fragmentation limit. Disabling ECH and limiting ciphersuites fixes the test.
2024-08-30 09:56:52 +02:00
Sean Parkinson
d475ecc8d3
Merge pull request #7917 from douzzer/20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
...
20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
2024-08-30 14:12:20 +10:00
Sean Parkinson
0df8a0f88c
Merge pull request #7925 from JacobBarthelmeh/readme
...
update CVE listed in changelog
2024-08-30 14:11:17 +10:00
Daniel Pouzzner
2dcd04668b
src/internal.c: in wolfSSL_ERR_reason_error_string(), restore handling for -WOLFSSL_X509_V_ERR_*, but separated from handling for the proper wolfSSL_ErrorCodes.
2024-08-29 21:28:02 -05:00
Daniel Pouzzner
255465a757
src/internal.c: in wolfSSL_ERR_reason_error_string(), remove handling for -WOLFSSL_X509_V_ERR_*, and make corresponding changes in wolfssl/error-ssl.h and tests/api.c.
2024-08-29 20:02:42 -05:00
JacobBarthelmeh
26756da925
update CVE listed in changelog
2024-08-29 16:45:23 -06:00
Daniel Pouzzner
4b4000bf61
Merge pull request #7903 from SparkiDev/ecc_sigalgo_params_null
...
Certificates: ECC signature algorithm parameter
2024-08-29 16:16:08 -05:00
Daniel Pouzzner
fab5c9f864
Merge pull request #7880 from ColtonWilley/tls13_send_cert_use_signed_len
...
Use signed variable for length calculation in SendTls13Certificate
2024-08-29 16:12:41 -05:00
Daniel Pouzzner
ef4ea53570
Merge pull request #7912 from julek-wolfssl/gh/7686
...
DTLS 1.3: check size including headers
2024-08-29 16:09:53 -05:00
Daniel Pouzzner
41449fac48
Merge pull request #7895 from embhorn/zd18433
...
Use verify callback before checking dates
2024-08-29 15:52:04 -05:00
Daniel Pouzzner
5e1bf9d4f2
Merge pull request #7908 from anhu/no_stdio
...
Don't include stdio.h if not needed.
2024-08-29 15:33:41 -05:00
Daniel Pouzzner
f670400183
Merge pull request #7921 from gasbytes/oss-fuzz-70747
...
added missing wolfSSL_X509_NAME_free(dName)
2024-08-29 15:15:52 -05:00
Daniel Pouzzner
17870d4159
src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E.
...
wolfssl/ssl.h, wolfssl/error-ssl.h, wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c, and src/internal.c:
* fix values of WOLFSSL_ERROR_SSL and WOLFSSL_ERROR_WANT_X509_LOOKUP to match OpenSSL values;
* move legacy CyaSSL compat layer error codes from ssl.h to error-ssl.h and renumber them to conform to existing sequence;
* move enum IOerrors from ssl.h to error-ssl.h to get picked up by support/gen-debug-trace-error-codes.sh;
* add to enum wolfSSL_ErrorCodes negative counterparts for several positive error return constants;
* include error-ssl.h from ssl.h;
* add label (wolfCrypt_ErrorCodes) to error-crypt.h enum, and in wc_GetErrorString(), use switch ((enum wolfCrypt_ErrorCodes)error) to activate switch warnings for missing enums;
* in wolfSSL_ERR_reason_error_string(), use switch((enum wolfSSL_ErrorCodes)error) to activate switch warnings for missing enums;
* in ssl.h, add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* in error-crypt.h, add missing WOLFSSL_API attribute to wc_backtrace_render(); and
* harmonize gating of error codes, ssl.h / error-ssl.h / internal.c:wolfSSL_ERR_reason_error_string() / api.c:error_test().
tests/api.c:
* add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().
* in post_auth_version_client_cb(), add missing !NO_ERROR_STRINGS gating.
add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-29 14:22:56 -05:00
Colton Willey
50a3a37ff2
Merge branch 'master' of github.com:ColtonWilley/wolfssl into rsa_pad_crypto_cb
2024-08-29 11:14:49 -07:00
Anthony Hu
844d0ec558
Get rid of pqm4 in favour our own Kyber/MLDSA implementation
2024-08-29 13:23:39 -04:00
Reda Chouk
109e4c3dfb
added missing wolfSSL_X509_NAME_free(dName)
2024-08-29 17:59:02 +02:00
Juliusz Sosinowicz
31ec2b0acd
Merge pull request #7920 from bandi13/fixOSPOpenSSH
...
Fix compilation error for RSA_MAX_SIZE
2024-08-29 16:41:18 +02:00
Andras Fekete
b886ffd04b
Fix compilation error for RSA_MAX_SIZE
2024-08-29 09:31:10 -04:00
Sean Parkinson
7c3d66ecd6
RISC-V ASM: SHA-3
...
Add assembly implementations of SHA-3.
Use VSRL_VX instead of two VSRL_VI operations as immediate is only 5
bits.
2024-08-29 17:58:02 +10:00
Daniel Pouzzner
b178138d83
src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E, and de-gate error strings previously gated on HAVE_HTTP_CLIENT.
...
tests/api.c: add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().
wolfssl/ssl.h, wolfssl/error-ssl.h, and wolfssl/wolfcrypt/error-crypt.h:
* move several negative error return codes from ssl.h to error-ssl.h,
* renumber them to conform to existing sequence, and
* include error-ssl.h from ssl.h;
* add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* add missing WOLFSSL_API attribute to wc_backtrace_render().
add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-28 23:05:04 -05:00
David Garske
d4f6b5b300
Merge pull request #7915 from embhorn/zd18539
...
Fix WOLFSSL_NO_TLS12 build error
2024-08-28 10:03:58 -07:00
Eric Blankenhorn
1a3a730eb9
Fix WOLFSSL_NO_TLS12 build error
2024-08-28 10:51:11 -05:00
David Garske
5e77c06ea2
Merge pull request #7913 from bandi13/fixDocumentation
...
Doxygen complains about the quotes used
2024-08-28 07:34:03 -07:00
Andras Fekete
6494233774
Doxygen complains about the quotes used
2024-08-28 09:31:34 -04:00
Juliusz Sosinowicz
b2f59f733a
DTLS 1.3: check size including headers
2024-08-28 12:58:50 +02:00
Sean Parkinson
a3e239c2ad
Certificates: ECC signature algorithm parameter
...
Allow, with a define, ECC signature algorithm parameters to be NULL and
not just empty.
Only for interop.
2024-08-28 11:10:41 +10:00
Sean Parkinson
652158fcac
Dilithium: Support FIPS 204 Draft
...
Compile with WOLFSSL_DILITHIUM_FIPS204_DRAFT to get code that implements
the FIPS-204 August 2023 DRAFT.
Alternatively, --enable-dilithium=draft or
--enable-dilithium=fips204-draft
2024-08-28 11:02:01 +10:00
Anthony Hu
6174fb3545
Don't include stdio.h if not needed.
2024-08-27 17:44:04 -04:00
Hideki Miyazaki
0cfd48f200
update rx64n gr-rose key and signed cert
...
add a script to generate signed cert
2024-08-28 06:00:31 +09:00
Eric Blankenhorn
dcea21a9a5
Merge pull request #7897 from douzzer/20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
...
20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
2024-08-27 15:41:20 -05:00
Colton Willey
b7299a23c0
Add new crypto callback for RSA with padding.
2024-08-27 13:09:23 -07:00
Eric Blankenhorn
d0475def5f
Merge pull request #7906 from douzzer/20240827-XFENCE-all-disable-asm-assert
...
20240827-XFENCE-all-disable-asm-assert
2024-08-27 14:32:20 -05:00
Daniel Pouzzner
349e06ab4a
wolfssl/wolfcrypt/wc_port.h: use non-asm implementation of XFENCE when available.
2024-08-27 13:36:21 -05:00
Colton Willey
a57d234f6b
Clean up sign comparison warnings
2024-08-27 10:07:11 -07:00
Daniel Pouzzner
e164bcb24d
Merge pull request #7904 from SparkiDev/kyber_tls_fixes
...
Kyber: fix TLS usage
2024-08-27 00:44:56 -05:00
Daniel Pouzzner
90152fedda
Merge pull request #7902 from gasbytes/wc_pkcs7_decodeauthenvelopeddata-problem
...
Added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-27 00:40:21 -05:00
Daniel Pouzzner
2537e08a99
Merge pull request #7890 from embhorn/zd18463
...
Various Coverity fixes
2024-08-26 23:34:23 -05:00
Sean Parkinson
893a486ae1
Kyber: fix TLS usage
...
Allow only select parameter sets to be compiled in.
Fixed unit.test to recognize when level is supported.
2024-08-27 10:35:08 +10:00
Anthony Hu
bf074d2bb9
Merge pull request #7877 from SparkiDev/ml_dsa_ml_kem_final
...
Dilithum, Kyber: Update to final specification
2024-08-26 16:48:05 -04:00
Daniel Pouzzner
b17b190695
tests/api.c: add missing deallocations in test_wc_dilithium_sign_vfy().
2024-08-26 15:00:27 -05:00
Reda Chouk
25dd8b641e
added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-26 19:29:06 +02:00
Sean Parkinson
60f438f0c3
Dilithum, Kyber: Update to final specification
...
FIPS 203 and FIPS 204 final specification changes.
2024-08-26 17:42:27 +10:00
Daniel Pouzzner
bcbb5441ec
Merge pull request #7881 from gasbytes/eagain-proper-shutdown
...
Properly handling the shutdown when multiple ones go on EAGAIN back to back
2024-08-23 23:46:31 -05:00
Daniel Pouzzner
c454a4217c
Merge pull request #7866 from gojimmypi/pr-espressif-config
...
Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig
2024-08-23 21:11:09 -05:00
Daniel Pouzzner
3f0ba97d1e
Merge pull request #7893 from gojimmypi/pr-asn-allow-zero-serial
...
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-23 21:09:41 -05:00
Daniel Pouzzner
1d34b565fa
Merge pull request #7891 from SparkiDev/test_fixes_2
...
Test fixes
2024-08-23 21:08:44 -05:00
Takashi Kojo
4bedef9664
allow sigParamsSz is zero and malloc(0) to return NULL
2024-08-24 07:58:02 +09:00
Daniel Pouzzner
a39f521f7f
Merge pull request #7884 from dgarske/x86_notwindows
...
Fixes for building x86 in Visual Studio for non-windows OS
2024-08-23 17:38:30 -05:00
Daniel Pouzzner
7725e75c42
add WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS flag for optional errcode tracing in apps, define it in wolfcrypt/test/test.c when defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES), and deploy WC_NO_ERR_TRACE() to test.c where needed.
2024-08-23 16:35:43 -05:00
Eric Blankenhorn
6dab58266d
Various Coverity fixes
2024-08-23 16:09:18 -05:00
Eric Blankenhorn
be37587bc3
Use verify callback before checking dates
2024-08-23 16:02:23 -05:00
Reda Chouk
8a6d7ff9a5
more clang-tidy edits
2024-08-23 21:31:55 +02:00
Reda Chouk
f4a27772e0
removed unnecessary copy of cb
2024-08-23 17:44:49 +02:00
Juliusz Sosinowicz
88d4f486e2
Merge pull request #7892 from douzzer/20240822-fixes
...
20240822-fixes
2024-08-23 16:47:23 +02:00
Daniel Pouzzner
166519ae67
wolfssl/openssl/asn1.h: use macro for ASN1_BIT_STRING_FIRST_BYTE to avoid non-const errors under gcc-6.5; tests/api.c: fix uninited data defect in test_wolfssl_EVP_chacha20_poly1305().
2024-08-22 14:41:06 -05:00
Reda Chouk
577cce60df
defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12)
2024-08-22 21:30:57 +02:00
Reda Chouk
7d2ca8db5f
addressing review:
...
- added unit test;
- formatting;
2024-08-22 21:30:57 +02:00
Reda Chouk
2356bec909
no magic values
2024-08-22 21:30:57 +02:00
Reda Chouk
db64d36f00
properly handling the shutdown when multiple ones go on EAGAIN back to
...
back.
2024-08-22 21:30:56 +02:00
gojimmypi
8baf39310f
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-22 12:30:15 -07:00
Sean Parkinson
56adefcdc5
Ed25519: don't define ASM functions when small
...
Small builds don't allow ASM implementations.
Don't have functions defined for ASM when building small
implementation.
2024-08-22 17:05:26 +10:00
Sean Parkinson
08d8a74992
Test fixes
...
api.c:
Update #ifdefs.
sp_int.c:
Fix free call when hardening is disabled.
2024-08-22 16:09:22 +10:00
Sean Parkinson
e99bbf9429
Merge pull request #7875 from douzzer/20240814-debug-trace-errcodes-MP
...
20240814-debug-trace-errcodes-MP
2024-08-22 10:10:45 +10:00
Daniel Pouzzner
1a0bf421bd
Merge pull request #7781 from julek-wolfssl/sssd
...
init sssd support
2024-08-21 19:05:08 -05:00
Sean Parkinson
2505a59dae
Merge pull request #7886 from douzzer/20240819-shebang-bash-env
...
20240819-shebang-bash-env
2024-08-21 14:50:15 +10:00
Daniel Pouzzner
2448d482f4
wolfssl/wolfcrypt/error-crypt.h: move MPI error codes to range {-97, -100} to avoid collisions.
2024-08-20 23:37:21 -05:00
Daniel Pouzzner
05c4955316
linuxkm: add support for WOLFSSL_DEBUG_BACKTRACE_ERROR_CODES using dump_stack().
2024-08-20 23:36:07 -05:00
Daniel Pouzzner
0da78a7ee2
move several MP error codes from wolfssl/wolfcrypt/sp_int.h, wolfssl/wolfcrypt/tfm.h, and wolfssl/wolfcrypt/integer.h, to wolfssl/wolfcrypt/error-crypt.h, harmonizing their names and numbers.
...
wolfssl/wolfcrypt/error-crypt.h: add WC_FIRST_E.
wolfcrypt/src/error.c: add MP error code strings.
wolfssl/error-ssl.h: add WOLFSSL_FIRST_E and WOLFSSL_LAST_E.
wolfcrypt/test/test.c: update error_test() for new error code layout, refactoring the "missing" check.
src/internal.c: use WC_FIRST_E and WC_LAST_E in wolfSSL_ERR_reason_error_string().
src/ssl.c: fix wolfSSL_ERR_GET_REASON() to identify in-range error codes using WC_FIRST_E, WC_LAST_E, WOLFSSL_FIRST_E, and WOLFSSL_LAST_E.
sp_int.h: provide for WOLFSSL_DEBUG_TRACE_ERROR_CODES, and refactor MP error codes as enums, for consistency with other error codes.
wolfcrypt/src/ecc.c: fix 2 identicalInnerCondition's.
2024-08-20 14:09:06 -05:00
Daniel Pouzzner
1c68da282c
portability enhancement: use "#!/usr/bin/env <interpreter>" on all perl scripts and shell scripts that use bash extensions, and use "#!/bin/sh" on the rest.
2024-08-20 13:48:33 -05:00
Juliusz Sosinowicz
305a699398
Add sssd action
2024-08-20 17:12:43 +02:00
David Garske
4f4fb4bd0a
Merge pull request #7888 from douzzer/20240820-configure-silent
...
20240820-configure-silent
2024-08-20 05:35:23 -07:00
Juliusz Sosinowicz
3260a9b680
Address code review
2024-08-20 10:53:44 +02:00
Daniel Pouzzner
c4f978ffc8
Merge pull request #7874 from mpsuzuki/fix-posix-date
...
POSIX does not request "date" command to support "-R" option.
2024-08-20 00:42:52 -05:00
Daniel Pouzzner
0becc347b1
configure.ac: inhibit options.h reminder message when --quiet.
2024-08-20 00:25:15 -05:00
David Garske
294362a0b7
Fixes for building x86 in Visual Studio for non-windows OS.
2024-08-19 13:00:41 -07:00
suzuki toshiya
e417091f61
[configure.ac] spell out RFC 5322 "date" format for POSIX-conforming "date" with no extension.
...
Following to the advice by Daniel Pouzzner (see the discussion in the issue #7874 ),
no need to invoke "env" command to set LC_TIME.
* IEEE Std 1003.1-2024 does not request the "-R" option:
https://pubs.opengroup.org/onlinepubs/9799919799/
* Default "date" in Solaris 11.4 does not support "-R":
https://docs.oracle.com/cd/E88353_01/html/E37839/date-1.html
* Default "date" in HP-UX 11.22 does not support "-R":
https://man.freebsd.org/cgi/man.cgi?query=date&apropos=0&sektion=0&manpath=HP-UX+11.22&arch=default&format=html
* Default "date" in AIX 7 does not support "-R":
https://www.ibm.com/docs/en/aix/7.3?topic=d-date-command
2024-08-18 15:50:54 +09:00
gojimmypi
a0fc2f0497
Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig
2024-08-17 13:42:30 -07:00
Daniel Pouzzner
e562a1c4d1
Merge pull request #7867 from ColtonWilley/cert_copy_option
...
Add new option to always copy cert buffer for each SSL object
2024-08-17 00:07:00 -05:00
Daniel Pouzzner
b412e5f24e
Merge pull request #7879 from dgarske/options_h
...
Improve wolfssl/options.h issues
2024-08-16 23:54:54 -05:00
Daniel Pouzzner
c90aa27e06
Merge pull request #7882 from kojo1/client-help
...
Fix <null> in the help message
2024-08-16 23:13:45 -05:00
Takashi Kojo
723adaad20
Fix <null> in the help message
2024-08-17 12:08:07 +09:00
Daniel Pouzzner
9a693f5e65
Merge pull request #7876 from mpsuzuki/fix-config-stray-redirect
...
Using ">>" with no command in configure can be ambigious for some ancient /bin/sh.
2024-08-16 15:38:39 -05:00
Colton Willey
d5268d8bb5
Update NULL check to be consistent with other checks
2024-08-16 10:46:31 -07:00
Colton Willey
a09e3bb3e7
Use signed variable for length calculation in SendTls13Certificate
2024-08-16 10:43:11 -07:00
Daniel Pouzzner
b693127dcd
Analyzer fixes
2024-08-16 17:24:34 +02:00
Juliusz Sosinowicz
a6a40de249
init sssd support
...
- Refactor OCSP to separate IO callback
- wolfSSL_BIO_reset: fix return
- CheckCertCRL_ex: return CRL_CERT_DATE_ERR instead of ASN_AFTER_DATE_E
- CheckCertCRL_ex: return most relevant error code
- i2d/d2i APIs: correct parameters handling and return codes
- Custom ASN1 structures: major refactor to make it much more versatile
- Use WOLFSSL_ASSERT_SIZEOF_GE where applicable
- wolfSSL_EVP_SignFinal: implement ecc
- wolfSSL_EVP_VerifyFinal: implement ecc
- OBJ_NAME_do_all: bring closer to OpenSSL functionality
- Correct return of *_push api
- Implement:
- OCSP_REQ_CTX API
- d2i_ECPKParameters
- wolfSSL_sk_insert
- OCSP_parse_url
- X509_STORE_set1_param
- X509_get0_subject_key_id
- X509_OBJECT_retrieve_by_subject
- OCSP_sendreq_nbio
2024-08-16 17:22:41 +02:00
David Garske
a9be38eaf0
Improve wolfssl/options.h issues. Fixes #7853 .
2024-08-15 15:49:43 -07:00
David Garske
1190d1bafe
Merge pull request #7873 from SparkiDev/riscv-poly1305-asm
...
RISC-V 64 ASM: Add Poly1305 implementation
2024-08-15 09:40:06 -07:00
Colton Willey
d056b63742
Always free existing SSL cert to be compatible with openssl behavior
2024-08-15 09:24:44 -07:00
suzuki toshiya
bbdf7fc1b0
[configure.ac] ">>" without preceding command does not work in traditional Bourne shell.
2024-08-15 13:59:16 +09:00
Sean Parkinson
ccd8b9aa8d
Merge pull request #7872 from douzzer/20240814-linuxkm-kyber-asm
...
20240814-linuxkm-kyber-asm
2024-08-15 14:46:55 +10:00
Daniel Pouzzner
003ea8bff0
Merge pull request #7868 from dgarske/pq_xms_lmss
...
Fixes for building wolfBoot sources for PQ LMS/XMSS
2024-08-14 23:28:12 -05:00
Daniel Pouzzner
14254e8a6e
Merge pull request #7862 from bigbrett/wc-test-nocryptocb
...
cryptocb test disable option
2024-08-14 23:18:02 -05:00
Daniel Pouzzner
0c24aff183
Merge pull request #7864 from gojimmypi/pr-fix-dh-ret
...
fix interim return variable name when DH enabled
2024-08-14 23:08:29 -05:00
Daniel Pouzzner
39a4780878
Merge pull request #7870 from anhu/pkcs7_correct_issuer
...
Ensure correct issuer is copied into PKCS7 struct during verification
2024-08-14 23:05:20 -05:00
Daniel Pouzzner
a2acc41b3f
wolfcrypt/src/wc_kyber.c: in kyberkey_encapsulate(), don't overallocate "at" for USE_INTEL_SPEEDUP.
2024-08-14 21:51:12 -05:00
Colton Willey
65d7c6a533
Do not overwrite cert in wolfSSL_set_SSL_CTX if one is already set, remove unreachable frees.
2024-08-14 17:07:20 -07:00
Sean Parkinson
3ade7a875e
RISC-V 64 ASM: Add Poly1305 implementation
...
Implementation using standard and vector instructions.
2024-08-15 09:01:34 +10:00
Colton Willey
dcf3af5382
Modify tests to make analyzers happy
2024-08-14 14:33:38 -07:00
Daniel Pouzzner
7a29b1e4fd
add comments explaining dependence on idempotency for race-free dynamics re checkedAESNI, haveAESNI, intel_flags, and sha_method. see #7863 .
2024-08-14 15:23:48 -05:00
Colton Willey
15abea7f20
Use 1 instead of TRUE
2024-08-14 13:19:43 -07:00
Colton Willey
337cddfd90
Rework implementation to use existing weOwnCert logic
2024-08-14 13:13:25 -07:00
Daniel Pouzzner
1fa2d2d625
ASN: move DecodedCert.extSubjKeyIdSz and .extAuthKeyIdSz out of the OPENSSL_EXTRA gate. fixes test.c:certext_test(), broken by f8c968d8d1 for some valid configs.
2024-08-14 14:45:11 -05:00
Daniel Pouzzner
21484ec75a
linuxkm: add asm support for Kyber.
2024-08-14 14:45:11 -05:00
Colton Willey
f4decf84da
Enable cert copy by default for openssl extra
2024-08-14 12:16:14 -07:00
Anthony Hu
8b57e3e741
Merge pull request #7807 from Laboratory-for-Safe-and-Secure-Systems/mlkem_compat
...
ML-KEM compatibility
2024-08-14 13:50:10 -04:00
Anthony Hu
498dadad97
Ensure correct issuer is copied into PKCS7 struct during verification
2024-08-14 11:29:02 -04:00
Juliusz Sosinowicz
055d68db9c
Merge pull request #7804 from douzzer/20240728-EVP_PKEY_is_a
...
20240728-EVP_PKEY_is_a
2024-08-14 16:36:06 +02:00
Daniel Pouzzner
ee966beb77
wolfcrypt/src/evp.c: add wolfSSL_EVP_PKEY_is_a() and test_EVP_PKEY_is_a(). also add test_EVP_CIPHER_key_length() and add missing RC4 clause to wolfSSL_EVP_Cipher_key_length().
2024-08-14 09:23:02 -05:00
David Garske
01eaa56290
Fixes for building wolfBoot sources for PQ LMS/XMSS.
...
* Don't throw `#error "This code requires libxmss"`, just gate ext_xmss on HAVE_LIBXMSS. Same for LMS.
2024-08-13 14:10:45 -07:00
Daniel Pouzzner
7dbf2a06dd
Merge pull request #7865 from bandi13/fixMemOverrunInTest
...
Fix possible memory overrun in tests
2024-08-13 15:59:00 -05:00
Colton Willey
ef500c2e62
Add new option to always copy cert buffer for each SSL object
2024-08-13 13:32:25 -07:00
Andras Fekete
ab7bc29006
Fix curl.yml
2024-08-13 16:18:29 -04:00
Andras Fekete
f8c968d8d1
Fix possible memory overrun
2024-08-13 13:43:54 -04:00
gojimmypi
e0e05766ac
fix interim return variable name when DH enabled
2024-08-13 09:10:22 -07:00
Fernando Oleo Blanco
5ea22effcc
Update documentation
2024-08-13 10:56:25 +02:00
Daniel Pouzzner
3875a1855e
Merge pull request #7859 from SparkiDev/aarch64_poly1305_asm_improv
...
Aarch64 Poly1305 ASM: Improve performance
2024-08-12 18:35:49 -05:00
Daniel Pouzzner
7fac450c92
Merge pull request #7860 from dgarske/have_config
...
Add missing config.h on .c files
2024-08-12 18:33:04 -05:00
Daniel Pouzzner
869431495f
Merge pull request #7861 from bandi13/smallPatches
...
No need to check for dependencies
2024-08-12 18:30:33 -05:00
Daniel Pouzzner
53f5ded48d
Merge pull request #7849 from miyazakh/renesas_tsip_update
...
RX72N support update
2024-08-12 18:26:32 -05:00
Brett Nicholas
10a3634e86
cmake support
2024-08-12 16:01:15 -06:00
Brett Nicholas
8df5d61179
add optional cryptocb test disable macro to wolfCrypt tests
2024-08-12 15:16:33 -06:00
Andras Fekete
e2d2915fc1
No need to check for dependencies
...
Suggested in https://github.com/wolfSSL/wolfssl/issues/7857#issuecomment-2283962525
2024-08-12 14:58:02 -04:00
David Garske
08622bab39
Fix to remove NO_BIG_INT from MICROCHIP_PIC32 in settings.h.
2024-08-12 09:29:20 -07:00
David Garske
537827ebde
Add missing config.h on some .c files.
2024-08-12 09:29:07 -07:00
Sean Parkinson
3725594020
Aarch64 Poly1305 ASM: Improve performance
...
Do as many multiplications in base 64 rather than 26 with normal integer
registers.
2024-08-12 12:47:44 +10:00
Sean Parkinson
9f9e89082f
Merge pull request #7854 from embhorn/rsa_min_1024
...
Update default RSA min to 1024
2024-08-12 10:04:13 +10:00
Fernando Oleo Blanco
bec3cd8b6f
Document Alire use
2024-08-11 18:36:54 +02:00
Fernando Oleo Blanco
ae7e7e716a
Update upstream
2024-08-10 13:56:14 +02:00
Kaleb Himes
f660299de0
Merge pull request #7856 from douzzer/20240809-fips-dev-feature-unlock
...
20240809-fips-dev-feature-unlock
2024-08-09 16:00:30 -06:00
JacobBarthelmeh
85bab19090
Merge pull request #7845 from ColtonWilley/pkcs7_digest_absent_params
...
Add option for absent hash params in PKCS7
2024-08-09 15:56:28 -06:00
Hideki Miyazaki
debbea3843
put back the RNG
...
comment to CUSTOM RAND GENERATE BLOCK
2024-08-10 06:45:18 +09:00
Daniel Pouzzner
0d84597d78
Merge pull request #7855 from embhorn/zd18433
...
Fix example settings
2024-08-09 15:32:17 -05:00
Daniel Pouzzner
84b91d0e1e
Merge pull request #7841 from mrdeep1/dtls_downgrade_cid
...
Support DTLS1.3 downgrade when server supports CID
2024-08-09 15:30:20 -05:00
Daniel Pouzzner
bba3995434
Merge pull request #7834 from oltolm/cmake_fix
...
cmake: fix parsing WOLFSSL_DEFINITIONS
2024-08-09 15:24:15 -05:00
Daniel Pouzzner
d351430222
Merge pull request #7840 from mrdeep1/dtls_downgrade
...
Support DTLS1.3 downgrade when server sends multiple handshakes in packet
2024-08-09 15:22:46 -05:00
Daniel Pouzzner
0d952c3343
Merge pull request #7850 from bandi13/dockerfileFixes
...
Dockerfile fixes
2024-08-09 15:19:59 -05:00
Daniel Pouzzner
656ba24de5
Merge pull request #7852 from SparkiDev/sp_no_rng_fix
...
SP: no RNG fix
2024-08-09 15:00:15 -05:00
Daniel Pouzzner
e142b16ae2
Merge pull request #7848 from miyazakh/fips_wcPBKDF2ex
...
Check klen in byte in wc_PBKDF2_ex
2024-08-09 14:49:53 -05:00
Daniel Pouzzner
034e13298f
Merge pull request #7847 from SparkiDev/sp_xfree_2
...
SP: Remove check of NULL before XFREE
2024-08-09 14:47:05 -05:00
Daniel Pouzzner
98f8ab085e
configure.ac: when FIPS_VERSION==dev, unlock features to allow user-forced enablement/disablement. also, add line breaks for clarity on the similar clauses in the v5* section.
2024-08-09 14:38:22 -05:00
Andras Fekete
edb95ae7ae
Clear out remnants of old code
2024-08-09 14:22:38 -04:00
Colton Willey
0a5ebaf806
Change SetAlgoIdEx to be local
2024-08-09 11:22:21 -07:00
Eric Blankenhorn
373f5ee9ae
Fix example settings
2024-08-09 13:06:29 -05:00
Eric Blankenhorn
9dddd99b3b
Update default RSA min to 1024
2024-08-09 10:41:41 -05:00
Sean Parkinson
17a09d9853
SP: no RNG fix
...
Don't use RNG API when WC_NO_RNG is defined.
2024-08-09 10:18:12 +10:00
Sean Parkinson
2a08d3001c
Merge pull request #7846 from douzzer/20240806-debug-trace-errcodes-backtrace
...
20240806-debug-trace-errcodes-backtrace
2024-08-09 09:45:01 +10:00
Daniel Pouzzner
c25d86c6c7
support/gen-debug-trace-error-codes.sh: tweak for compatibility with mawk.
2024-08-08 15:57:14 -05:00
Andras Fekete
085b78994d
Update buildAndPush script
2024-08-08 16:44:22 -04:00
Andras Fekete
63ec8fe83a
Add in 'libbacktrace'
2024-08-08 16:14:03 -04:00
Andras Fekete
e1502e7f5b
Need a newer version that doesn't complain about libz
2024-08-08 15:39:16 -04:00
Daniel Pouzzner
a75d520727
src/pk.c: fix a null deref (nullPointerRedundantCheck) in wolfSSL_RSA_GenAdd() added in d350ba6c41.
2024-08-08 11:40:57 -05:00
Daniel Pouzzner
24e34aa41a
wolfcrypt/src/logging.c: in WOLFSSL_BUFFER(), on averted overrun, log a buffer error rather than silently failing; in wc_backtrace_render(), fix !WOLFSSL_MUTEX_INITIALIZER race mitigation code.
2024-08-08 10:49:05 -05:00
Daniel Pouzzner
f5e775fe95
wolfcrypt/src/wc_kyber.c: fixes for null derefs (nullPointerRedundantCheck) in wc_KyberKey_MakeKeyWithRandom() and wc_KyberKey_Decapsulate() added in d350ba6c41.
2024-08-08 09:13:56 -05:00
Daniel Pouzzner
763ced668e
fixes for defects identified by cppcheck and clang-tidy on --enable-debug builds: null deref in tests/api.c:load_pem_key_file_as_der(), redundant declarations in wolfcrypt/benchmark/benchmark.c, and numerous unchecked XSNPRINTF()s in wolfcrypt/src/logging.c and src/internal.c.
2024-08-08 09:00:42 -05:00
Daniel Pouzzner
5f6067c3e1
add --enable-debug-trace-errcodes=backtrace.
...
* uses libbacktrace to enhance existing "ERR TRACE" messages with backtraces, rendered in same format as the sanitizers.
* adds wc_backtrace_render() and some related callbacks to wolfcrypt/src/logging.c.
* adds an overrideable WOLFSSL_DEBUG_BACKTRACE_RENDER_CLAUSE to the WC_ERR_TRACE() mechanism in wolfssl/wolfcrypt/error-crypt.h.
2024-08-08 09:00:42 -05:00
Hideki Miyazaki
493022b4b4
revert 2b4acf5027
...
fix build failure when no using TSIP
2024-08-08 18:34:36 +09:00
Hideki Miyazaki
180ad206fc
check klen in byte
2024-08-08 08:52:08 +09:00
Sean Parkinson
abc910c03c
SP: Remove check of NULL before XFREE
...
Removed more checks of NULL before XFREE.
Formatting fixes as well.
2024-08-08 09:36:05 +10:00
Daniel Pouzzner
0ab1f1969d
Merge pull request #7828 from miyazakh/zd18141_ocspv2multi
...
Sever side checks OCSP even if it uses v2 multi
2024-08-07 17:40:23 -05:00
Daniel Pouzzner
92952a5538
Merge pull request #7839 from bandi13/noIfXFREE
...
No if xfree
2024-08-07 17:08:12 -05:00
Andras Fekete
38d191c159
More PR comment fixes
2024-08-07 16:56:57 -04:00
Colton Willey
75c3030554
Add option for absent hash params in PKCS7
2024-08-07 11:07:45 -07:00
Andras Fekete
a31d8c5ce7
Addressing PR comments
2024-08-07 11:14:15 -04:00
Sean Parkinson
632d9653da
Merge pull request #7842 from embhorn/zd18417
...
Fix template DecodeSubjDirAttr to set extSubjDirAttr data
2024-08-07 18:29:04 +10:00
Sean Parkinson
18aa2b8d78
Merge pull request #7843 from dgarske/fix_sp_small_gcc
...
Fix for SP small calling label with GCC
2024-08-07 09:23:46 +10:00
Daniel Pouzzner
6116d5edb4
Merge pull request #7824 from anhu/maxq10xx_update
...
Update to the maxq10xx support
2024-08-06 18:01:39 -05:00
Sean Parkinson
2cc5ecf117
Merge pull request #7759 from JacobBarthelmeh/poly1305
...
w64wrapper for poly1305
2024-08-07 07:31:25 +10:00
Andras Fekete
b6a9c38950
Addressing PR comments
2024-08-06 15:29:32 -04:00
David Garske
91ea7ab206
Fix for SP small calling label with GCC (broken in PR #7753 ).
2024-08-06 11:05:40 -07:00
David Garske
a30d9c9818
Merge pull request #7833 from SparkiDev/riscv-sha512-asm
...
RISC-V 64: Add assembly code for SHA-512
2024-08-06 10:39:10 -07:00
Anthony Hu
29a5cc39f2
Duplicate code removed
2024-08-06 10:19:09 -07:00
Anthony Hu
3cf3f297ba
Update to the maxq10xx support
2024-08-06 10:19:09 -07:00
Andras Fekete
101088c390
Fix potential NULL dereference
2024-08-06 12:35:01 -04:00
Eric Blankenhorn
1c2b47d8ad
Fix template DecodeSubjDirAttr to set extSubjDirAttr data
2024-08-06 11:34:14 -05:00
Jon Shallow
f1c918c261
Support DTLS1.3 downgrade when server supports CID
...
With --enable-dtlscid, a client sending a Client Hello to a DLTS1.2
server that supports CID, the server provides the appropriate CID and
assumes that CID has been negotiated.
However, in the case of MbedTLS, it then rejects packets that do not
match its expected CID from the client - as wolfSSL no longer sends
the CID as it is not DTLS1.2.
https://datatracker.ietf.org/doc/html/rfc9147#section-4
If a Connection ID is negotiated, then it MUST be contained in all datagrams.
This fix drops the CID if a Hello Verify Request is received, so the
second Client Hello does not include the CID.
https://datatracker.ietf.org/doc/html/rfc6347#section-4.2.1
When responding to a HelloVerifyRequest, the client MUST use the same
parameter values (version, random, session_id, cipher_suites,
compression_method) as it did in the original ClientHello.
Dropping the CID extension does not violate this.
2024-08-06 16:48:04 +01:00
Andras Fekete
3a83c33499
Fix compilation error
2024-08-06 11:44:32 -04:00
Daniel Pouzzner
6fea4f1266
Merge pull request #7803 from SparkiDev/dilithium_hint_check_fix
...
Dilithium: fix check hint
2024-08-06 10:25:35 -05:00
Jon Shallow
bcbd701155
Support DTLS1.3 downgrade when server sends multiple handshakes in packet
...
If the server sends Server Hello, Server Key Exchange and Server Hello Done
in a single DTLS packet, but for DTLS1.2 in response to a client DTLS1.3
request, then FIRST_REPLAY state does not occur until the server re-sends
the packet. At this point wolfSSLconnect() gets used and all bursts into
life.
When processing handshakes in wolfSSL_connect_TLSv13() for case
HELLO_AGAIN_REPLY, downgrade to using wolfSSLconnect() to continue
processing the remaining handshakes in the packet.
Found when using Mbed TLS for the server.
2024-08-06 16:17:48 +01:00
JacobBarthelmeh
f1ace62363
add null sanity check and adjust add
2024-08-06 09:12:17 -06:00
Andras Fekete
f419e2351b
Remove NULL test with 'ptr = NULL' at the end
2024-08-06 10:55:37 -04:00
Andras Fekete
d350ba6c41
remove NULL test with XFREE arguments with dereference
2024-08-06 10:44:59 -04:00
Andras Fekete
d6a7187538
Programmatically remove NULL test with { XFREE() }
2024-08-06 10:37:43 -04:00
Daniel Pouzzner
f7fc0695c1
Merge pull request #7837 from bandi13/fixMemLeak
...
Fix memory leak
2024-08-06 09:37:10 -05:00
Andras Fekete
208f2d6781
One more occurrence
2024-08-06 10:32:50 -04:00
Andras Fekete
eb0c64d79a
Remove NULL test when there is a dereference
2024-08-06 10:29:02 -04:00
Andras Fekete
d7a0f49906
Programmatically remove NULL test before XFREE
2024-08-06 10:20:45 -04:00
Hideki Miyazaki
c947fc8fda
sever side checks OCSP even if it uses v2 multi
2024-08-06 13:01:56 +09:00
Sean Parkinson
4062b94fb3
RISC-V 64: Add assembly code for SHA-512
...
Cleanup RISC-V 64 SHA-256 by removing unused rev_idx.
2024-08-06 10:21:48 +10:00
Sean Parkinson
ac4f3fb75f
Merge pull request #7831 from space88man/RSA-callbacks-fulldata
...
wolfssl/wolfcrypt/pkcs11.sh: add full data RSA PSS mechs
2024-08-06 09:51:57 +10:00
S-P Chan
5083489174
wolfssl/wolfcrypt/pkcs11.sh: add full data RSA PSS mechs
2024-08-06 07:09:47 +08:00
JacobBarthelmeh
cc2ed4a75b
add w64Add for build with word64
2024-08-05 16:47:35 -06:00
Sean Parkinson
fc19c36bf8
Dilithium: fix check hint
...
When all indeces are 0, then don't check hints against indeces.
2024-08-06 08:22:47 +10:00
Andras Fekete
a0b2da98e6
Remove if(ptr) XFREE(ptr)
2024-08-05 17:47:59 -04:00
Tobias Frauenschläger
2a2f9d5916
ML-KEM compatibility
...
As the WolfSSL implementation of the PQC KEM algorithm kyber also
supports the ML-KEM draft version (enabled by `WOLFSSL_ML_KEM`), we have
to update the groups code point to be compatible with other TLS
implementations (e.g. OQS provider).
Also updated the reference to the source of the values to the current
OQS Github.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-08-05 21:19:15 +02:00
Andras Fekete
df0663b70e
Fix memory leak
...
CC="gcc -fsanitize=address" ./configure --enable-dtls --enable-opensslextra --enable-debug CFLAGS="-DNO_WOLFSSL_SERVER" && make && tests/unit.test
2024-08-05 14:45:35 -04:00
oltolm
ea307c79e5
cmake: fix parsing WOLFSSL_DEFINITIONS
2024-08-05 20:39:23 +02:00
David Garske
039853cbd5
Merge pull request #7813 from SparkiDev/no_system_headers
...
Don't attempt to include system headers when not required
2024-08-05 11:32:55 -07:00
David Garske
792f81382c
Merge pull request #7836 from bigbrett/apple-universal-readme-curl-instructions
...
apple-universal README update: add curl instructions
2024-08-05 10:51:47 -07:00
David Garske
b26c34c695
Merge pull request #7830 from kojo1/doc-hmac
...
clarify description, wc_HmacSetKey
2024-08-05 10:51:15 -07:00
Sean Parkinson
0e0c3634ec
Don't attempt to include system headers when not required
...
Some builds don't require system headers: no filesystem and single
threaded.
2024-08-05 10:49:16 -07:00
András Fekete
ab2256c088
Merge pull request #7835 from julek-wolfssl/tar-artifacts
...
Use tar to preserve links
2024-08-05 13:21:58 -04:00
Juliusz Sosinowicz
332c64a77c
docker-OpenWRT.yml: Follow links
2024-08-05 18:31:04 +02:00
Juliusz Sosinowicz
5320b425e7
Use tar to preserve links
...
Something broke in the actions/download-artifact action and it is not preserving symbolic links. It didn't get a new release so my guess is that something was updated in the node environment or in npm. This is a future proof solution to preserve the fs structure between upload and download.
2024-08-05 18:23:20 +02:00
Brett Nicholas
573ade3178
added curl instructions to apple-universal README
2024-08-05 10:22:41 -06:00
Sean Parkinson
54370cc51e
Merge pull request #7829 from douzzer/20240804-SetDNSEntry-double-free
...
20240804-SetDNSEntry-double-free
2024-08-05 12:51:31 +10:00
Takashi Kojo
8368a32e7e
clarify description
2024-08-05 05:59:36 +09:00
Daniel Pouzzner
d65be7af21
wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: in SetDNSEntry(), defer XFREE(dnsEntry, ...) until end (fixes double free); add PBE_NONE to enum PBESTypes; in EncryptContent(), initialize id to PBE_NONE to fix a -Wmaybe-uninitialized (CheckAlgo() can leave it unchanged even when returning success).
2024-08-04 15:41:52 -05:00
Daniel Pouzzner
9aa0742baa
Merge pull request #7798 from dgarske/asn_macros
...
ASN macro simplification
merged with github CI tests failing due to unrelated upstream changes (same tests all previously succeeded on this PR, with only 25d14f1937 added in the meantime).
supplementary testing with `wolfssl-multi-test.sh ... super-quick-check` after rebase on then-current `master` 15e99c8eff .
2024-08-02 16:36:50 -05:00
David Garske
35b45aa015
Merge pull request #7826 from douzzer/20240802-linuxkm-kernel-6v11
...
20240802-linuxkm-kernel-6v11
2024-08-02 14:03:38 -07:00
David Garske
25d14f1937
Fail with NOT_COMPILED_IN if someone tries to use ConfirmSignature with NO_ASN_CRYPT. Also default to signature failed.
2024-08-02 08:25:15 -07:00
Daniel Pouzzner
19ea0b22d0
linuxkm: update for kernel 6.11 (__kvmalloc_node_noprof and __kmalloc_cache_noprof).
2024-08-02 10:16:51 -05:00
David Garske
b12a773821
Merge pull request #7818 from SparkiDev/riscv-chacha-asm
...
RISC-V ChaCha20: assembly implementations
2024-08-02 07:52:53 -07:00
Sean Parkinson
423c1d3e57
fixup
2024-08-02 11:58:50 +10:00
Sean Parkinson
01afe89fa2
Merge pull request #7822 from anhu/WOLFSSL_NO_GOOGLE_TEST
...
Only run the google test if the WOLFSSL_EXTERNAL_TEST env var is set.
2024-08-02 09:06:21 +10:00
David Garske
a18d0161ef
Fixes for minor implicit cast warnings and line length. Also fixed benchmark.c error without ChaCha and unused encrypt_only.
2024-08-01 15:26:02 -07:00
Chris Conlon
a918c0e080
Add TLS13_RSA_PSS_SIGN_CB_NO_PREHASH for TLS 1.3 RSA-PSS PK sign callback without prehash
2024-08-01 15:41:28 -06:00
Anthony Hu
bd88078639
Change to use already existing WOLFSSL_EXTERNAL_TEST
2024-08-01 17:10:53 -04:00
Anthony Hu
1199d5a5a8
If the WOLFSSL_NO_GOOGLE_TEST env var is set, don't run the google test.
2024-08-01 16:41:22 -04:00
David Garske
15e99c8eff
Merge pull request #7820 from Laboratory-for-Safe-and-Secure-Systems/sha3_cmake
...
Build SHA3 assembly with INTEL_SPEEDUP
2024-08-01 11:40:09 -07:00
David Garske
c3adf6635b
Merge pull request #7775 from gojimmypi/pr-arduino-script
...
Update Arduino publishing script for 5.7.2 release
2024-08-01 11:24:40 -07:00
David Garske
9f62ff6e38
Merge pull request #7691 from julek-wolfssl/ntp-action
...
Add ntp action
2024-08-01 11:19:13 -07:00
David Garske
d2373246ad
Merge pull request #7657 from julek-wolfssl/cyrus-sasl-test-retry
...
Retry sasl tests as they appear to be flaky
2024-08-01 11:18:54 -07:00
David Garske
e1c1b5019e
Merge pull request #7651 from julek-wolfssl/rng-tools-action
...
Add rng-tools action
2024-08-01 11:16:17 -07:00
David Garske
16d05972ed
Merge pull request #7819 from julek-wolfssl/mosq-tests-retry
...
Retry mosquitto tests as they appear to be flaky
2024-08-01 11:15:53 -07:00
David Garske
65283fb9bb
Improvement for the --enable-asn=nocrypt. Note: This option skips certificate signature checking, so make check TLS expected failures do not pass. Cleanup of the api.c headers / macros.
2024-08-01 10:27:22 -07:00
Tobias Frauenschläger
aee446f3e5
Build SHA3 assembly with INTEL_SPEEDUP
...
Make sure the file `sha3_asm.S` is compiled when `WOLFSSL_INTEL_ASM` is
enabled using CMake.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2024-08-01 16:31:18 +02:00
Juliusz Sosinowicz
4c86219afa
Retry mosquitto tests as they appear to be flaky
2024-08-01 14:17:19 +02:00
Juliusz Sosinowicz
edb5d09e6c
Add rng-tools action
2024-08-01 13:56:37 +02:00
Juliusz Sosinowicz
90861d9e6d
Retry sasl tests as they appear to be flaky
2024-08-01 12:05:33 +02:00
Juliusz Sosinowicz
3943e1324f
Add ntp action
2024-08-01 11:54:47 +02:00
Sean Parkinson
ebb49b6e68
RISC-V ChaCha20: assembly implementations
...
ChaCha20:
scalar and vector implementations
vector implementations doing 6, 4, 2, 1 block at a time.
scalar implemetations using roriw and pack
vector implementations using VROR_VI and roriw.
RISC-V SHA-256: avoid using s0 if it can be helped.
2024-08-01 17:51:59 +10:00
Sean Parkinson
1b8254d668
Merge pull request #7808 from Laboratory-for-Safe-and-Secure-Systems/preTBS_memory_leak
...
Fix memory leak in wc_GeneratePreTBS()
2024-08-01 08:47:47 +10:00
Sean Parkinson
1bc085358a
Merge pull request #7817 from dgarske/wildcard_c
...
Fix for .c files to ensure macro guards for wildcard
2024-08-01 08:46:35 +10:00
David Garske
1dd94bb0cb
Fix for .c files to ensure macro guards for wildcard.
2024-07-31 14:23:05 -07:00
David Garske
54997837f4
Merge pull request #7805 from julek-wolfssl/wolfSSL_X509_REQ_add1_attr_by_NID-push-cleanup
...
wolfSSL_X509_REQ_add1_attr_by_NID: clean up push call for analyzers
2024-07-31 13:16:30 -07:00
David Garske
1ade735579
Merge pull request #7815 from douzzer/20240731-Wconversion
...
20240731-Wconversion
2024-07-31 13:15:08 -07:00
David Garske
7023d5212c
Fix for --enable-all --enable-asn=original.
2024-07-31 13:10:52 -07:00
Daniel Pouzzner
6017c86e5d
wolfcrypt/src/wc_port.c: fix -Wconversions in wc_strdup_ex().
2024-07-31 19:36:59 +00:00
David Garske
548a2c6d8e
Fixed issues building with nocrypt. Improved logic on ASN_BER_TO_DER. Improved logic on unknown extension callback (new WC_ASN_UNKNOWN_EXT_CB gate).
2024-07-31 09:42:46 -07:00
Sean Parkinson
407b78962e
Merge pull request #7811 from lealem47/removeNULL
...
Remove HAVE_NULL_CIPHER from --enable-openssh
2024-07-31 21:55:13 +10:00
Sean Parkinson
dbf88e4c73
Merge pull request #7779 from rizlik/ocsp-dfree-fix
...
ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-31 09:31:42 +10:00
Sean Parkinson
ad76038b86
Merge pull request #7812 from dgarske/fix_tls12_secret_callback
...
Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret
2024-07-31 09:29:09 +10:00
David Garske
6a1139a6ee
Merge pull request #7758 from SparkiDev/riscv-sha256-asm
...
RISC-V 64: Add assembly code for SHA-256
2024-07-30 16:23:57 -07:00
Sean Parkinson
31cb72ed8a
Merge pull request #7788 from anhu/kyber_with_fips
...
Allow kyber to be built with FIPS
2024-07-31 09:04:29 +10:00
David Garske
1d9b86e2b0
Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret. API test cleanups (no sleep needed).
2024-07-30 11:54:17 -07:00
David Garske
877c1d781f
Fix bad C89 XSNPRINTF remap.
2024-07-30 10:39:48 -07:00
David Garske
bbbc1e074c
Fixes for clang-tidy.
2024-07-30 10:35:21 -07:00
David Garske
afb6fe6c5f
Fixes for building due to missing OCSP and DecodePolicyOID (--enable-curl and --enable-openssh).
2024-07-30 10:35:21 -07:00
David Garske
20f7d6f9f4
ASN macro simplification. Added new --enable-asn=all and WOLFSSL_ASN_ALL option. Added granular macros for ASN features like: WOLFSSL_ASN_CA_ISSUER, WOLFSSL_ASN_PARSE_KEYUSAGE, WOLFSSL_ASN_TIME_STRING, WOLFSSL_OCSP_PARSE_STATUS.
2024-07-30 10:35:20 -07:00
Lealem Amedie
fb3185bb72
Remove HAVE_NULL_CIPHER from --enable-openssh
2024-07-30 10:46:56 -06:00
András Fekete
50d60bf0e7
Code sonar cleanup ( #7782 )
...
* Fix Warning 826814.9284764
* Fix Warning 826836.9285316
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2024-07-30 09:42:43 -07:00
Daniel Pouzzner
f4c16d22a1
Merge pull request #7806 from SparkiDev/dilithium_der_fix
...
Dilithium: DER encoding fix
2024-07-30 09:43:39 -05:00
Tobias Frauenschläger
36d01cdb9b
Fix memory leak in wc_GeneratePreTBS()
...
In the wc_GeneratePreTBS() method (used for WOLFSSL_DUAL_ALG_CERTS
support), there was a workaround for alt names in certificates, as the
CopyDecodedToX509() method wasn't properly copying them. As a proper
copy mechanism is implemented now, we have to remove the workaround as
it now causes a memory leak of the copied values.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-30 10:38:48 +02:00
Sean Parkinson
f1e01e4636
RISC-V 64: Add assembly code for SHA-256
...
Move common defines out of AES file to header file.
2024-07-30 12:21:13 +10:00
Sean Parkinson
7da6149250
Merge pull request #7792 from dgarske/sprintf
...
Fix for using sprintf in test.h
2024-07-30 09:18:50 +10:00
Sean Parkinson
1681cb2d7e
Dilithium: DER encoding fix
...
Underlying function SetAsymKeyDer() changed semantics.
Update tests to reflect new behaviour.
2024-07-30 09:09:26 +10:00
David Garske
f9dc5e9f4d
Fixes for uses of deprecated sprintf. If C89 remap XSNPRINTF to use sprintf.
2024-07-29 14:03:44 -07:00
David Garske
6d39a78dba
Fix for using sprintf.
...
Resolves warning:
```
./configure CC="gcc -fsanitize=address" && make
In file included from ./wolfclu/clu_header_main.h:71:
/usr/local/include/wolfssl/test.h:1103:18: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
strLen = sprintf(serialMsg, " %s", words[3]);
^
```
2024-07-29 11:22:32 -07:00
David Garske
3fc7be8e3b
Merge pull request #7793 from gojimmypi/pr-platformio-update
...
Update PlatformIO examples to wolfssl 5.7.2
2024-07-29 11:09:30 -07:00
Juliusz Sosinowicz
2d5462d77d
wolfSSL_X509_REQ_add1_attr_by_NID: clean up push call for analyzers
2024-07-29 18:18:07 +02:00
Marco Oliverio
31380aca13
fixup! ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-29 15:00:41 +00:00
Sean Parkinson
034af8d99c
Merge pull request #7787 from dgarske/stm32u5a
...
Fix STM32 Hash FIFO and add support for STM32U5A9xx
2024-07-29 17:36:52 +10:00
Sean Parkinson
3b74a64029
Merge pull request #7791 from aidangarske/privkeytoder_fix2
...
`api.c` and `asn.c` changes to allow 0 to be passed in and expanded coverage on test cases.
2024-07-29 09:40:20 +10:00
András Fekete
b1765ca6b4
Merge pull request #7785 from dgarske/asn_original
...
Fixes for ASN original
2024-07-26 14:49:13 -04:00
David Garske
5e58affd5d
Merge pull request #7789 from SparkiDev/test_ssl_load
...
SSL loading of keys/certs: testing and fixes
2024-07-26 11:48:13 -07:00
Sean Parkinson
f7094ff3c4
Dilithium: add option to precalc with small sign ( #7744 )
...
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC added.
It allocates memory for and pre-calculates s1, s2 and t0.
This saves decoding the vectors repeatedly in each signature trial.
2024-07-26 11:46:55 -07:00
David Garske
c3b5322f86
Merge pull request #7753 from SparkiDev/cortexm_label_fix_2
...
Cortex-M/Thumb2 ASM: fix label
2024-07-26 11:45:09 -07:00
Sean Parkinson
caab2c2dca
SSL loading of keys/certs: testing and fixes
...
Added tests to cover ssl_load.c functions.
Fixes from testing.
pk.c: renamed wolfssl_dh_load_key to wolfssl_dh_load_params as it
doesn't handle keys - just parameters.
2024-07-26 11:43:10 +10:00
Daniel Pouzzner
92f1c6e339
Merge pull request #7794 from anhu/custom_ext_stop
...
Stop testing custom extensions in dual alg cert tests.
2024-07-25 16:33:56 -05:00
JacobBarthelmeh
56eed9e059
Merge pull request #7795 from douzzer/20240725-array_add-Wconversion
...
20240725-array_add-Wconversion
2024-07-25 15:19:25 -06:00
Daniel Pouzzner
b40913e80c
wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -Wconversion added in b28e22aef0, itself a fix for a defect added in ed11669f3c (root cause of warning is implicit type promotion).
2024-07-25 15:25:32 -05:00
Anthony Hu
73dc9baaf9
Stop testing custom extensions in dual alg cert tests.
2024-07-25 16:09:19 -04:00
gojimmypi
c2e8121462
Update PlatformIO examples to wolfssl 5.7.2
2024-07-25 12:04:58 -07:00
David Garske
42930b28f3
Merge pull request #7790 from JacobBarthelmeh/random
...
fix for casting with add
2024-07-25 09:13:23 -07:00
aidan garske
55540d03e7
fix for PR#7786 BUFFER_E bad case
2024-07-25 09:03:19 -07:00
JacobBarthelmeh
b28e22aef0
fix for casting with add
2024-07-25 09:16:05 -06:00
aidan garske
dace3acd4d
api.c and asn.c changes to allow 0 to be passed in and expanded coverage on test cases
...
(cherry picked from commit 8572f67e60d419ddd74d4a2b7051dcaa7d0ca6b4)
2024-07-25 08:09:37 -07:00
Anthony Hu
181c408d17
Allow kyber to be built with FIPS
2024-07-24 20:36:51 -04:00
David Garske
c4f73f5955
Peer review cleanups.
2024-07-24 16:57:51 -07:00
Sean Parkinson
324e714a6a
Merge pull request #7750 from space88man/wip-padding-refactor
...
PKCS#11 RSA Padding Offload
2024-07-25 09:20:01 +10:00
David Garske
42403a526e
Fix to resolve STM32 hash FIFO. Simplify logic for ensuring FIFO gets filled before doing a save/restore. ZD 18294
2024-07-24 16:06:04 -07:00
Kaleb Himes
3a4788b7bb
Merge pull request #7783 from douzzer/20240723-AesGcmXcrypt-NULL-in-checks
...
20240723-AesGcmXcrypt-NULL-in-checks
2024-07-24 15:33:42 -06:00
David Garske
7f7d94abd5
Fixes for ASN original (old) to support checking int leading 0 and invalid OID. Disable invalid UTF8 test for old ASN (only supported with newer ASN template).
2024-07-24 12:35:37 -07:00
David Garske
97dcf123f0
Merge pull request #7780 from ColtonWilley/update_zephyr_readme
...
Update zephyr readme
2024-07-24 10:42:44 -07:00
David Garske
4b9d89d387
Fix autoconf issue with ==
2024-07-24 09:10:25 -07:00
David Garske
3e2123f0b3
Disable the ECC custom curve tests for original (old) ASN.
2024-07-24 08:45:19 -07:00
David Garske
007f9ea39d
Fix to restore --enable-asn=original. Fixes for building with ASN original (old). Add the new limit checks for alt names and subtree to the old ASN code.
2024-07-24 08:28:25 -07:00
Marco Oliverio
a1fbfa94d2
tests: add OCSP callback fails test
2024-07-24 15:20:11 +00:00
S-P Chan
d2d71c276d
wolfssl/wolfcrypt/pkcs11.h: RSA PKCS/PSS/OAEP related operations
2024-07-24 22:47:27 +08:00
David Garske
d0782a97ce
Merge pull request #7773 from Laboratory-for-Safe-and-Secure-Systems/kyber_compat
...
Kyber fixes
2024-07-24 07:37:10 -07:00
Tobias Frauenschläger
e2b642d4ab
WolfSSL Kyber and CMake fixes
...
* Make sure wc_kyber implementation is compiled using CMake (also for
Zephyr)
* Fix compilation issue when Liboqs is also enabled
* Fix WOLFSSL_INTEL_ASM and WOLFSSL_ARM_ASM CMake options
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-24 09:55:29 +02:00
Daniel Pouzzner
f8726148df
wolfcrypt/src/aes.c: in wc_AesGcmEncrypt() and wc_AesGcmDecrypt(), check and return BAD_FUNC_ARG for nonzero sizes associated with null pointers.
2024-07-23 19:07:32 -05:00
Sean Parkinson
3284f53574
Cortex-M/Thumb2 ASM: fix label
...
IAR doesn't like %=.
Fix code to be consistent in use of labels and branch instructions.
2024-07-24 09:20:40 +10:00
Sean Parkinson
a34ea32f52
Merge pull request #7730 from anhu/unknownExtCallbackEx
...
Extend the unknown extension callback.
2024-07-24 08:37:44 +10:00
Colton Willey
e1995b8313
Update zephyr readme with link to new instructions for Zephyr TLS socket support
2024-07-23 09:56:17 -07:00
David Garske
140abe6c72
Merge pull request #7746 from douzzer/20240711-linuxkm-cross-compilation
...
20240711-linuxkm-cross-compilation
2024-07-23 09:26:39 -07:00
Marco Oliverio
bb60c58800
ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-23 16:02:07 +00:00
Daniel Pouzzner
6ee22de999
linuxkm: initial support for cross-compilation.
...
also, additional backward-compatibility measures around cp and clean recipe in linuxkm/Makefile.
also, in sp_int.c, tweak DECL_DYN_SP_INT_ARRAY() to use an explicit XMEMSET() to clear n[], to avoid unshimmable implicit memset() from gcc on aarch64.
2024-07-23 10:29:03 -05:00
David Garske
8f908e76f9
Merge pull request #7776 from douzzer/20240722-fixes
...
20240722-fixes
2024-07-23 06:46:38 -07:00
David Garske
7c6eb7c4a1
Merge pull request #7751 from SparkiDev/ecc_koblitz_ssl
...
ECC key load: fixes
2024-07-22 16:40:59 -07:00
Daniel Pouzzner
367508f498
wolfcrypt/src/asn.c: in EccSpecifiedECDomainDecode(), in calls to DataToHexString(), cast curve->size to word32 to resolve -Wconversion.
...
wolfcrypt/src/dh.c: in GeneratePrivateDh186(), add explicit suppression of uninitvar for "cBuf" arg that isn't fully initialized.
wolfcrypt/test/test.c: in mp_test_param(), explicitly initialize "buffer" to avoid uninitvar warning.
configure.ac: in FIPS builds, don't include enable_cryptocb in --enable-all or --enable-all-crypto. (they can still be enabled explicitly in FIPS builds with --enable-cryptocb, but the combination is not currently supported.)
2024-07-22 18:21:36 -05:00
Sean Parkinson
a3b6ec4a13
Merge pull request #7716 from anhu/post-hs-auth-check
...
Check the return code when calling post handshake auth functions
2024-07-23 08:20:51 +10:00
Anthony Hu
b1dcdabcd4
Check the return code when calling post handshake auth functions
2024-07-22 17:10:59 -04:00
David Garske
6a26569ddc
Support for STM32U5A9xx board. Fixes for building example with fast math (TFM) and CMSIS OS 2.
2024-07-22 14:09:15 -07:00
gojimmypi
a07a658771
Update Arduino publishing script for 5.7.2 release
2024-07-22 09:32:08 -07:00
David Garske
604a1fe2da
Merge pull request #7774 from Laboratory-for-Safe-and-Secure-Systems/zephyr_v3_7
...
Zephyr V3.7 warning fix
2024-07-22 07:15:46 -07:00
Tobias Frauenschläger
bdfe2c3fdf
Zephyr V3.7 warning fix
...
The required feature flag CONFIG_PTHREAD_IPC is deprecated since Zephyr
version 3.7. The new option is CONFIG_POSIX_THREADS. This change clears
the warning.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-22 10:58:20 +02:00
David Garske
a9ff7730ce
Merge pull request #7772 from douzzer/20240719-test-hpke-PRIVATE_KEY_UNLOCK
...
20240719-test-hpke-PRIVATE_KEY_UNLOCK
2024-07-20 11:44:08 -07:00
Daniel Pouzzner
765231060e
wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK() for hpke_test().
2024-07-19 18:31:01 -05:00
Daniel Pouzzner
6952d1a5ea
wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE().
2024-07-19 18:30:31 -05:00
David Garske
33f71f6f60
Merge pull request #7770 from bandi13/fixWolfEngineFlag
...
Fix the actual definition of the ECC_MIN_KEY_SZ
2024-07-19 14:37:55 -07:00
David Garske
575df43889
Merge pull request #7768 from JacobBarthelmeh/copyright
...
update copyright to 2024
2024-07-19 14:27:39 -07:00
David Garske
4d8a6b84fb
Merge pull request #7760 from douzzer/20240718-BIO_DGRAM-memory-leak
...
20240718-BIO_DGRAM-memory-leak
2024-07-19 14:24:30 -07:00
David Garske
16a2d2e71d
Merge pull request #7769 from douzzer/20240719-PQ-fixes
...
20240719-PQ-fixes
2024-07-19 14:20:33 -07:00
aidan garske
74e161e437
Merge branch 'InitSuites_Orderadj' of github.com:aidangarske/wolfssl into InitSuites_Orderadj
2024-07-19 13:19:13 -07:00
aidan garske
f8814fb68f
InitSuites changes to order making BUILD_TLS_AES_256_GCM_SHA384 be prioritized over BUILD_TLS_AES_128_GCM_SHA256 to match TLS 1.2.
2024-07-19 13:14:10 -07:00
Andras Fekete
c3d30e7987
Fix the actual definition of the ECC_MIN_KEY_SZ
2024-07-19 16:01:56 -04:00
JacobBarthelmeh
f5ed2460df
cast to larger type for multiplication
2024-07-19 13:59:05 -06:00
Daniel Pouzzner
787397b28e
src/bio.c and related:
...
* refactor WOLFSSL_BIO.num and WOLFSSL_BIO.ptr as unions, for clarity and bug resistance (no functional changes).
* in wolfSSL_BIO_free(), add WOLFSSL_BIO_DGRAM to the test for closing bio->num.fd, fixing a descriptor leak.
* use SOCKET_INVALID consistently as the invalid value for WOLFSSL_BIO.num.fd, and use SOCKET_T consistently as the internal type for file descriptors.
* move the definitions for SOCKET_T and SOCKET_INVALID from wolfio.h to the filesystem section of wc_port.h, and allow override definitions of SOCKET_T.
detected and tested with wolfssl-multi-test.sh ... pq-hybrid-all-rpk-valgrind-unittest. also tested with wolfssl-multi-test.sh ... super-quick-check.
2024-07-19 14:50:26 -05:00
Daniel Pouzzner
e13a8ddcfb
fixes for null derefs in native Dilithium and Kyber implementations, detected by unit.test and cppcheck.
2024-07-19 14:35:39 -05:00
Daniel Pouzzner
0aa0f26289
wolfcrypt/src/dilithium.c: fix null deref in wc_dilithium_init_ex().
2024-07-19 14:25:53 -05:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
JacobBarthelmeh
8a9c893c6f
fix for initialization of high value and funtction signature
2024-07-19 11:03:44 -06:00
David Garske
0eeae4da8c
Merge pull request #6460 from embhorn/mosquitto_osp
...
Add support for Mosquitto OSP
2024-07-19 07:49:32 -07:00
David Garske
bd5586623a
Merge pull request #7703 from SparkiDev/def_ticket_cbc_hmac
...
Default session ticket enc/dec: allow AES-CBC with HMAC
2024-07-19 07:41:27 -07:00
David Garske
74d4ae0075
Merge pull request #7704 from aidangarske/PKCS7_PEM
...
Added PKCS7 PEM support:
2024-07-19 07:39:51 -07:00
David Garske
3e02a70c07
Merge pull request #7707 from JacobBarthelmeh/psk
...
use max key length for PSK encrypt buffer size
2024-07-19 07:38:57 -07:00
David Garske
851bb34f3c
Merge pull request #7762 from ColtonWilley/increase_default_max_alt_names
...
Increase default max alt names from 128 to 1024
2024-07-19 07:37:50 -07:00
David Garske
08b211c3bb
Merge pull request #7761 from kareem-wolfssl/zd18300
...
Fix not calling the signing callback when using PK callbacks + TLS 1.3.
2024-07-19 07:37:37 -07:00
David Garske
b5e188830d
Merge pull request #7755 from philljj/misc_cleanup
...
Misc cleanup: FreeX509 null pointer checks, and spelling cleanup.
2024-07-19 07:37:24 -07:00
David Garske
8bf2fb0ae0
Merge pull request #7765 from Laboratory-for-Safe-and-Secure-Systems/dilithium_fixes
...
Dilithium fixes
2024-07-19 07:36:05 -07:00
David Garske
b3c812921a
Merge pull request #7764 from gojimmypi/pr-asn-update
...
minor asn update: comments, code format, dateType check in CheckDate.
2024-07-19 07:35:02 -07:00
Tobias Frauenschläger
f87849b6f6
Dilithium fixes
...
* Fixed incorrect XFREE calls
* Use key->heap where possible
* Fixed compilation with WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM and
WC_DILITHIUM_CACHE_PUB_VECTORS
* Fixed compilation with WOLFSSL_DILITHIUM_ASSIGN_KEY (const pointers)
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-19 07:52:14 +02:00
gojimmypi
8356b349a5
minor asn update: comments, code format, dateType check in CheckDate.
2024-07-18 18:25:53 -07:00
Sean Parkinson
e6fcd488a6
Merge pull request #7685 from dgarske/renesas_rx_tsip
...
Renesas RX TSIP ECDSA support
2024-07-19 10:53:00 +10:00
Sean Parkinson
47dcac657c
Merge pull request #7763 from douzzer/20240718-cppcheck-2v14v2-suppressions
...
20240718-cppcheck-2v14v2-suppressions
2024-07-19 10:03:04 +10:00
David Garske
4eab0f1231
Fix hard coded values in TSIP ECC verify. Fix issues with tab indentation and spelling.
2024-07-18 16:45:27 -07:00
Daniel Pouzzner
4bc04673d1
suppress 4 uninitvar warnings, all associated with passing partially written arrays (true but benign positives). newly detected by cppcheck 2.14.2.
2024-07-18 17:22:17 -05:00
Hideki Miyazaki
945a24e5b4
fix compile error
2024-07-19 06:41:17 +09:00
Colton Willey
a82b76978e
Modify max altname test to run if limit has been lowered
2024-07-18 11:28:11 -07:00
Colton Willey
7434092a3a
Increase default max alt names from 128 to 1024
2024-07-18 11:11:38 -07:00
Kareem
3492caba51
Fix not calling the signing callback when using PK callbacks + TLS 1.3.
2024-07-18 10:33:19 -07:00
JacobBarthelmeh
04ab561a65
add smallstack support for poly1305 w64wrapper
2024-07-18 07:30:08 -06:00
JacobBarthelmeh
902087df6f
add w64wrapper support in poly1305
2024-07-18 07:21:57 -06:00
Sean Parkinson
27c3140c2b
Merge pull request #7757 from douzzer/20240717-fixes
...
20240717-fixes
2024-07-18 10:41:03 +10:00
Daniel Pouzzner
c36ab59f24
fixes for defects identified by nightly testing:
...
* ecc.c: in wc_ecc_free(), fix gating around handling for key->sign_k to resolve memory leak, and in wc_ecc_gen_deterministic_k(), fix -Wconversion.
* test.c: add missing mp_free()s to ecdsa_test_deterministic_k_rs() and ecc521_test_deterministic_k().
* wc_HashType: change several occurrences of int to enum wc_HashType, including ecc_key.hashType and API wc_ecc_set_deterministic_ex(), to resolve C++ warnings.
* fixes for various C++ warnings/errors in crypto and TLS layers and test and benchmark code -- implicit casts, negative initializers for unsigned type, jumped initializers, and missing enums in switch()es.
2024-07-17 18:07:08 -05:00
jordan
6a745518bc
Misc cleanup: FreeX509 null pointer checks, and spelling cleanup.
2024-07-17 10:04:52 -05:00
Sean Parkinson
ec9fcf5353
Merge pull request #7648 from douzzer/20240418-exosip-apis
...
20240418-exosip-apis
2024-07-17 22:59:34 +10:00
David Garske
bbd8fdfc38
Cleanup Renesas RX default devId and improve logic for overflow check.
2024-07-16 17:48:16 -07:00
Daniel Pouzzner
ee7748f2e3
PR7648 20240418-exosip-apis peer review:
...
* tweak typography;
* move wolfSSL_i2d_X509_PUBKEY() from ssl.c to x509.c;
* in asn.h, add !NO_ASN_OLD_TYPE_NAMES macros to remap old names (ISSUER, SUBJECT, BEFORE, AFTER) by default unless the macros are already defined.
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
9023aeef75
BIO/wolfio: refactor TranslateReturnCode(), wolfSSL_LastError(), and TranslateIoError() into complete+consistent wolfSSL_LastError() and TranslateIoReturnCode(), handling all special cases correctly, and correctly returning WOLFSSL_CBIO_ERR_WANT_WRITE and WOLFSSL_CBIO_ERR_TIMEOUT. use TranslateIoReturnCode() directly in wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), wolfIO_SendTo(), and remove now-superfluous TranslateIoError() calls from EmbedReceive(), EmbedSend(), EmbedReceiveFrom(), EmbedSendTo(), EmbedReceiveFromMcast().
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
5298039d09
fixes from peer review: move OS-specific code from wolfSSL_BIO_read() and wolfSSL_BIO_write() to wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), and wolfIO_SendTo(); add SOCKET_ETIMEDOUT definitions to wolfio.h; misc cleanups.
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
0c1163f01f
src/bio.c: restore inadvertently removed update of bio->connected in wolfSSL_BIO_ctrl() case BIO_CTRL_DGRAM_SET_CONNECTED.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
9e99544315
wolfssl/ssl.h: fix double-WOLFSSL_API on wolfSSL_CTX_load_verify_locations_compat().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
1159fc333f
src/bio.c: in wolfSSL_BIO_ADDR_size(), add missing gate on HAVE_SYS_UN_H for AF_UNIX.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
51c49b678e
src/bio.c: fix gating for WOLFSSL_BIO_DGRAM handling.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
0a928ead3f
address peer review around WOLFSSL_HAVE_BIO_ADDR:
...
refactor housekeeping for bio->bytes_read and bio->bytes_write, and add WOLFSSL_BIO_HAVE_FLOW_STATS gate;
add WOLFSSL_BIO_FLAG_RETRY housekeeping for WOLFSSL_BIO_SOCKET and WOLFSSL_BIO_DGRAM;
refactor WOLFSSL_BIO.peer_addr to be inline rather than a pointer;
add wolfSSL_set_mtu_compat() and wolfSSL_CTX_load_verify_locations_compat() implementations;
enable WOLFSSL_HAVE_BIO_ADDR and WOLFSSL_DTLS_MTU when OPENSSL_ALL.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
61eb6987d0
src/ssl.c: remove old version of wolfSSL_set_bio().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
62db3533ae
wolfSSL_CTX_load_verify_locations(): set up with OpenSSL-compatible behavior (WOLFSSL_LOAD_FLAG_IGNORE_ERR).
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
2d370f3e4e
wolfSSL_BIO_read(): return MEMORY_E if wolfSSL_BIO_ADDR_new() fails.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
7216a543dd
checkpoint: complete test_wolfSSL_BIO_datagram(); fix some WOLFSSL_HAVE_BIO_ADDR gates to also gate on WOLFSSL_DTLS and OPENSSL_EXTRA; use DTLS_RECVFROM_FUNCTION, DTLS_SENDTO_FUNCTION, SOCKET_T, SOCKADDR, SOCKADDR_IN, and SOCKADDR_IN6 macros and types, and add SOCKADDR_UN type.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
bd7f7c8bdf
checkpoint: add wolfSSL_BIO_ADDR_free to wolfSSL_BIO_free(); tweak EXPECT_SUCCESS() to tolerate TEST_SKIPPED; add WIP test_wolfSSL_BIO_datagram.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
29ec038aa6
checkpoint: add WOLFSSL_BIO_ADDR, wolfSSL_BIO_ADDR_new(), wolfSSL_BIO_ADDR_free(), wolfSSL_BIO_ADDR_clear(), wolfIO_SendTo(), wolfIO_RecvFrom(); fix name of wolfSSL_BIO_s_datagram().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
08940866c3
checkpoint progress: add macro definitions for BIO_CTRL_DGRAM_SET_CONNECTED, BIO_CTRL_DGRAM_SET_PEER, WOLFSSL_MULTI_LABEL_WILDCARDS, WOLFSSL_MULTI_LABEL_WILDCARDS, NID_id_GostR3410_2001, NID_id_GostR3410_2012_256, NID_id_GostR3410_2012_512; fix flag arithmetic in wolfSSL_X509_check_host(); add compat macros for i2d_X509_PUBKEY, BIO_new_dgram.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
3f921e0a32
checkpoint progress: add wolfSSL_BIO_s_dgram, wolfSSL_BIO_new_dgram, WOLFSSL_BIO_DGRAM, and remove now-duplicate prototype and definition of wolfSSL_X509_STORE_get0_param.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
8468a70b72
add wolfSSL_i2d_X509_PUBKEY, wolfSSL_X509_VERIFY_PARAM_lookup, and wolfSSL_X509_STORE_get0_param, and make wolfSSL_X509_VERIFY_PARAM_inherit a public API; add macros to openssl compat layer: DTLS_client_method, DTLS_server_method, X509_VERIFY_PARAM_lookup, X509_VERIFY_PARAM_inherit, X509_STORE_get0_param; add "const char *name" slot to struct WOLFSSL_X509_VERIFY_PARAM to support wolfSSL_X509_VERIFY_PARAM_lookup.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
1e7810153f
add wolfSSL_set_rbio, wolfSSL_set_wbio, wolfSSL_BIO_number_read, wolfSSL_BIO_number_written, and compat layer shim macros SSL_set0_rbio, SSL_set0_wbio, BIO_number_read, BIO_number_written, BIO_reset.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
41efa0492c
add ASN_ prefixes to ISSUER, SUBJECT, BEFORE, and AFTER enum constants defined in wolfssl/wolfcrypt/asn.h.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
198f4030e8
add stub implementations of wolfSSL_COMP_get_name(), wolfSSL_get_current_compression(), and wolfSSL_get_current_expansion(), and add compat layer shim macros for them.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
685bfd1f9d
add wolfSSL_get0_peername() and SSL_set_mtu().
2024-07-16 19:12:18 -05:00
Sean Parkinson
0f3ebedba0
Merge pull request #7700 from aidangarske/ECDSA_deterministic_k
...
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c
2024-07-17 09:12:32 +10:00
JacobBarthelmeh
0be4041479
Merge pull request #7727 from SparkiDev/dilithium_fixed_array
...
Dilithium: support fixed size arays in dilithium_key
2024-07-16 16:54:34 -06:00
aidan garske
237df2cb11
Hash Type selection changes to ecc.c.
2024-07-16 15:17:40 -07:00
Sean Parkinson
500951f059
Dilithium: support fixed size arays in dilithium_key
...
Support fixed size arrays for pre-generated matrix and vectors.
Define: WC_DILITHIUM_FIXED_ARRAY
2024-07-17 07:36:14 +10:00
aidan garske
96af77d757
Hash Type selection changes to ecc.c.
2024-07-16 11:12:29 -07:00
JacobBarthelmeh
bbd769d43a
Merge pull request #7728 from SparkiDev/poly1305_aarch64_uniq_name
...
Poly1305 AArch64: unique naming of asm funcs
2024-07-16 10:10:54 -06:00
Eric Blankenhorn
1112751654
mosquitto workflow update
2024-07-16 10:28:40 -05:00
Eric Blankenhorn
4d247a3a88
Update to mosquitto 2.0.18
2024-07-16 07:37:33 -05:00
Eric Blankenhorn
7aad09fc87
Rebase for mosquitto
2024-07-16 07:37:33 -05:00
Sean Parkinson
e002b6efd3
Merge pull request #7742 from embhorn/zd18240
...
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-16 09:38:54 +10:00
Sean Parkinson
f2f3a8273d
Merge pull request #7732 from kaleb-himes/NUCLEUS-FIPS-SRTP-KDF
...
Check-in Nucleus Plus 2.3 port work
2024-07-16 09:37:15 +10:00
Sean Parkinson
137831367d
Merge pull request #7710 from anhu/preTBS_altsigalg_fix
...
Stop stripping out the sequence header on the AltSigAlg extension.
2024-07-16 09:35:11 +10:00
Sean Parkinson
0d8763be57
Merge pull request #7665 from anhu/lighty-debug
...
Don't do multithreaded logging tests if single threaded
2024-07-16 09:28:11 +10:00
Sean Parkinson
56b8ac4fa1
Merge pull request #7636 from gojimmypi/PR-ESP8266-Make-Clarification
...
Clarify WOLFSSL_ROOT location for ESP8266 make builds
2024-07-16 09:06:33 +10:00
David Garske
2b4acf5027
Revert built-in wc_GenerateSeed support for RX TSIP removed in #6851 .
2024-07-15 10:10:38 -07:00
Daniel Pouzzner
475ec7b680
Merge pull request #7550 from bandi13/addEnableProvider
...
Add enable provider
2024-07-15 12:08:03 -05:00
David Garske
95f4e0618b
Merge pull request #7747 from lealem47/cubepack_armasm
...
Adding ARM ASM build option to STM32CubePack config
2024-07-15 09:35:44 -07:00
Andras Fekete
5b1e6db9a5
Allow user to override required flags
2024-07-15 09:46:36 -04:00
Sean Parkinson
93ca213a68
Merge pull request #7736 from space88man/fix-pkcs11-slot
...
wolfcrypt/src/wc_pkcs11.c: iterate correctly over slotId
2024-07-15 15:52:40 +10:00
Sean Parkinson
dc86dad26b
ECC key load: fixes
...
asn.c:
Return the curve OID sum with alg_id for ECC keys.
ssl_load.c:
Don't permanently strip the PKCS#8 information as it contains the
curve OID.
2024-07-15 15:46:05 +10:00
Daniel Pouzzner
12ba31967c
Merge pull request #7748 from bandi13/addExtraTestingTools
...
Need to add more dependencies to be able to run all tests
2024-07-12 18:28:42 -05:00
Lealem Amedie
206d3f47f7
Fix typo and disable crypto offload if ARM_ASM enabled
2024-07-12 15:33:37 -06:00
Lealem Amedie
8c76cab2cb
Add comment for new option
2024-07-12 14:59:40 -06:00
Andras Fekete
e7c068b9aa
Add fix to netcat package
2024-07-12 15:48:19 -04:00
aidan garske
82fca1c483
InitSuites changes to order making BUILD_TLS_AES_256_GCM_SHA384 be prioritized over BUILD_TLS_AES_128_GCM_SHA256
2024-07-12 12:45:45 -07:00
Andras Fekete
d21e12851a
Need to add more dependencies to be able to run all tests
2024-07-12 15:31:46 -04:00
Lealem Amedie
8e2775fc89
Adding ARM ASM build option to STM32CubePack config
2024-07-12 13:14:40 -06:00
Eric Blankenhorn
d6731f0f84
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-12 07:43:23 -05:00
Anthony Hu
f84ea01f72
Get rid of macro test
2024-07-11 21:52:52 -04:00
JacobBarthelmeh
1cf96eb72c
Merge pull request #7741 from douzzer/20240714-asn-Wconversion
...
20240714-asn-Wconversion
2024-07-11 16:48:52 -06:00
JacobBarthelmeh
baec0ced59
Merge pull request #7731 from ColtonWilley/zephyr_tls_support
...
Changes needed for default TLS support in zephyr kernel
2024-07-11 16:46:43 -06:00
Sean Parkinson
e0494b5f04
Merge pull request #7738 from dgarske/pkcs11_rsakeygen
...
Fix to support PKCS11 without RSA key generation
2024-07-12 08:45:53 +10:00
Sean Parkinson
d6ecaaddbd
Merge pull request #7740 from JacobBarthelmeh/readme
...
update changelog for kyber fix, thanks to Antoon Purnal
2024-07-12 08:25:49 +10:00
Colton Willey
978456e39d
Remove get cipher bytes from header
2024-07-11 14:51:38 -07:00
Colton Willey
7b089f548e
Remove get cipher list bytes
2024-07-11 14:39:44 -07:00
Daniel Pouzzner
76f669b1cc
wolfcrypt/src/asn.c: fix -Wconversion in GetLength_ex() added in fea7a89b86.
2024-07-11 14:47:58 -05:00
JacobBarthelmeh
a26476b8b2
update changelog for kyber fix, thanks to Antoon Purnal
2024-07-11 09:01:11 -06:00
Sean Parkinson
3cc7bbea67
Merge pull request #7737 from JacobBarthelmeh/staticmemory-singlethreaded
...
fix for staticmemory and singlethreaded build
2024-07-11 09:57:08 +10:00
Sean Parkinson
0979fe8fea
Merge pull request #7709 from JacobBarthelmeh/staticmemory
...
fix test case for lean static memory build
2024-07-11 09:51:35 +10:00
David Garske
41cf8c090b
Fix compiler issues with unused variable and printf.
2024-07-10 16:07:43 -07:00
Anthony Hu
fe2a826ede
Better guarding.
2024-07-10 18:28:22 -04:00
Anthony Hu
6456281b41
Add support for uknown certificate extensions in PKCS7
2024-07-10 16:15:45 -04:00
David Garske
28db1b19e1
Fix to support PKCS11 without RSA key generation. Fixed Pkcs11Rsa where ret failure could be ignored.
2024-07-10 11:17:02 -07:00
cwilley
db4177ae2c
Merge pull request #7723 from JacobBarthelmeh/max_ext
...
update over max ext test certs and add them to renew script
2024-07-10 11:08:17 -07:00
Anthony Hu
e581930cb7
Extend the unknown extension callback.
...
This will allow the user to pass in a context pointer. Allows them to avoid
global variables.
We also add unknown extensions callback when processing a CA in cert manager
as CA certs can have unknown extensions as well.
Fixes ZD 18252
2024-07-10 13:22:19 -04:00
JacobBarthelmeh
d4741de5dc
Merge pull request #7708 from dgarske/afalg_shake
...
Fix to not allow Shake128/256 with Xilinx AFALG
2024-07-10 10:02:04 -06:00
JacobBarthelmeh
204668778b
Merge pull request #7733 from SparkiDev/coverity_3
...
Coverity fixes
2024-07-10 10:01:29 -06:00
David Garske
9bd0985c87
Merge pull request #7701 from JacobBarthelmeh/testing1
...
with FREERTOS and OPENSSL_ALL add XREMALLOC define
2024-07-10 08:58:02 -07:00
JacobBarthelmeh
2543674d9f
Merge pull request #7721 from SparkiDev/dilithium_fix_3
...
Dilithium: fixes
2024-07-10 09:51:40 -06:00
JacobBarthelmeh
6703a58c51
fix for staticmemory and singlethreaded build
2024-07-10 09:44:10 -06:00
S-P Chan
fdd03fa909
wolfcrypt/src/wc_pkcs11.c: iterate correctly over slotId when searching for token
...
Addresses #7734
2024-07-10 21:01:35 +08:00
Hideki Miyazaki
a5c2290e40
Update key data and set private key for client authentification
2024-07-10 17:13:09 +09:00
Sean Parkinson
fea7a89b86
Coverity fixes
...
pk.c:
EncryptDerKey - setting wrong ret value on allocation failure.
wolfssl_rsa_generate_key_native - now checks e is a valid long
before passing in.
Fix formatting.
ssl_load.c:
ProcessBufferPrivPkcs8Dec - now checking password is not NULL
before zeroizing. Allocation may fail and ForceZero doesn't check for
NULL.
Fix formatting.
tests/api.c:
test_RsaSigFailure_cm - Check cert_sz is greater than zero
before use.
send_new_session_ticket - assert that building the message
doesn't return error or 0.
test_ticket_nonce_malloc - fix setting of medium and big to use
preprocessor. Fix big to be medium + 20.
asn.c:
GetLength_ex - Fix type of bytes so that it can go negative.
sp_int.h:
sp_clamp - add one to ii while it is a signed.
Fix formatting.
2024-07-10 11:40:48 +10:00
kaleb-himes
c333fdf545
Check-in Nucleus Plus 2.3 port work
2024-07-09 15:53:00 -06:00
Colton Willey
4ec07bb5a8
Changes needed for default TLS support in zephyr kernel
2024-07-09 12:00:34 -07:00
Hideki Miyazaki
2d0353bcb1
updae ecc key and signed cert
2024-07-09 20:40:34 +09:00
Sean Parkinson
90836c782b
Poly1305 AArch64: unique naming of asm funcs
...
Change function names to ensure no clash with OpenSSL.
Specifically: poly1305_blocks()
2024-07-09 11:02:10 +10:00
David Garske
00e42151ca
Merge pull request #7725 from JacobBarthelmeh/release
...
prepare for release 5.7.2
2024-07-08 11:02:46 -07:00
JacobBarthelmeh
c8aa0fa351
remove * in changelog created from search and replace
2024-07-08 10:31:13 -06:00
JacobBarthelmeh
203f65a636
prepare for release 5.7.2
2024-07-08 09:47:46 -06:00
JacobBarthelmeh
6c0aae714f
update over max ext test certs and add them to renew script
2024-07-07 23:38:29 -07:00
Sean Parkinson
d1e26b4f5d
Dilithium: fixes
...
Fix inclusion of functions dilithium_vec_check_low() in build:
--enable-dilithium=verify-only,44,65,87
CFLAGS=-DWOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
Fix memory leaks in unit.test:
--enable-dilithium CFLAGS=-DWC_DILITHIUM_CACHE_MATRIX_A 'CC=clang
-fsanitize=address'
2024-07-08 15:02:43 +10:00
JacobBarthelmeh
595e71d7f4
Merge pull request #7718 from douzzer/20240705-coverity-fixes
...
20240705-coverity-fixes
2024-07-06 21:53:16 -06:00
Daniel Pouzzner
e35e713c4a
wolfcrypt/src/asn.c: fix for copy-paste error in FillSigner() WOLFSSL_DUAL_ALG_CERTS path.
2024-07-06 10:04:26 -05:00
Daniel Pouzzner
780fd98f40
src/internal.c: in ProcessPeerCerts(), smallstack refactor of a span gated on HAVE_CERTIFICATE_STATUS_REQUEST_V2, to get DecodedCert off the stack.
2024-07-06 10:04:06 -05:00
Daniel Pouzzner
c8a9bdbe15
wolfcrypt/src/asn.c: fix for -Wconversion in FillSigner().
2024-07-05 20:42:32 -05:00
Daniel Pouzzner
88af1a2932
fixes for Coverity #394680 , #394682 , #394693 , #394712 .
2024-07-05 20:42:32 -05:00
David Garske
d8757a51b3
Merge pull request #7717 from JacobBarthelmeh/coverity
...
Some additional Coverity touch ups
2024-07-05 15:49:53 -07:00
JacobBarthelmeh
fee9788bb0
fix for coverity report 394710
2024-07-05 15:40:47 -06:00
JacobBarthelmeh
b948f6797c
account for negative return value, fixes coverity issue 394678
2024-07-05 15:34:28 -06:00
JacobBarthelmeh
de20bb7ba9
fix for coverity issue 394677
2024-07-05 15:13:28 -06:00
David Garske
d5016d451f
Merge pull request #7714 from JacobBarthelmeh/coverity
...
Coverity issues reported
2024-07-05 13:49:20 -07:00
JacobBarthelmeh
7ef424b193
Merge pull request #7715 from kaleb-himes/C394706
...
Address coverity issue 394706
2024-07-05 14:46:54 -06:00
JacobBarthelmeh
f8eb0c3776
fix for coverity issue 394676 possible null dereference
2024-07-05 14:06:19 -06:00
kaleb-himes
f42fb587a5
Address coverity issue 394706
2024-07-05 13:54:23 -06:00
JacobBarthelmeh
d4cf93c2cf
avoid overflow if clamping a digit with used size 0
2024-07-05 13:17:53 -06:00
JacobBarthelmeh
c880fcf822
add check on padSz return, coverity issue 394711
2024-07-05 12:07:42 -06:00
JacobBarthelmeh
25d52dde3f
fix coverity issue 367842 possible null dereference
2024-07-05 11:56:45 -06:00
JacobBarthelmeh
50a7243486
fix for coverity issue 394670 possible overflow
2024-07-05 11:53:19 -06:00
JacobBarthelmeh
fbdb064a4b
coverity issue 394701 possible derefernce before null check
2024-07-05 11:24:42 -06:00
JacobBarthelmeh
ac52660d5b
Merge pull request #7713 from SparkiDev/dilithium_sign_small_alloc
...
Dilithium: add implementation of signing that allocated less
2024-07-05 10:38:19 -06:00
JacobBarthelmeh
8946e3fb4b
Merge pull request #7702 from rizlik/ocspv2
...
ocsp stapling improvements
2024-07-05 10:29:25 -06:00
Marco Oliverio
053170613a
fixup! csrv2multi: pending ca list
2024-07-05 15:26:41 +00:00
JacobBarthelmeh
5ca9b2f8a4
Merge pull request #7712 from SparkiDev/kyber_ml_kem
...
KYBER/ML-KEM: make ML-KEM available
2024-07-05 09:15:08 -06:00
David Garske
4ae277d21e
Fixes for building RX TSIP with e2Studio project. Fixed tsip_Tls13GenEccKeyPair incorrect free of key if TSIP not used (ZD18222).
2024-07-05 07:44:00 -07:00
Sean Parkinson
44a5e1a398
Dilithium: add implementation of signing that allocated less
...
Added implementation of signing that allocates less memory by doing the
matrix/vector loops in the sign code - WOLFSSL_DILITHIUM_SIGN_SMALL_MEM.
Split out vector operations into vector and polynomial operations so
that small mem signing can call them.
Fix benchmark to be able to compile with only Dilithium and no
asymmetric algorithms.
2024-07-05 16:20:06 +10:00
JacobBarthelmeh
e6fbe25398
Merge pull request #7711 from SparkiDev/dilithium_kats
...
Dilithium: Add KATs and fix key generation
2024-07-04 19:40:08 -06:00
David Garske
f91d0a2925
Remove hash type check not required for ECDSA deterministic k. Fix _HMAC_K devId.
2024-07-04 14:49:20 -07:00
Sean Parkinson
1fd9f2af91
KYBER/ML-KEM: make ML-KEM available
...
Added ML-KEM instead of Kyber implementation with WOLFSSL_ML_KEM.
Tests added from NIST for ML-KEM operations.
2024-07-04 23:51:23 +10:00
Sean Parkinson
387f36657c
Dilithium: Add KATs and fix key generation
...
Add KATs from NIST and fix key generation to produce output of KATs.
2024-07-04 22:22:11 +10:00
Marco Oliverio
3e58cfd864
fixup! ocsp: improvements
2024-07-04 10:21:20 +02:00
Marco Oliverio
fe932b893c
fixup! csrv2multi: pending ca list
2024-07-04 10:21:20 +02:00
Anthony Hu
4c13834500
Don't do multithreaded logging tests if single threaded
2024-07-03 19:31:21 -04:00
JacobBarthelmeh
1c23d2222c
Merge pull request #7693 from philljj/zd18204
...
Fixes ZD 18204: check hashsigalgo matches ssl suites.
2024-07-03 17:12:43 -06:00
Anthony Hu
f5e27bfb0c
Stop stripping out the sequence header on the AltSigAlg extension.
2024-07-03 19:02:04 -04:00
David Garske
4335dac794
Add wc_ecc_set_deterministic_ex to support custom hash type for deterministic sign or verify.
2024-07-03 15:13:29 -07:00
David Garske
4004e6886f
Fix the FIPS Shake logic.
2024-07-03 10:39:51 -07:00
JacobBarthelmeh
a8780d4a80
fix test case for lean static memory build
2024-07-03 11:25:05 -06:00
jordan
f7f3ba9c76
check hashsigalgo matches ssl suites on client side.
2024-07-03 11:59:18 -05:00
David Garske
d3316b72d3
Fix to not allow Shake128/256 with Xilinx AFALG. Cleanup the Shake disable logic to allow forcing off with WOLFSSL_NO_SHAKE128 and WOLFSSL_NO_SHAKE256.
2024-07-03 09:49:52 -07:00
JacobBarthelmeh
955490e90a
use max key length for PSK encrypt buffer size
2024-07-03 10:17:01 -06:00
Andras Fekete
7cc42d446e
Update the true minimum ECC key size default
...
The discrepancy shows up when trying to compile with FIPS
2024-07-03 11:50:04 -04:00
JacobBarthelmeh
ba1eedb46b
Merge pull request #7697 from SparkiDev/arm32_ldrd_strd_fix
...
ARM32 SHA-3 ASM: fix ldrd/strd for ARMv6
2024-07-02 17:18:06 -06:00
JacobBarthelmeh
d7b0aa92cb
Merge pull request #7694 from SparkiDev/sp_x64_asm_fix_3
...
SP Intel x64 ASM: fix get_from_table ASM
2024-07-02 17:13:49 -06:00
JacobBarthelmeh
6409b68b21
Merge pull request #7698 from dgarske/asan_compat_list
...
Fix ASAN warning with compatibility layer cipher list parsing
2024-07-02 17:12:38 -06:00
JacobBarthelmeh
4ff0af79c7
Merge pull request #7705 from aidangarske/SHA3-cryptocb
...
Sha3.c wc_Sha3Update and wc_Sha3Final Hash Type Change
2024-07-02 17:11:01 -06:00
JacobBarthelmeh
a490d4fdf7
Merge pull request #7628 from SparkiDev/alert_after_ch
...
TLS: wrong TLS version in alert after ClientHello
2024-07-02 17:10:24 -06:00
JacobBarthelmeh
5aca239714
Merge pull request #7692 from gasbytes/sni-csharp-wrapper-patch
...
Sni csharp wrapper patch
2024-07-02 16:49:31 -06:00
Andras Fekete
e340e41db3
Add --enable-wolfprovider
2024-07-02 15:57:53 -04:00
Andras Fekete
43b62c8ccf
Make sure the ECC_MIN_SZ is set even when set to default
2024-07-02 15:57:53 -04:00
aidan garske
804f25d76b
Sha3.c wc_Sha3Update and wc_Sha3Final changes so that hash type is determined in the processing functions.
2024-07-02 10:32:57 -07:00
aidan garske
c065e4a854
Added PKCS7 PEM support: "-----BEGIN PKCS7-----" and "-----END PKCS7-----"
2024-07-02 07:58:01 -07:00
Marco Oliverio
9222cb1304
ocsp: improvements
2024-07-02 09:51:34 +02:00
Marco Oliverio
b5206e8504
csrv2multi: pending ca list
2024-07-02 09:51:34 +02:00
Sean Parkinson
c82081591a
Default session ticket enc/dec: allow AES-CBC with HMAC
...
Add option to use AES-CBC with HMAC for default session ticket enc/dec.
Defaults to AES-128-CBC with HMAC-SHA256.
Options include:
WOLFSSL_TICKET_ENC_HMAC_SHA512 for HMAC-SHA512
WOLFSSL_TICKET_ENC_HMAC_SHA384 for HMAC-SHA384
WOLFSSL_TICKET_ENC_AES256_CBC for AES-256-CBC
2024-07-02 11:34:03 +10:00
Juliusz Sosinowicz
7814e4c264
DoCertificateStatus: Clean up logic in WOLFSSL_CSR2_OCSP_MULTI
2024-07-02 01:29:44 +02:00
Juliusz Sosinowicz
dabfad9f6c
Fix ocsp stapling test 2
2024-07-02 01:29:44 +02:00
David Garske
7ad0248558
Fix for RX TSIP ECDSA Verify hash padding/truncation. Fix to set ECDSA crypto callback "res" on success.
2024-07-01 13:43:26 -07:00
JacobBarthelmeh
32066373c2
Merge pull request #7695 from dgarske/compat_realloc
...
Fixes for building the compatibility layer with no realloc
2024-07-01 11:37:52 -06:00
David Garske
9ec29e9ad9
Reduced duplicate code in deterministic test.
2024-07-01 10:35:03 -07:00
David Garske
ac7f44b0dc
Fix the async tests for deterministic sign. The _ex versions cannot be called again. Fix possible leak with async and deterministic sign.
2024-07-01 10:13:28 -07:00
JacobBarthelmeh
bbf3bb4bf4
Merge pull request #7699 from SparkiDev/regression_fixes_13
...
Regression testing: fix compilation for unusual configs
2024-07-01 11:02:46 -06:00
JacobBarthelmeh
72aa6ad178
with FREERTOS and OPENSSL_ALL add XREMALLOC define
2024-07-01 11:00:47 -06:00
aidan garske
c07e7f1e58
Fixed async test for test.c deterministic K.
2024-07-01 09:51:07 -07:00
aidan garske
b5b0e17587
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c for SHA256, SHA384, and SHA512 for SECP256R1, SECP384R1, SECP521R1.
2024-07-01 08:43:32 -07:00
Sean Parkinson
1e3f623ff3
Regression testing: fix compilation for unusual configs
...
Disable ECC but have OPENSSL_EXTRA and curve25519 - fix #ifdef
protection in ssl.c.
tests/api.c:
SSL_SESSION_get_max_fragment_length is not available when no session
cache.
ASN1 APIs using generalized time disabled when NO_ASN_TIME defined so
disable tests.
2024-07-01 21:52:56 +10:00
Sean Parkinson
45442db047
ARM32 SHA-3 ASM: fix ldrd/strd for ARMv6
...
LDRD/STRD not available with ARMv6 and the alternative is two ldr/str
operations. Pointer was 64-bits causing second ldr/str to be 8 bytes
passed first and not 4 bytes. Fixed in asm to add 4 rather than index.
2024-07-01 15:23:53 +10:00
jordan
7dfef18cf4
Refactor unneeded PickHashSigAlgo_ex function.
2024-06-28 18:32:13 -05:00
JacobBarthelmeh
98a5a4c201
Merge pull request #7660 from julek-wolfssl/zd/18188
...
wolfSSL_get_SSL_CTX: Make parameter const
2024-06-28 16:40:06 -06:00
David Garske
7faf0dccc7
Fix for ASAN warning with compatibility layer lists in ParseCipherList and CheckcipherList (ZD 18175). Add test case for ASAN to trigger NULL + 1 warning. Cleanup messy WOLFSSL_TIRTOS in api.c.
2024-06-28 15:26:40 -07:00
David Garske
2fd7a2e4ae
Fix for test.c memcb_test and missing XREALLOC.
2024-06-28 15:25:01 -07:00
JacobBarthelmeh
80d4f71eb9
Merge pull request #7683 from SparkiDev/def_ticket_cb_inlen
...
SSL default ticket encryption callback: check in len on decrypt
2024-06-28 16:04:58 -06:00
JacobBarthelmeh
4913289ce5
Merge pull request #7696 from SparkiDev/dilithium_fix_2
...
Dilithium: fixes
2024-06-28 16:00:05 -06:00
Sean Parkinson
864a9d0598
Dilithium: fixes
...
TLS uses DER API now and needs to be protected with the right #ifdefs.
Do the right check of size in wc_Dilithium_PrivateKeyDecode().
Don't require public key when doing private DER.
2024-06-28 10:55:16 +10:00
David Garske
2a86ca43f8
Fixes for building the compatibility layer with WOLFSSL_NO_REALLOC. Tested using ./configure --enable-opensslextra CFLAGS="-DWOLFSSL_NO_REALLOC".
...
Improve benchmark FreeRTOS default tick rate logic. For example Xilinx FreeRTOS uses 10ms tick (not default 1ms), so include `configTICK_RATE_HZ` in calculation if available.
Fix test.c warning around too many parens with no realloc.
2024-06-27 16:02:28 -07:00
Sean Parkinson
4dc52484f6
SP Intel x64 ASM: fix get_from_table ASM
...
Use movdqu instead of vmovdqu so that function works on SSE2 only CPUs.
2024-06-28 07:42:56 +10:00
JacobBarthelmeh
85552d0fc8
Merge pull request #7662 from julek-wolfssl/enable-WOLFSSL_RSA_KEY_CHECK
...
Enable WOLFSSL_RSA_KEY_CHECK with OPENSSLALL
2024-06-27 09:49:00 -06:00
jordan
107cc82a06
Fixes ZD 18204: check hashsigalgo matches ssl suites.
2024-06-27 10:45:02 -05:00
JacobBarthelmeh
c047e55b92
Merge pull request #7687 from douzzer/20240626-EvictSessionFromCache-ticketNonce-data-leak
...
20240626-EvictSessionFromCache-ticketNonce-data-leak
2024-06-27 09:41:42 -06:00
gasbytes
91cad98d67
1023 <- 1024, changed buffer to textmate
2024-06-27 17:35:43 +02:00
JacobBarthelmeh
5420c1a081
Merge pull request #7689 from douzzer/20240626-linuxkm-cp-no-clobber
...
20240626-linuxkm-cp-no-clobber
2024-06-27 09:32:24 -06:00
JacobBarthelmeh
7691bb6a2a
Merge pull request #7690 from SparkiDev/regression_fixes_12
...
Regression testing: memory allocation failure
2024-06-27 09:32:00 -06:00
gasbytes
97adb4be6e
fixed wolfSSL_SNI_GetFromBuffer
2024-06-27 17:03:05 +02:00
Juliusz Sosinowicz
f66e5a52bd
wolfSSL_get_SSL_CTX: Make parameter const
2024-06-27 15:48:46 +02:00
gasbytes
6dd43caae9
wolfSSL_SNI_GetRequest working, fixing up wolfSSL_SNI_GetFromBuffer
2024-06-27 15:05:02 +02:00
Sean Parkinson
4d56cc1790
Regression testing: memory allocation failure
...
Fixes from memory allocation failure testing.
Also:
fix asn.c to have ifdef protection around code compiled in with dual
algorithm certificates.
fix test_tls13_rpk_handshake() to support no TLS 1.2 or no TLS 1.3.
fix wc_xmss_sigsleft() to initialize the index to avoid compilation
error.
2024-06-27 17:17:53 +10:00
David Garske
73a1938e89
Added Renesas RX TSIP ECDSA Verify Crypto callback.
2024-06-26 17:39:29 -07:00
Daniel Pouzzner
ae0d40b119
linuxkm/Makefile: use old/deprecated cp --no-clobber rather than newfangled cp --update=none in libwolfssl.ko recipe, for compatibility with older cp (pre-coreutils-9.3 of 2023-04-18). note that coreutils-9.5 restores the behavior of --no-clobber pre-9.2, whereby skips of existing files are non-errors.
2024-06-26 17:58:29 -05:00
Daniel Pouzzner
4d43dbf83b
src/ssl_sess.c: in EvictSessionFromCache(), free session->ticketNonce.data if it was dynamically allocated. fixes memory leak via wolfSSL_Cleanup().
2024-06-26 14:15:42 -05:00
Daniel Pouzzner
474b8a0673
Merge pull request #7682 from SparkiDev/dilithium_fix_1
...
Dilithium: fix public and private key decode
2024-06-26 00:03:03 -04:00
Takashi Kojo
3d7583e743
Merge pull request #7684 from kojo1/pk-fix
...
Fix in pk.c
2024-06-26 11:33:38 +09:00
David Garske
e81e18859b
Support for Renesas RX TSIP with ECDSA and Crypto Callbacks.
...
Fix building ECC with NO_ASN (`./configure --enable-cryptonly --disable-rsa --disable-asn --disable-examples`).
2024-06-25 17:43:16 -07:00
Takashi Kojo
72b6074b93
Fixes in pk.c
2024-06-26 08:47:41 +09:00
Sean Parkinson
6d0dc7f2e7
SSL default ticket encryption callback: check in len on decrypt
...
Make sure that the length of the data to decrypt is correct for the
default ticket encryption implementation.
2024-06-26 08:21:17 +10:00
JacobBarthelmeh
22abd37408
Merge pull request #7681 from SparkiDev/kyber_improv_1
...
Kyber: Improve performance
2024-06-25 15:25:51 -06:00
JacobBarthelmeh
38335f4947
Merge pull request #7678 from bandi13/fixReturnType
...
ret will be set to 1 (WOLFSSL_SUCCESS), the rest checks for 'ret == 0'
2024-06-25 10:53:03 -06:00
JacobBarthelmeh
263eb6c60f
Merge pull request #7666 from SparkiDev/sp_x64_asm_fix_2
...
SP Intel x64 ASM: fixes
2024-06-25 10:18:31 -06:00
JacobBarthelmeh
f466453d61
Merge pull request #7680 from philljj/fix_infer_issues
...
Fix Infer issues.
2024-06-25 09:42:49 -06:00
Sean Parkinson
8bba660f9c
Dilithium: fix public and private key decode
...
Fixes to decoding to prevent accessing NULL key.
2024-06-25 19:37:11 +10:00
Sean Parkinson
aa61f98955
Kyber: Improve performance
...
Unroll loops and use larger types.
Allow benchmark to run each kyber parameter separately.
Allow benchmark to have -ml-dsa specified which runs all parameters.
Fix thumb2 ASM C code to not have duplicate includes and ifdef checks.
Fix thumb2 ASM C code to include error-crypt.h to ensure no empty
translation unit.
Check for WOLFSSL_SHA3 before including Thumb2 SHA-3 assembly code.
2024-06-25 18:53:53 +10:00
jordan
394948ce94
Fix Infer issues.
2024-06-24 20:44:33 -05:00
David Garske
7b029d3447
Fixes for building WOLFSSL_RENESAS_TSIP_CRYPTONLY and NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH.
2024-06-24 16:26:27 -07:00
Sean Parkinson
5793f626ac
Merge pull request #7677 from Laboratory-for-Safe-and-Secure-Systems/mldsa_fixes
...
Fixes for WolfSSL ML-DSA implementation
2024-06-25 09:12:25 +10:00
Juliusz Sosinowicz
b7394274ae
Enable WOLFSSL_RSA_KEY_CHECK with OPENSSLALL
2024-06-24 22:15:04 +02:00
David Garske
be68ba4850
Merge pull request #7676 from SparkiDev/dilithium_opt_1
...
Dilithium: C code optimized
2024-06-24 12:09:29 -07:00
Andras Fekete
773451a5dc
ret will be set to 1 (WOLFSSL_SUCCESS), the rest checks for 'ret == 0'
...
Need to use another type of return code
2024-06-24 12:11:57 -04:00
Tobias Frauenschläger
7cd610bc45
Fixes for WolfSSL ML-DSA implementation
...
* Update OIDs etc. to match OQS ML-DSA values (old ones were Dilithium
Round 3 values)
* Make sure private key files/buffers containing both the private and
the public key are parsed correctly
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-06-24 15:00:44 +02:00
Sean Parkinson
0900e00ee7
Merge pull request #7650 from kaleb-himes/SRTP-KDF-CODEREVIEWr2
...
Add sanity for case id'd in optesting review
2024-06-24 17:04:13 +10:00
Sean Parkinson
75475ae624
Merge pull request #7633 from JacobBarthelmeh/netos
...
use WOLFSSL_NETOS_STACK_SZ for stack size when creating tx thread
2024-06-24 16:44:47 +10:00
Sean Parkinson
f1b1483c63
Merge pull request #7669 from JacobBarthelmeh/x509_dn
...
sanity check for empty directory strings
2024-06-24 16:44:03 +10:00
Sean Parkinson
a094831e1a
Dilithium: C code optimized
...
Changes to get best out of 32-bit ARM chips.
Fixes come compile errors when cutting out functions.
WOLFSSL_DILITHIUM_SIGN_CHECK_Y and WOLFSSL_DILITHIUM_SIGN_CHECK_W0 added
to speed up signing. No longer specification conformat when either used.
2024-06-24 16:37:43 +10:00
David Garske
2312cb4563
Merge pull request #7667 from SparkiDev/sha3_thumb2_arm32_asm
...
SHA-3 Thumb2, ARM32 ASM: Add assembly implemention
2024-06-23 20:16:32 -07:00
David Garske
59c7abf635
Merge pull request #7675 from douzzer/20240622-SHA3-CRYPTO_CB
...
20240622-SHA3-CRYPTO_CB
2024-06-22 18:21:30 -07:00
Daniel Pouzzner
b4e15d028c
WOLF_CRYPTO_CB && WOLFSSL_SHA3: add FIPS gating to wc_CryptoCb_Sha3Hash() and test routine myCryptoDevCb().
2024-06-22 11:20:53 -05:00
JacobBarthelmeh
0cf5421e5a
Merge pull request #7673 from douzzer/20240621-fix-oqs_dilithium_make_key-leak
...
20240621-fix-oqs_dilithium_make_key-leak
2024-06-21 15:37:24 -06:00
JacobBarthelmeh
7405ea8162
Merge pull request #7671 from miyazakh/dtls_ocsp
...
Fix ocsp response message build for DTLS
2024-06-21 14:43:29 -06:00
JacobBarthelmeh
c9d83babe0
Merge pull request #7363 from kaleb-himes/WinCE-supporting-work
...
Manually check-in pre-operational-testing changes for WinCE port effort
2024-06-21 14:02:48 -06:00
kaleb-himes
23f796c0b4
Cleanup excess line
2024-06-21 15:55:08 -04:00
kaleb-himes
871dc9c19b
Implement peer review feedback
2024-06-21 15:54:04 -04:00
kaleb-himes
a1645d684a
448 streaming base on ENABLED flag and below FIPS section
2024-06-21 15:54:04 -04:00
kaleb-himes
f00e5247bb
Add sanity for case id'd in optesting review
2024-06-21 15:54:04 -04:00
JacobBarthelmeh
e72db4a306
Merge pull request #7612 from dgarske/rsa_pad
...
Improvements to RSA padding to expose Pad/Unpad API's
2024-06-21 13:19:28 -06:00
JacobBarthelmeh
aea32e37a9
Merge pull request #7140 from kaleb-himes/140-3-ARMv8-PAA-porting
...
XCODE support for v5.2.3 of the FIPS module
2024-06-21 13:14:54 -06:00
Daniel Pouzzner
25b72497d8
wolfcrypt/src/dilithium.c: add missing OQS_SIG_free() in oqs_dilithium_make_key() (liboqs wrapper).
2024-06-21 14:04:32 -05:00
JacobBarthelmeh
0303a828ec
Merge pull request #7670 from aidangarske/CryptocbSHA3
...
Added crypto callback for SHA3.
2024-06-21 11:28:01 -06:00
kaleb-himes
3eda3436d1
Peer review, great catch! Thanks @JacobBarthelmeh
2024-06-21 10:44:24 -06:00
kaleb-himes
610af43d03
XCODE support for v5.2.3 of the FIPS module
2024-06-21 10:36:57 -06:00
kaleb-himes
94e031e905
Manually check-in pre-operational-testing changes for WinCE port effort
2024-06-21 09:52:57 -06:00
Sean Parkinson
8734f1251d
SHA-3 Thumb2, ARM32 ASM: Add assembly implemention
...
Add SHA-3 assembly implementation for Thumb2 and ARM32.
2024-06-21 14:38:51 +10:00
Hideki Miyazaki
ac5b81edd1
fix unit test
2024-06-21 13:22:00 +09:00
Hideki Miyazaki
30eb558d58
fix ocsp response when using DTLS
2024-06-21 09:57:59 +09:00
aidan garske
e8c3a7dfce
fix for wolfcrypt/src/sha3.c (void)type
2024-06-20 15:03:51 -07:00
aidan garske
1ef9a8fe7c
Added crypto callback for SHA3 and extended the test.c tests for it in cryptocb_test.
2024-06-20 14:15:28 -07:00
JacobBarthelmeh
8ee01ebaf2
sanity check for empty directory strings
2024-06-20 13:42:31 -06:00
JacobBarthelmeh
63f666a599
Merge pull request #7659 from embhorn/zd18179
...
Fixes in ASN1 and X509
2024-06-20 13:10:40 -06:00
David Garske
d545253df7
Merge pull request #7594 from JacobBarthelmeh/socat
...
Updating socat version support
2024-06-20 09:17:41 -07:00
Sean Parkinson
118d2cc8cc
Merge pull request #7664 from anhu/derLenType
...
Der --> Len. Copy paste typo.
2024-06-20 08:53:00 +10:00
Sean Parkinson
75d06cd6f3
SP Intel x64 ASM: fixes
...
Don't use RIP relative with XMM/YMM instructions.
For MSVC asm, explicitly state type for pointer.
For MSVC asm, don't use vmodvqu for saving XMM registers unless this is
AVX2 code.
2024-06-20 08:33:05 +10:00
Anthony Hu
32ca92bd97
Der --> Len. Copy paste typo.
2024-06-19 17:25:54 -04:00
Daniel Pouzzner
38c7327660
Merge pull request #7622 from SparkiDev/ml-dsa
...
Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87
2024-06-19 13:32:35 -04:00
Sean Parkinson
3e3a00dafd
Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87
...
Impemented FIPS 204 (Draft) Module-Lattice-Based Signature Standard.
Implementation include making a key, signing and verification.
Make key API added.
Updated liboqs calls to use ML-DSA implementation instead of Dilithium.
2024-06-19 21:27:01 +10:00
JacobBarthelmeh
24291b4147
Merge pull request #7600 from SparkiDev/wc_ecc_mulmod_zero_z1
...
ECC: when multiplying by zero, set z to 1
2024-06-18 16:36:35 -06:00
JacobBarthelmeh
2b0d724a4d
Merge pull request #7658 from douzzer/20240618-linuxkm-4.14.336LTS
...
20240618-linuxkm-4.14.336LTS
2024-06-18 16:31:37 -06:00
David Garske
71be6524f7
Merge pull request #7649 from SparkiDev/cortexm_label_fix
...
Cortex-M inline assembly: labels with unique number appended
2024-06-18 15:31:13 -07:00
Sean Parkinson
6f4aa54f5b
Merge pull request #7655 from JacobBarthelmeh/vcpkg
...
add no stub and ex data cmake options
2024-06-19 07:45:31 +10:00
JacobBarthelmeh
9175355c81
set LD_LIBRARY_PATH for socat test
...
work around hang from test 373 to 374
add setting SHELL env for socat test
remove some tests for exec sniffing and sorted address options failing with actions but not locally
2024-06-18 14:46:09 -06:00
Eric Blankenhorn
d4a90e8a71
Fix wolfSSL_ASN1_TIME_to_generalizedtime with UTC time
2024-06-18 15:08:01 -05:00
Eric Blankenhorn
5efa82a239
Check for null sig in wolfSSL_X509_CRL_get_signature
2024-06-18 14:47:01 -05:00
Eric Blankenhorn
95cd9c81c8
Add attr to get_dn_attr_by_nid
2024-06-18 14:41:58 -05:00
Daniel Pouzzner
f6f83a20ed
linuxkm/linuxkm_wc_port.h: add a suppression needed for targeting LTS kernel version 4.14.336.
2024-06-18 14:39:44 -05:00
JacobBarthelmeh
684fef2429
add no stub and ex data cmake options
2024-06-18 10:20:18 -06:00
JacobBarthelmeh
eef20ceb51
Merge pull request #7654 from SparkiDev/kyber_c_ntt_invntt_fast
...
Kyber: Improve performance of C implementation
2024-06-18 09:38:25 -06:00
JacobBarthelmeh
0cd3bd7ad3
Merge pull request #7653 from SparkiDev/sm2_offical_tv
...
SM2: change to official test vector
2024-06-18 09:33:05 -06:00
Sean Parkinson
1eea3720e3
Merge pull request #7647 from douzzer/20240614-WOLFSSL_MSG-code-points
...
20240614-WOLFSSL_MSG-code-points
2024-06-18 18:37:35 +10:00
Sean Parkinson
f863513f37
Kyber: Improve performance of C implementation
...
Add larger faster implementations of NTT and inverse NTT.
Allow smaller but still fast implementations to be used as well.
2024-06-18 18:09:33 +10:00
Daniel Pouzzner
187dbd9974
wolfcrypt/src/logging.c: address peer review for PR #7647 .
2024-06-17 23:37:13 -05:00
Sean Parkinson
c91d306531
Merge pull request #7646 from kojo1/i2d-ecdsa
...
alloc a buffer for NULL pointer
2024-06-18 11:47:44 +10:00
Sean Parkinson
fbd69f9b48
ECC: when multiplying by zero, set z to 1
...
Make sure zero times a point is infinity but z is 1 as it is assumed
later on.
2024-06-18 11:30:57 +10:00
Takashi Kojo
2f379ed322
alloc a buff for NULL pointer
2024-06-18 09:41:11 +09:00
Sean Parkinson
8d77df15ef
SM2: change to official test vector
...
Change create digest to official test vector.
2024-06-18 10:40:47 +10:00
Sean Parkinson
a141041d13
Merge pull request #7652 from douzzer/20240617-fix-wc_Sha256-overalignment
...
20240617-fix-wc_Sha256-overalignment
2024-06-18 10:39:15 +10:00
Daniel Pouzzner
87114faa94
Revert "compatibility for EVP_CipherUpdate with AES-GCM"
...
This reverts commit b7a28cc704 .
WOLFSSL_AESGCM_STREAM needs to be conditional as arranged by configure.ac.
2024-06-17 19:04:19 -05:00
Daniel Pouzzner
f3c93a7b57
wolfssl/wolfcrypt/sha256.h: in definition of struct wc_Sha256, conditionalize alignment optimization of digest and buffer slots on defined(WC_64BIT_CPU), to avoid overalignment warnings on 32 bit targets. this also fixes overalignment of struct Hmac.
2024-06-17 19:03:38 -05:00
Sean Parkinson
7018f464ee
Merge pull request #4718 from kojo1/oss-compat
...
compatibility for EVP_CipherUpdate with AES-GCM
2024-06-18 08:48:36 +10:00
Sean Parkinson
8aaf5670f4
Cortex-M inline assembly: labels with unique number appended
...
When functions are inlined, the labels need to be unique.
Putting '%=' on the end of the label ensures that the compilers appends
a unique number to the end.
2024-06-17 17:47:40 +10:00
Daniel Pouzzner
2c69e4a56b
add --debug-code-points and WOLFSSL_DEBUG_CODEPOINTS,
...
add file_name and line_number args to wolfssl_log(),
and inside WOLFSSL_DEBUG_CODEPOINTS gates,
add WOLFSSL_MSG_EX2(), WOLFSSL_MSG2(), WOLFSSL_ENTER2(), and WOLFSSL_LEAVE2(), each with file and line args,
and add wrapper macros for WOLFSSL_MSG, WOLFSSL_MSG_EX, WOLFSSL_ENTER, and WOLFSSL_LEAVE, that pass in file and line.
2024-06-15 00:54:39 -05:00
Daniel Pouzzner
5df57207ac
Merge pull request #7642 from julek-wolfssl/sasl-action
...
Add sasl action
2024-06-14 19:21:48 -04:00
Daniel Pouzzner
38089f11cd
Merge pull request #7643 from julek-wolfssl/net-snmp-action
...
Add net-snmp action
2024-06-14 19:20:50 -04:00
Juliusz Sosinowicz
a4ee5af1ed
Add sasl action
2024-06-14 12:43:53 +02:00
Daniel Pouzzner
a120b83dac
Merge pull request #7585 from kaleb-himes/SRTP-KDF-CODEREVIEW
...
Add FIPS required forward declaration of streaming struct
2024-06-14 00:53:39 -04:00
JacobBarthelmeh
512b468dbb
explicit socat path with test
2024-06-13 13:15:31 -06:00
JacobBarthelmeh
98d2ca1d42
fix updated socat yml file
2024-06-13 13:01:57 -06:00
JacobBarthelmeh
3d70fb1d50
adjust test yml file
2024-06-13 12:51:51 -06:00
Daniel Pouzzner
385a097646
Merge pull request #7638 from gasbytes/patch
...
added check if the buf is at least RECORD_HEADER_SZ
2024-06-13 14:27:40 -04:00
Juliusz Sosinowicz
fce14ffddb
Add net-snmp action
2024-06-13 17:41:15 +02:00
gasbytes
88527a3d6e
word32 -> sword32
2024-06-13 13:44:50 +02:00
kaleb-himes
8ca8827b58
Isolate forward declaration of Gmac
2024-06-12 18:16:33 -04:00
kaleb-himes
20911f254b
ECC, DH, GCM, GMAC, CCM and AES updated services
2024-06-12 18:16:33 -04:00
kaleb-himes
ae9291f4d3
Add FIPS required forward declaration of streaming struct
2024-06-12 18:16:33 -04:00
Daniel Pouzzner
897d55f060
Merge pull request #7630 from julek-wolfssl/libvncserver-action
...
Add libvncserver action
2024-06-12 17:08:28 -04:00
Daniel Pouzzner
d2f4cc9e28
Merge pull request #7616 from embhorn/zd17762
...
Static analysis fixes
2024-06-12 17:07:02 -04:00
Daniel Pouzzner
b0d0a1afe8
Merge pull request #7639 from bandi13/fixLibOQS
...
liboqs depends on pthreads now
2024-06-12 14:52:50 -04:00
Andras Fekete
372f57e528
Address PR suggestions
2024-06-12 14:22:10 -04:00
Andras Fekete
211742bfe0
liboqs depends on pthreads now
2024-06-12 13:45:57 -04:00
Kaleb Himes
9f9a82e469
Merge pull request #7637 from lealem47/armasm_fips
...
Force inline ASM for armv7 with FIPS
2024-06-12 07:53:37 -06:00
gojimmypi
20e0e12185
Exclude autogen binaries from ESP8266 client example makefile
2024-06-12 09:51:10 +02:00
gasbytes
845e2f752c
added check if the buf is at least RECORD_HEADER_SZ
...
when adding the record headers through quic
2024-06-11 22:10:18 +02:00
Lealem Amedie
b7d32d0609
Force inline ASM for armv7 with FIPS
2024-06-11 13:32:46 -06:00
gojimmypi
891b986fd4
Clarify WOLFSSL_ROOT location for ESP8266 make builds
2024-06-11 18:13:24 +02:00
Sean Parkinson
d49308e64a
Merge pull request #7634 from douzzer/20240608-WOLFSSL_DEBUG_TRACE_ERROR_CODES
...
20240608-WOLFSSL_DEBUG_TRACE_ERROR_CODES
2024-06-11 21:25:22 +10:00
Daniel Pouzzner
ac459e3cec
Merge pull request #7631 from dgarske/cmake_singlethreaded
...
Fix for CMake single threaded
2024-06-10 19:29:10 -04:00
JacobBarthelmeh
30dbf7c047
add socat yml CI test
2024-06-10 16:56:54 -06:00
Daniel Pouzzner
202b0a15b4
Merge pull request #7629 from julek-wolfssl/test_wrong_cs_downgrade-clamp
...
test_wrong_cs_downgrade: clamp error to exact value
2024-06-10 18:26:54 -04:00
JacobBarthelmeh
b9e5c0252d
remove extra asign and use ExpectIntEQ test directly
2024-06-10 16:19:27 -06:00
Daniel Pouzzner
1b907d05ed
WOLFSSL_DEBUG_TRACE_ERROR_CODES: restore several initializations, one because needed (in wolfSSL_UseSecureRenegotiation()), the rest in an abundance of caution, and rearrange wolfSSL_CryptHwMutexInit() and wolfSSL_CryptHwMutexUnLock() in a similar abundance of caution.
2024-06-10 13:44:03 -05:00
Daniel Pouzzner
b3e8f0ad24
add --enable-debug-trace-errcodes, WOLFSSL_DEBUG_TRACE_ERROR_CODES, WC_ERR_TRACE(), WC_NO_ERR_TRACE(), support/gen-debug-trace-error-codes.sh. also add numerous deployments of WC_NO_ERR_TRACE() to inhibit frivolous/misleading errcode traces when -DWOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-06-08 16:39:53 -05:00
JacobBarthelmeh
1753d524d7
use WOLFSSL_NETOS_STACK_SZ for stack size when creating tx thread
2024-06-07 14:30:26 -06:00
JacobBarthelmeh
f7bc78cad0
Merge pull request #7602 from night1rider/Parsing-bug
...
Send BUFFER_ERROR if size does not meet minimum Requirements
2024-06-07 13:54:03 -06:00
night1rider
ebca3376ef
Send BUFFER_ERROR if size does not meet minimum reqs for the extension
2024-06-07 10:26:30 -06:00
David Garske
e960a00650
Merge pull request #7625 from JacobBarthelmeh/x509
...
sanity check on non conforming serial number of 0
2024-06-07 08:33:38 -07:00
David Garske
fda8b4f64f
Fix for CMake single threaded. https://github.com/wolfSSL/wolfssl/issues/7609#issuecomment-2154327463
2024-06-07 06:59:59 -07:00
Juliusz Sosinowicz
6a29dfc6fb
Add libvncserver action
...
Depends on https://github.com/wolfSSL/osp/pull/176
2024-06-07 12:40:48 +02:00
Juliusz Sosinowicz
8c47e8d6f2
test_wrong_cs_downgrade: clamp error to exact value
2024-06-07 11:33:38 +02:00
Sean Parkinson
d7d8d14e95
TLS: wrong TLS version in alert after ClientHello
...
Ignore protocol version being less than expected when received directly
after ClientHello.
Protocol version negotiation hasn't taken place and a lower version can
be sent to cover minimum supported protocol version.
2024-06-07 10:42:12 +10:00
Sean Parkinson
1c51465584
Merge pull request #7627 from douzzer/20240606-clang-tidy-and-mingw-fixes
...
20240606-clang-tidy-and-mingw-fixes
2024-06-07 10:08:55 +10:00
JacobBarthelmeh
d09f955e6c
Merge pull request #7626 from lealem47/parseServerHello
...
Improved fix for TLS1.3 to TLS1.2 client downgrade
2024-06-06 17:16:30 -06:00
Sean Parkinson
c82230324e
Merge pull request #7546 from oltolm/cmake
...
cmake: fix generation of options.h
2024-06-07 08:51:12 +10:00
JacobBarthelmeh
3d33c78e9d
use unsigned char instead of uint8_t
2024-06-06 16:30:40 -06:00
JacobBarthelmeh
467b3cb561
add parsing 0 serial numbers for certs with python
2024-06-06 16:24:48 -06:00
Daniel Pouzzner
ac5cabaac9
fixes for USE_WINDOWS_API && !NO_FILESYSTEM && !NO_WOLFSSL_DIR:
...
* in wc_port.h, add XWRITE and XREAD definitions and include <io.h>;
* in wolfSSL_BIO_read(), implement Windows support for XREAD and XWRITE;
* in wolfSSL_BIO_write_filename(), add 'b' flag to XFOPEN flags;
* in wolfSSL_RAND_file_name(), add support for XALTHOMEVARNAME, and add Windows definition for it to wc_port.h alongside XWRITE and XREAD.
fixes test_wolfSSL_BIO, test_wolfSSL_X509_print, test_wolfSSL_RAND, test_wolfSSL_RSA_print in cross-mingw-all-crypto scenario.
2024-06-06 17:14:12 -05:00
Lealem Amedie
5a1ac2742c
Reviewer feedback
2024-06-06 16:08:39 -06:00
Daniel Pouzzner
71db561c96
wolfcrypt/src/port/riscv/riscv-64-aes.c: fix trailing whitespace.
2024-06-06 16:25:50 -05:00
Daniel Pouzzner
ef925b8b30
wolfcrypt/src/wc_kyber_poly.c: fix bugprone-macro-parentheses for FROM_MSG_BIT.
2024-06-06 16:21:32 -05:00
JacobBarthelmeh
68f52cb49a
add test case
2024-06-06 15:06:15 -06:00
Lealem Amedie
3de358ef06
Ensure extensions are only parsed once
2024-06-06 14:10:56 -06:00
Daniel Pouzzner
d80f05bf77
Merge pull request #7624 from gasbytes/stack-on-calcdx
...
update CalcDX with small-stack support
2024-06-06 16:05:56 -04:00
Lealem Amedie
7cc0ac14c4
Adding test case
2024-06-06 13:24:07 -06:00
JacobBarthelmeh
690d8f7f89
sanity check on non conforming serial number of 0
2024-06-06 13:22:57 -06:00
Lealem Amedie
f3061359d8
Improved fix for TLS1.3 to TLS1.2 client downgrade
2024-06-06 12:22:50 -06:00
David Garske
60ccaf379d
Remove uses of stdint in api.c.
2024-06-06 10:57:46 -07:00
JacobBarthelmeh
29df90197e
Merge pull request #7623 from bandi13/FixOpenSSLTest
...
Sometimes the first call hangs because the server is not completely up
2024-06-06 09:11:36 -06:00
David Garske
b69482ffac
Merge pull request #7569 from SparkiDev/riscv_aes_asm
...
AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM
2024-06-06 08:11:31 -07:00
JacobBarthelmeh
7ce9ebde15
Merge pull request #7618 from julek-wolfssl/jwt-cpp
...
Fixes for jwt-cpp
2024-06-06 08:57:46 -06:00
Andras Fekete
fbb2737c2a
Sometimes the first call hangs because the server is not completely up
2024-06-06 10:38:11 -04:00
Sean Parkinson
acd604db3d
AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM
...
Add implementations of AES for ECB/CBC/CTR/GCM/CCM for RISC-V using
assembly.
Assembly with standard/scalar cryptography/vector cryptographt
instructions.
2024-06-06 13:16:00 +10:00
David Garske
5132a17fab
Merge pull request #7613 from SparkiDev/kyber_fixes_2
...
Kyber: fix kyber_from_msg()
2024-06-05 17:28:39 -07:00
Sean Parkinson
b7d0c257e6
Merge pull request #7621 from douzzer/20240605-rename-fe_x25519_128
...
20240605-rename-fe_x25519_128
2024-06-06 09:41:52 +10:00
Sean Parkinson
162dffb463
Merge pull request #7619 from lealem47/zd18074
...
Fix for TLS1.3 to 1.2 downgrade
2024-06-06 09:39:32 +10:00
David Garske
1f75d0e1d7
Merge pull request #7620 from anhu/doc_wolfSSL_is_init_finished
...
Quick fixup in API doc for wolfSSL_is_init_finished()
2024-06-05 15:43:40 -07:00
Daniel Pouzzner
92bbd651b6
rename wolfcrypt/src/fe_x25519_128.i to wolfcrypt/src/fe_x25519_128.h to avoid appearance as a cleanable intermediate.
2024-06-05 16:56:03 -05:00
Anthony Hu
0de974c3a7
Quick fixup in API doc for wolfSSL_is_init_finished()
2024-06-05 16:40:06 -04:00
Lealem Amedie
d20ac2ce42
Fix for TLS1.3 to 1.2 downgrade
2024-06-05 11:26:10 -06:00
Chris Conlon
70d317ec79
Merge pull request #7571 from rlm2002/internship
...
Test case for wc_HpkeGenerateKeyPair() NULL argument
2024-06-05 10:57:19 -06:00
gasbytes
589353f346
update CalcDX with small-stack support
2024-06-05 18:53:34 +02:00
JacobBarthelmeh
18526152fe
Merge pull request #7610 from gasbytes/sni-wrappers
...
CSharp Wrapper SNI Support
2024-06-05 10:27:42 -06:00
JacobBarthelmeh
8d63fb5fe5
Merge pull request #7590 from julek-wolfssl/expose-alerts
...
Allow user to send a user_canceled alert
2024-06-05 10:08:21 -06:00
JacobBarthelmeh
592a4522e1
Merge pull request #7615 from jackctj117/ssl-static-memory
...
Added Static Buffer Allocation API
2024-06-05 09:56:06 -06:00
gasbytes
453e2fadc1
dh2048Pem -> dhparam
2024-06-05 17:45:34 +02:00
David Garske
f3b61487e5
Merge pull request #7617 from julek-wolfssl/ipmitool
...
Add ipmitool action
2024-06-05 08:39:54 -07:00
Juliusz Sosinowicz
b3e795c4a5
Add jwt-cpp action
2024-06-05 15:06:12 +02:00
Juliusz Sosinowicz
72243300bf
HMAC: fix signature
2024-06-05 13:43:57 +02:00
Juliusz Sosinowicz
ea02fea3ef
opensslv: include version.h for libwolfssl hex symbol
2024-06-05 13:43:57 +02:00
gasbytes
2ab709c89a
- Platform specific function to correctly set the path for the certificates;
...
- Updated all the examples with it;
2024-06-05 13:28:30 +02:00
gasbytes
6cb97a7262
fixed windows build path problem
2024-06-04 23:12:16 +02:00
gasbytes
f231c7be03
updated the README & haveSNI function
2024-06-04 23:08:56 +02:00
JacobBarthelmeh
119d2a5da1
do session conversion dance
2024-06-04 14:41:01 -06:00
Eric Blankenhorn
55837fa254
Static analysis fixes
2024-06-04 12:37:46 -05:00
gasbytes
70fc5c97fb
made the workflow to compile & executes easier, updated the readme also
2024-06-04 19:13:51 +02:00
Jack Tjaden
7adf0fde8c
Added Static Buffer Allocation API
2024-06-04 10:30:21 -06:00
gasbytes
983610ed68
- Applied David's patch to get access to the missing sni callback (arg)
...
- removed tlsext callback (since it's a compatibility one)
- updated testing examples and wrapper
2024-06-04 18:26:01 +02:00
gasbytes
5d0b7e0d18
updated readme & sni function
2024-06-04 17:54:21 +02:00
David Garske
0397d90713
Merge pull request #7614 from julek-wolfssl/pam-ipmi-tests
...
Fix pam-ipmi test
2024-06-04 08:20:27 -07:00
Juliusz Sosinowicz
ede8cde8a7
dtls: Increment sequence number in SendAlert
2024-06-04 17:13:04 +02:00
Juliusz Sosinowicz
e428c2833b
Allow user to send a user_canceled alert
2024-06-04 17:13:04 +02:00
Juliusz Sosinowicz
2c644eb38a
Add ipmitool action
2024-06-04 16:44:59 +02:00
Juliusz Sosinowicz
04430f55ca
Fix pam-ipmi test
2024-06-04 16:09:35 +02:00
Sean Parkinson
df44face56
Kyber: fix kyber_from_msg()
...
New compilers with specific optimization levels will produce
non-constant time code for kyber_from_msg().
Add in an optimization blocker that stops the compiler from assuming
anything about the value to be ANDed with KYBER_Q_1_HALF.
2024-06-04 22:20:22 +10:00
David Garske
eb8f26926d
Move the options.h.in template for cmake into new location. Added note about adding new options.
2024-06-03 15:38:36 -07:00
John Safranek
514fdfcd43
Merge pull request #7591 from dgarske/wolfssh_template
...
Template for wolfSSH minimal build using user_settings.h
2024-06-03 15:34:17 -07:00
David Garske
78b056c1b0
Merge pull request #7611 from lealem47/gh7609
...
cmake: Define SINGLE_THREADED macro when option enabled
2024-06-03 15:28:16 -07:00
David Garske
8763b127d9
Add CI test for the new user_settings_wolfssh.h.
2024-06-03 14:27:07 -07:00
gasbytes
b2e7707f18
removed sniHostName no longer used
2024-06-03 21:33:55 +02:00
gasbytes
c04c7685b1
added callback example: setting sni cb & arg server side, and passing the name client side via -S flag
2024-06-03 21:24:54 +02:00
David Garske
305a754de3
Improvements to RSA padding. Expose API's to support external pad/unpad.
2024-06-03 12:23:31 -07:00
David Garske
d07d4fb8ac
Update support for wolfSSH with RSA_LOW_MEM.
2024-06-03 12:08:37 -07:00
David Garske
1f684e62d6
Merge pull request #7604 from ColtonWilley/explicit_len_pattern_match
...
Rewrite pattern matching to use explicit length
2024-06-03 12:04:12 -07:00
gasbytes
c325de993d
removed WOLFSSL_SNI_HOST_NAME_OUTER && minor fix (missing sniHostName got lost during editing)
2024-06-03 20:05:00 +02:00
Lealem Amedie
a2e26fb36e
cmake: define SINGLE_THREADED macro when option enabled
2024-06-03 12:01:50 -06:00
David Garske
b4910c4615
wolfSSH size optimizations. Disable RSA OAEP, enable SHA-1 with DH. Do not need SHA2-384/512.
2024-06-03 09:34:53 -07:00
David Garske
cfbadc8b07
Fixes for wolfSSH user_settings.h template. Add low resource option.
2024-06-03 09:34:53 -07:00
David Garske
3d374239a1
Template for wolfSSH minimal build using user_settings.h. ZD 17991.
2024-06-03 09:34:52 -07:00
David Garske
43f4ba91da
Merge pull request #7608 from ejohnstown/rsa-add
...
Import Raw RSA Private Key
2024-06-03 09:33:38 -07:00
Colton Willey
0c0069331b
Use same types for i and chklen, bring all lines under 80 chars
2024-06-03 09:25:41 -07:00
David Garske
4140a05fe4
Merge pull request #7592 from julek-wolfssl/pam-ipmi-tests
...
Add pam-ipmi action
2024-06-03 09:12:22 -07:00
John Safranek
e8e6eaeb4d
Import Raw Rsa Key
...
1. Add API for importing an RSA private key, `wc_RsaPrivateKeyDecodeRaw()`,
when all you have are the components of the key in raw arrays. Also
recalculates dP and dQ if missing.
2. Add API test for `wc_RsaPrivateKeyDecodeRaw()`.
2024-06-03 09:03:29 -07:00
Juliusz Sosinowicz
b1146becfd
Add pam-ipmi action
2024-06-03 14:13:06 +02:00
gasbytes
6f567b58bc
completed the examples
2024-06-02 00:01:51 +02:00
gasbytes
15ac366bf9
added missing wrappers for sni setup & frees
2024-06-01 17:46:17 +02:00
David Garske
3975af88cf
Merge pull request #7191 from kojo1/ecpoint-h2p
...
Add EC_POINT_hex2point
2024-06-01 07:13:31 -07:00
Takashi Kojo
bc2b184c98
Add EC_POINT_hex2point: zd #17090
2024-06-01 13:45:35 +09:00
David Garske
26284e2e5d
Merge pull request #7607 from gojimmypi/PR-fix-7606
...
Fix for #7606 : ESP_LOGI typo in esp32_sha.c
2024-05-31 17:59:08 -07:00
JacobBarthelmeh
533aa48b14
adjust macro guards around get max fragment
2024-05-31 16:52:31 -06:00
JacobBarthelmeh
2445fe844a
rework get max fragment length
2024-05-31 16:45:50 -06:00
gojimmypi
4d2ce1131a
Fix for #7606 : ESP_LOGI typo
2024-05-31 15:33:46 -07:00
JacobBarthelmeh
2caee1c7c5
add support for spaces around '=' with x509 name print
2024-05-31 15:04:01 -06:00
JacobBarthelmeh
ff7626419e
add some simple test cases
2024-05-31 15:02:58 -06:00
JacobBarthelmeh
01a1685159
updating socat support to version 1.8.0.0
2024-05-31 15:02:58 -06:00
David Garske
5657d88ddb
Merge pull request #7605 from douzzer/20240531-linuxkm-6v10-updates
...
20240531-linuxkm-6v10-updates
2024-05-31 11:41:27 -07:00
Daniel Pouzzner
d3a6b71f5f
linuxkm/Makefile: copy link tree of wolfcrypt/ as a whole, rather than just wolfcrypt/src/ and wolfcrypt/test/, to pull in wolfcrypt/benchmark/.
2024-05-31 13:11:52 -05:00
JacobBarthelmeh
40562a0cb3
Merge pull request #7599 from dgarske/asn_checkcertsig
...
Expose `wc_CheckCertSigPubKey` with `WOLFSSL_SMALL_CERT_VERIFY`
2024-05-31 09:20:35 -06:00
David Garske
0789ecb808
Fix the CheckCertSignature API mess.
2024-05-31 06:58:35 -07:00
Colton Willey
447f73c25e
Merge branch 'master' of github.com:ColtonWilley/wolfssl into explicit_len_pattern_match
2024-05-30 20:12:16 -07:00
Sean Parkinson
4b77d4caa1
Merge pull request #7589 from rizlik/sp800_56c
...
wolfcrypt: support NIST 800-56C Option 1 KDF
2024-05-31 11:55:12 +10:00
Sean Parkinson
fc8a509b06
Merge pull request #7597 from ColtonWilley/max_altnames_and_name_constraints
...
Max limits on number of alternative names and name constraints
2024-05-31 11:24:30 +10:00
Colton Willey
f646cbcecb
Address review comments, fix handling of . in name matching and add more tests for . handling
2024-05-30 18:03:38 -07:00
David Garske
7fadd4ed9f
Merge pull request #7595 from JacobBarthelmeh/static
...
Pull in some staticmemory features
2024-05-30 16:31:54 -07:00
David Garske
bb57c1de94
Merge pull request #7603 from lealem47/detect_cut
...
Fix cut detection in configure.ac
2024-05-30 15:42:55 -07:00
Colton Willey
af3828b2b7
Rewrite pattern matching to always use explicit lengths instead of expecting NULL terminated strings, thus replicating the behavior of openssl X509_check_host()
2024-05-30 15:33:17 -07:00
Lealem Amedie
ecef3c214c
Fix cut detection in configure.ac
2024-05-30 16:09:04 -06:00
JacobBarthelmeh
ebdc8b9a32
rename of macros, add descriptions, minor fixes
2024-05-30 14:48:52 -06:00
Colton Willey
1310c97a22
Add new certs to include.am
2024-05-30 12:45:46 -07:00
David Garske
66a5d8cc8a
Merge pull request #7601 from douzzer/20240529-linuxkm-6v10-updates
...
20240529-linuxkm-6v10-updates
2024-05-30 11:49:11 -07:00
David Garske
107c10d795
Merge pull request #7596 from JacobBarthelmeh/decl
...
make function signature match declaration
2024-05-30 10:59:04 -07:00
David Garske
61fea768b3
Merge pull request #7598 from JacobBarthelmeh/x509
...
fix typo with NO_CERTS macro
2024-05-30 09:59:37 -07:00
Daniel Pouzzner
41cbbfe3ab
linuxkm: updates for kernel 6.10: use new _noprof names for newly macro-shimmed kmalloc, krealloc, kzmalloc, kvmalloc_node, and kmalloc_trace, and refactor linuxkm/Makefile and linuxkm/Kbuild to set up links to sources in the dest tree (works around breakage from linux commit 9a0ebe5011).
2024-05-30 11:21:42 -05:00
JacobBarthelmeh
34ca03770f
still compile in wc_RsaKeyToDer with keygen but NO_CERTS
2024-05-30 09:58:25 -06:00
gasbytes
52f1caf699
minor changes to the prototypes and actual implementation
2024-05-30 16:44:34 +02:00
gasbytes
095609107d
prototypes
2024-05-30 16:14:17 +02:00
gasbytes
23bfb01e54
environment setup, updated the README
2024-05-30 15:41:01 +02:00
Marco Oliverio
174456437e
wolcrypt: NIST_SP_800_56C address reviewer's comments
2024-05-30 11:39:49 +02:00
Colton Willey
f13a82610c
Add flag guard for IGNORE_NAME_CONSTRAINTS
2024-05-29 22:41:36 -07:00
Colton Willey
a17677c946
Remove trailing whitespace
2024-05-29 21:29:55 -07:00
Colton Willey
473de5796c
Free ctx before return
2024-05-29 20:52:09 -07:00
Colton Willey
284dea43fe
Unify max name testing to use cert files for both cases.
2024-05-29 19:00:15 -07:00
Colton Willey
e620b47e1a
Add configuration file for generating cert with too many name constraints
2024-05-29 18:23:13 -07:00
Colton Willey
a4544ce2eb
Updates to address review comments
2024-05-29 17:54:52 -07:00
Colton Willey
af537a6ae3
Move definition to beginning of block
2024-05-29 17:02:29 -07:00
David Garske
3e9f656ac3
Merge pull request #7580 from kareem-wolfssl/zd17975
...
Fix missing stdio.h include on Freescale MQX. Use sprintf as snprintf is not available on MQX.
2024-05-29 16:55:34 -07:00
David Garske
0b7f293691
Expose wc_CheckCertSigPubKey with WOLFSSL_SMALL_CERT_VERIFY.
2024-05-29 16:32:31 -07:00
JacobBarthelmeh
cf61df129c
fix typo with NO_CERTS macro
2024-05-29 17:08:01 -06:00
JacobBarthelmeh
9673b3f218
make function signature match declaration
2024-05-29 17:00:22 -06:00
Colton Willey
b00ae2ac69
Initial implementation of max limits on number of alternative names and name constraints
2024-05-29 15:55:17 -07:00
JacobBarthelmeh
511c403631
account for yes/no options
2024-05-29 15:59:51 -06:00
JacobBarthelmeh
6cca3a0d92
tie in static memory debug callback
2024-05-29 15:50:14 -06:00
JacobBarthelmeh
288fe430f5
tying in lean staticmemory build with --enable-staticmemory=small
2024-05-29 15:50:11 -06:00
JacobBarthelmeh
18d80864b9
add lean static memory build
2024-05-29 15:44:09 -06:00
Marco Oliverio
8d41e68d1f
fix: minor typos
2024-05-28 22:59:01 +02:00
Marco Oliverio
5306a85465
wolfcrypt: support NIST 800-56C Option 1 KDF
2024-05-28 14:40:52 +02:00
David Garske
200f309e0e
Merge pull request #7587 from douzzer/20240524-pq-clang-tidy
...
20240524-pq-clang-tidy
2024-05-24 16:40:11 -07:00
Anthony Hu
021b573027
Merge pull request #7581 from dgarske/embos_emnet
...
Fixes for Segger emNet to handle non-blocking want read/want write
2024-05-24 17:31:16 -04:00
Daniel Pouzzner
8de00d7651
fix benign clang-analyzer-deadcode.DeadStores in pq crypto files introduced in 9a58301ab1.
2024-05-24 14:24:02 -05:00
Kareem
911f21ed36
Fix missing stdio.h include and XSNPRINTF definition on Freescale MQX.
2024-05-24 11:54:23 -07:00
Juliusz Sosinowicz
a5154b22f1
Merge pull request #7583 from gasbytes/patch-segv
...
separating two x509_store xmalloc checks
2024-05-24 19:58:29 +02:00
gasbytes
063e48014a
fix tabs and spaces
2024-05-24 17:52:54 +02:00
David Garske
9b058ec3a2
Fixes for EMNET with non-blocking to handle want read/want write. ZD 18012
2024-05-24 07:42:18 -07:00
David Garske
3b5517692e
Merge pull request #7582 from aidangarske/hpke_test_fix
...
Revert change from PR #7570
2024-05-24 07:35:39 -07:00
David Garske
51f19f42c6
Merge pull request #7574 from douzzer/20240522-quantum-safe-linuxkm
...
20240522-quantum-safe-linuxkm
2024-05-24 07:35:01 -07:00
David Garske
76e7d8627f
Merge pull request #7584 from Frauschi/zephyr_fix
...
Zephyr fix for XSTRNCASECMP
2024-05-24 07:32:53 -07:00
Tobias Frauenschläger
30eb26bd79
Zephyr fix for XSTRNCASECMP
...
The macro missed the third argument for wc_strncasecmp().
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-24 11:49:58 +02:00
gasbytes
3f96d14b32
80 characters limit fix
2024-05-24 00:12:38 +02:00
gasbytes
12a5cb45fb
separating two x509_store xmalloc checks
2024-05-23 23:04:00 +02:00
Ruby Martin
078fb66b29
Negative tests for all NULL arguments
2024-05-23 14:16:17 -06:00
Ruby Martin
b8838dca44
Tests all NULL argument cases
2024-05-23 13:36:48 -06:00
aidan garske
3670bfb9ae
Revert change from PR #7570
2024-05-23 12:34:59 -07:00
Tobias Frauenschläger
d28dd602e5
Various fixes for dual algorithm certificates ( #7577 )
...
This commit adds varios fixes for the implementation of hybrid
certificates with two algorithms:
* Support for Certificate Signing Requests (both creating hybrid ones
and also verifying ones)
* Fix for SAN fields in the DecodedCert and PreTBS generation
* Fix related to WOLFSSL_SMALL_STACK
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 15:03:55 -04:00
Anthony Hu
b98e4e0093
Merge pull request #7576 from Frauschi/pqc_private_key_fix
...
Fix PQC and hybrid certificate regressions
2024-05-23 15:03:16 -04:00
Chris Conlon
e05dbd531e
Merge pull request #7570 from jackctj117/test
...
Code Coverage for hpke.c test case HAVE_CURVE448 using test.c
2024-05-23 11:49:37 -06:00
Chris Conlon
688ae60cd9
Merge pull request #7573 from aidangarske/hpke_sha512_test
...
Add test for HPKE for Curve448
2024-05-23 11:46:30 -06:00
David Garske
ff6e6848de
Merge pull request #7578 from Frauschi/stm32h5_aes
...
Add support for STM32H5 AES hardware acceleration
2024-05-23 10:38:44 -07:00
David Garske
40db521f8b
Merge pull request #7575 from josepho0918/cmac
...
Simplify CMAC verification logic
2024-05-23 10:37:57 -07:00
Tobias Frauenschläger
9a58301ab1
Fix PQC and hybrid certificate regressions
...
Due to recent changes in the logic to decode private keys and to parse
the TLS1.3 CertificateVerify message, some regressions regarding PQC
private keys and hybrid certificates have been introduced:
* Decoding PQC private keys fails as the PKCS8 header of a decoded DER
file is now already removed before parsing the key.
* The key size wasn't properly stored in the context for PQC keys after
decoding a certificate (always the maximum size)
* The two 16-bit size values in case of a hybrid signature in the
CertificateVerify message have been incorrectly decoded as 32-bit
values instead of 16-bit values. This resulted in wrong values,
leading to segmentation faults.
All three regressions are fixed with the changes in this commit.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 16:01:28 +02:00
Sean Parkinson
023f604213
Merge pull request #7572 from douzzer/20240522-sha256-avx1-IS_INTEL_SHA
...
20240522-sha256-avx1-IS_INTEL_SHA
2024-05-23 22:37:54 +10:00
Tobias Frauenschläger
82642c1ee1
Add support for STM32H5 AES hardware acceleration
...
Tested with STM32H573i discovery board.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 12:22:11 +02:00
Joseph Chen
8a7e3ba52e
Simplify CMAC verification logic
2024-05-23 15:12:10 +08:00
Daniel Pouzzner
5c497c62e7
initial linuxkm compatibility (no asm yet) for wc_kyber, wc_xmss, and wc_lms, and smallstack refactors for kyber512_kat(), kyber768_kat(), kyber1024_kat(), and kyber_test().
2024-05-23 00:15:32 -05:00
Ruby Martin
f2492da6a4
include negative test comment and BAD_FUNC_ARG
2024-05-22 16:20:20 -06:00
Jack Tjaden
14068fb7f3
Removed returns & check next case for ret
2024-05-22 15:58:09 -06:00
Ruby Martin
159981f442
include negative test comment and BAD_FUNC_ARG
2024-05-22 15:23:38 -06:00
Daniel Pouzzner
110f4ec737
wolfcrypt/src/sha256.c: in WC_NO_INTERNAL_FUNCTION_POINTERS code path (linuxkm), fix oversight whereby Transform_Sha256_AVX1_Sha() was used on targets with false IS_INTEL_SHA(intel_flags). the former SHA256_AVX1 method id is now split into SHA256_AVX1_SHA and SHA256_AVX1_NOSHA, with corresponding fixes in Sha256_SetTransform(), inline_XTRANSFORM() and inline_XTRANSFORM_LEN().
2024-05-22 15:39:46 -05:00
David Garske
24f581fe13
Merge pull request #7557 from cconlon/jniSessionCerts
...
Update --enable-jni to define SESSION_CERTS for wolfJSSE
2024-05-22 13:08:00 -07:00
aidan garske
fe5cc9589b
Add HPKE Curve448 test case, however HPKE does not support 448 yet, so expect bad function argument return code.
2024-05-22 12:49:56 -07:00
Jack Tjaden
1a000ef94c
single_test and BAD_FUNC_ARG fix
2024-05-22 13:13:56 -06:00
Jack Tjaden
52b6c361f9
test.c code coverage test hpke.c
2024-05-22 11:51:44 -06:00
David Garske
cb0048dbb1
Merge pull request #7567 from embhorn/gh7564
...
Fix doc for wolfSSL_CTX_EnableOCSP
2024-05-22 08:46:20 -07:00
David Garske
425dd1986b
Merge pull request #7568 from lealem47/fips_pkcallback
...
Fix building FIPS v5 with PK callbacks
2024-05-22 08:45:58 -07:00
Ruby Martin
fe9882769e
Test case for wc_HpkeGenerateKeyPair() NULL argument
2024-05-22 09:13:31 -06:00
Eric Blankenhorn
314afc9e10
Fix doc for wolfSSL_CTX_EnableOCSP
2024-05-21 16:12:23 -05:00
Lealem Amedie
ba5cc9bdaf
Fix building FIPS v5 with PK callbacks
2024-05-21 15:07:32 -06:00
Chris Conlon
8f1029f86d
Update --enable-jni to define SESSION_CERTS for wolfJSSE
2024-05-17 15:08:37 -06:00
oltolm
f744043db1
change the way "wolfssl/options.h.in" is generated
2024-05-16 18:55:27 +02:00
oltolm
5f46809988
fix compilation of tests with GCC
2024-05-16 18:55:27 +02:00
Fernando Oleo Blanco
ad25e9b063
[Ada] Clean Alire recipe
2024-05-15 22:33:29 +02:00
Fernando Oleo Blanco
8d49dce2cb
[Ada] Fix crate name in Alire
2024-04-06 01:12:02 +02:00
Fernando Oleo Blanco
afc1e96899
[Ada] Add initial Alire support, alpha version
2024-04-05 23:29:45 +02:00
Fernando Oleo Blanco
77cd3b837b
[Ada] Explicitly add netdb.h support
2024-04-05 23:27:24 +02:00
Fernando Oleo Blanco
4a5373f21b
Add Ada/Alire files to gitignore
2024-04-05 23:23:26 +02:00
Fernando Oleo Blanco
32d0abb407
Merge branch 'wolfSSL:master' into master
2024-04-05 22:11:28 +02:00
Fernando Oleo Blanco
79235a4698
[Ada] Initial library support
2024-03-06 20:20:55 +01:00
Takashi Kojo
791c9e7aba
Add EC_POINT_hex2point
2024-02-02 07:34:38 +09: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
Takashi Kojo
b7a28cc704
compatibility for EVP_CipherUpdate with AES-GCM
2022-12-23 09:09:20 +09:00