Compare commits

...

2327 Commits

Author SHA1 Message Date
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
1745 changed files with 304628 additions and 74325 deletions

18
.codespellexcludelines Normal file
View File

@@ -0,0 +1,18 @@
###############################################################################
# In this file, you should add the line of the file that needs to be ignored.
# The line should be exactly as it appears in the file.
###############################################################################
0x0b, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, /* .Enginee */
0x66, 0x6f, 0x40, 0x77, 0x6f, 0x6c, 0x66, 0x73, /* fo@wolfs */
0x0a, 0x8b, 0x98, 0xf3, 0xe3, 0xff, 0x4e, 0x44, /* ......ND */
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd\n\
static const byte plaintext[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus odio, pretium vel sagittis ac, facilisis quis diam. Vivamus condimentum velit sed dolor consequat interdum. Etiam eleifend ornare felis, eleifend egestas odio vulputate eu. Sed nec orci nunc. Etiam quis mi augue. Donec ullamcorper suscipit lorem, vel luctus augue cursus fermentum. Etiam a porta arcu, in convallis sem. Integer efficitur elementum diam, vel scelerisque felis posuere placerat. Donec vestibulum sit amet leo sit amet tincidunt. Etiam et vehicula turpis. Phasellus quis finibus sapien. Sed et tristique turpis. Nullam vitae sagittis tortor, et aliquet lorem. Cras a leo scelerisque, convallis lacus ut, fermentum urna. Mauris quis urna diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam aliquam vehicula orci id pulvinar. Proin mollis, libero sollicitudin tempor ultrices, massa augue tincidunt turpis, sit amet aliquam neque nibh nec dui. Fusce finibus massa quis rutrum suscipit cras amet";
rsource "Kconfig.tls-generic"
/* Loop over authenticated associated data AD1..ADn */
/* no easy answer [c'est la vie]. Just division */
const uint8_t* hashIn, int hashSz)
XMEMCPY(hash + (curveSz - hashSz), hashIn, hashSz);
0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, /* creen would be i */
\pagenumbering{alph}
DES3_KEY_SIZE = 24, /* 3 des ede */
/* functions added to support above needed, removed TOOM and KARATSUBA */

View File

@@ -6,8 +6,10 @@ body:
- type: markdown
attributes:
value: >
Thanks for reporting an bug. If you would prefer a private method,
please email support@wolfssl.com
Thanks for reporting a bug. If you would prefer a private method,
or if this is a vulnerability report please email support@wolfssl.com
instead. This is publicly viewable and not appropriate for vulnerability
reports.
- type: input
id: contact
attributes:

View File

@@ -6,7 +6,9 @@ body:
attributes:
value: >
Thanks for reporting an issue. If you would prefer a private method,
please email support@wolfssl.com
or if this is a vulnerability report please email support@wolfssl.com
instead. This is publicly viewable and not appropriate for vulnerability
reports.
- type: input
id: version
attributes:

View File

@@ -23,7 +23,8 @@ jobs:
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS"',
]
name: make check
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
@@ -36,7 +37,7 @@ jobs:
./configure ${{ matrix.config }}
make check
- name: Print errors
- name: Print errors
if: ${{ failure() }}
run: |
if [ -f test-suite.log ] ; then

93
.github/workflows/bind.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: bind9 Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-bind
path: build-dir.tgz
retention-days: 5
bind_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 9.18.0, 9.18.28 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-bind
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
# hostap dependencies
sudo apt-get install -y libuv1-dev libnghttp2-dev libcap-dev libcmocka-dev
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout bind9
uses: actions/checkout@v4
with:
repository: isc-projects/bind9
path: bind
ref: v${{ matrix.ref }}
- name: Build and test bind9
working-directory: bind
run: |
export PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig
patch -p1 < $GITHUB_WORKSPACE/osp/bind9/${{ matrix.ref }}.patch
autoreconf -ivf
./configure --with-wolfssl
sed -i 's/SUBDIRS = system//g' bin/tests/Makefile # remove failing tests
make -j V=1
make -j V=1 check

108
.github/workflows/cmake.yml vendored Normal file
View File

@@ -0,0 +1,108 @@
name: WolfSSL CMake Build Tests
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# pull wolfSSL
- uses: actions/checkout@master
# install cmake
- name: Install cmake
run: |
sudo apt-get update
sudo apt-get install -y cmake
# pull wolfssl
- name: Checkout wolfssl
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
# build wolfssl
- name: Build wolfssl
working-directory: ./wolfssl
run: |
mkdir build
cd build
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
-DWOLFSSL_16BIT:BOOL=no -DWOLFSSL_32BIT:BOOL=no -DWOLFSSL_AES:BOOL=yes \
-DWOLFSSL_AESCBC:BOOL=yes -DWOLFSSL_AESCCM:BOOL=yes -DWOLFSSL_AESCFB:BOOL=yes \
-DWOLFSSL_AESCTR:BOOL=yes -DWOLFSSL_AESGCM:STRING=yes -DWOLFSSL_AESKEYWRAP:BOOL=yes \
-DWOLFSSL_AESOFB:BOOL=yes -DWOLFSSL_AESSIV:BOOL=yes -DWOLFSSL_ALIGN_DATA:BOOL=yes \
-DWOLFSSL_ALPN:BOOL=ON -DWOLFSSL_ALT_CERT_CHAINS:BOOL=ON -DWOLFSSL_ARC4:BOOL=no \
-DWOLFSSL_ARIA:BOOL=no -DWOLFSSL_ASIO:BOOL=no -DWOLFSSL_ASM:BOOL=yes -DWOLFSSL_ASN:BOOL=yes \
-DWOLFSSL_ASYNC_THREADS:BOOL=no -DWOLFSSL_BASE64_ENCODE:BOOL=yes -DWOLFSSL_CAAM:BOOL=no \
-DWOLFSSL_CERTEXT:BOOL=yes -DWOLFSSL_CERTGEN:BOOL=yes -DWOLFSSL_CERTGENCACHE:BOOL=no \
-DWOLFSSL_CERTREQ:BOOL=yes -DWOLFSSL_CHACHA:STRING=yes -DWOLFSSL_CMAC:BOOL=yes \
-DWOLFSSL_CODING:BOOL=yes -DWOLFSSL_CONFIG_H:BOOL=yes -DWOLFSSL_CRL:STRING=yes \
-DWOLFSSL_CRYPTOCB:BOOL=yes -DWOLFSSL_CRYPTOCB_NO_SW_TEST:BOOL=no \
-DWOLFSSL_CRYPT_TESTS:BOOL=yes -DWOLFSSL_CRYPT_TESTS_HELP:BOOL=no \
-DWOLFSSL_CRYPT_TESTS_LIBS:BOOL=no -DWOLFSSL_CURL:BOOL=yes -DWOLFSSL_CURVE25519:STRING=yes \
-DWOLFSSL_CURVE448:STRING=yes -DWOLFSSL_DEBUG:BOOL=yes -DWOLFSSL_DES3:BOOL=ON \
-DWOLFSSL_DES3_TLS_SUITES:BOOL=no -DWOLFSSL_DH:STRING=yes -DWOLFSSL_DH_DEFAULT_PARAMS:BOOL=yes \
-DWOLFSSL_DSA:BOOL=yes -DWOLFSSL_DTLS:BOOL=ON -DWOLFSSL_DTLS13:BOOL=yes \
-DWOLFSSL_DTLS_CID:BOOL=yes -DWOLFSSL_ECC:STRING=yes \
-DWOLFSSL_ECCCUSTCURVES:STRING=all -DWOLFSSL_ECCSHAMIR:BOOL=yes \
-DWOLFSSL_ECH:BOOL=yes -DWOLFSSL_ED25519:BOOL=yes -DWOLFSSL_ED448:STRING=yes \
-DWOLFSSL_ENCKEYS:BOOL=yes -DWOLFSSL_ENC_THEN_MAC:BOOL=yes -DWOLFSSL_ERROR_QUEUE:BOOL=yes \
-DWOLFSSL_ERROR_STRINGS:BOOL=yes -DWOLFSSL_EXAMPLES:BOOL=yes -DWOLFSSL_EXPERIMENTAL:BOOL=yes \
-DWOLFSSL_EXTENDED_MASTER:BOOL=yes -DWOLFSSL_EX_DATA:BOOL=yes -DWOLFSSL_FAST_MATH:BOOL=no \
-DWOLFSSL_FILESYSTEM:BOOL=yes -DWOLFSSL_HARDEN:BOOL=yes -DWOLFSSL_HASH_DRBG:BOOL=yes \
-DWOLFSSL_HKDF:BOOL=yes -DWOLFSSL_HPKE:BOOL=yes -DWOLFSSL_HRR_COOKIE:STRING=yes \
-DWOLFSSL_INLINE:BOOL=yes -DWOLFSSL_INSTALL:BOOL=yes -DWOLFSSL_IP_ALT_NAME:BOOL=ON \
-DWOLFSSL_KEYGEN:BOOL=yes -DWOLFSSL_KEYING_MATERIAL:BOOL=ON \
-DWOLFSSL_MD4:BOOL=ON -DWOLFSSL_MD5:BOOL=yes -DWOLFSSL_MEMORY:BOOL=yes -DWOLFSSL_NO_STUB:BOOL=no \
-DWOLFSSL_OAEP:BOOL=yes -DWOLFSSL_OCSP:BOOL=yes -DWOLFSSL_OCSPSTAPLING:BOOL=ON \
-DWOLFSSL_OCSPSTAPLING_V2:BOOL=ON -DWOLFSSL_OLD_NAMES:BOOL=yes -DWOLFSSL_OLD_TLS:BOOL=yes \
-DWOLFSSL_OPENSSLALL:BOOL=yes -DWOLFSSL_OPENSSLEXTRA:BOOL=ON -DWOLFSSL_OPTFLAGS:BOOL=yes \
-DWOLFSSL_OQS:BOOL=no -DWOLFSSL_PKCALLBACKS:BOOL=yes -DWOLFSSL_PKCS12:BOOL=yes \
-DWOLFSSL_PKCS7:BOOL=yes -DWOLFSSL_POLY1305:BOOL=yes -DWOLFSSL_POSTAUTH:BOOL=yes \
-DWOLFSSL_PWDBASED:BOOL=yes -DWOLFSSL_QUIC:BOOL=yes -DWOLFSSL_REPRODUCIBLE_BUILD:BOOL=no \
-DWOLFSSL_RNG:BOOL=yes -DWOLFSSL_RSA:BOOL=yes -DWOLFSSL_RSA_PSS:BOOL=yes \
-DWOLFSSL_SESSION_TICKET:BOOL=ON -DWOLFSSL_SHA:BOOL=yes -DWOLFSSL_SHA224:BOOL=yes \
-DWOLFSSL_SHA3:STRING=yes -DWOLFSSL_SHA384:BOOL=yes -DWOLFSSL_SHA512:BOOL=yes \
-DWOLFSSL_SHAKE128:STRING=yes -DWOLFSSL_SHAKE256:STRING=yes -DWOLFSSL_SINGLE_THREADED:BOOL=no \
-DWOLFSSL_SNI:BOOL=yes -DWOLFSSL_SP_MATH_ALL:BOOL=yes -DWOLFSSL_SRTP:BOOL=yes \
-DWOLFSSL_STUNNEL:BOOL=yes -DWOLFSSL_SUPPORTED_CURVES:BOOL=yes -DWOLFSSL_SYS_CA_CERTS:BOOL=yes \
-DWOLFSSL_TICKET_NONCE_MALLOC:BOOL=yes -DWOLFSSL_TLS13:BOOL=yes -DWOLFSSL_TLSV12:BOOL=yes \
-DWOLFSSL_TLSX:BOOL=yes -DWOLFSSL_TPM:BOOL=yes -DWOLFSSL_USER_SETTINGS:BOOL=no \
-DWOLFSSL_USER_SETTINGS_ASM:BOOL=no -DWOLFSSL_WOLFSSH:BOOL=ON -DWOLFSSL_X86_64_BUILD_ASM:BOOL=yes \
-DWOLFSSL_X963KDF:BOOL=yes \
-DCMAKE_C_FLAGS="-DWOLFSSL_DTLS_CH_FRAG" \
..
cmake --build .
ctest -j $(nproc)
cmake --install .
# clean up
cd ..
rm -rf build
# Kyber Cmake broken
# -DWOLFSSL_KYBER:BOOL=yes
# build "lean-tls" wolfssl
- name: Build wolfssl with lean-tls
working-directory: ./wolfssl
run: |
mkdir build
cd build
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" \
-DWOLFSSL_LEAN_TLS:BOOL=yes \
..
cmake --build .
cmake --install .
# clean up
cd ..
rm -rf build

30
.github/workflows/codespell.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Codespell test
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
codespell:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2.1
with:
check_filenames: true
check_hidden: true
# Add comma separated list of words that occur multiple times that should be ignored (sorted alphabetically, case sensitive)
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te
# The exclude_file contains lines of code that should be ignored. This is useful for individual lines which have non-words that can safely be ignored.
exclude_file: '.codespellexcludelines'
# To skip files entirely from being processed, add it to the following list:
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked'

View File

@@ -0,0 +1,53 @@
name: Coverity Scan master branch
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
- cron: '0 0 * * 0'
- cron: '0 12 * * 0'
jobs:
coverity:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Configure wolfSSL with enable-all M-F
if: github.event.schedule == '0 0 * * 1-5'
run: |
./autogen.sh
./configure --enable-all
- name: Configure wolfSSL with enable-all enable-smallstack Sun at 00:00
if: github.event.schedule == '0 0 * * 0'
run: |
./autogen.sh
./configure --enable-all --enable-smallstack
- name: Configure wolfSSL with bigendian Sun at 12:00
if: github.event.schedule == '0 12 * * 0'
run: |
./autogen.sh
./configure --enable-all CFLAGS="-DBIG_ENDIAN_ORDER"
- name: Check secrets
env:
token_var: ${{ secrets.COVERITY_SCAN_TOKEN }}
email_var: ${{ secrets.COVERITY_SCAN_EMAIL }}
run: |
token_len=${#token_var}
echo "$token_len"
email_len=${#email_var}
echo "$email_len"
- uses: vapier/coverity-scan-action@v1
with:
build_language: 'cxx'
project: "wolfSSL/wolfssl"
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
command: "make"

View File

@@ -15,7 +15,8 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -26,16 +27,20 @@ jobs:
configure: --enable-curl
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-curl
path: build-dir
path: build-dir.tgz
retention-days: 5
test_curl:
name: ${{ matrix.curl_ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 15
needs: build_wolfssl
@@ -47,14 +52,15 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install nghttp2 libpsl5 libpsl-dev
sudo pip install impacket
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-curl
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Build curl
uses: wolfSSL/actions-build-autotools-project@v1
@@ -67,4 +73,4 @@ jobs:
- name: Test curl
working-directory: curl
run: make -j test-ci
run: make -j $(nproc) test-ci

105
.github/workflows/cyrus-sasl.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: cyrus-sasl Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
# Don't run tests as this config is tested in many other places
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-sasl
path: build-dir.tgz
retention-days: 5
sasl_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 2.1.28 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install krb5-kdc krb5-otp libkrb5-dev \
libsocket-wrapper libnss-wrapper krb5-admin-server libdb5.3-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-sasl
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout sasl
uses: actions/checkout@v4
with:
repository: cyrusimap/cyrus-sasl
ref: cyrus-sasl-${{ matrix.ref }}
path: sasl
- name: Build cyrus-sasl
working-directory: sasl
run: |
patch -p1 < $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/${{ matrix.ref }}.patch
autoreconf -ivf
./configure --with-openssl=no --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-dblib=berkeley --disable-shared
# Need to run 'make' twice with '--disable-shared' for some reason
make -j || make -j
- name: Run testsuite
working-directory: sasl
run: |
make -j -C utils testsuite saslpasswd2
# Retry up to five times
for i in {1..5}; do
TEST_RES=0
$GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/run-tests.sh || TEST_RES=$?
if [ "$TEST_RES" -eq "0" ]; then
break
fi
done

View File

@@ -20,6 +20,7 @@ jobs:
# List of refs to test
ref: [ master ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
steps:
- name: Build wolfSSL
@@ -57,4 +58,3 @@ jobs:
- name: Test HaProxy
working-directory: haproxy
run: make reg-tests reg-tests/ssl VTEST_PROGRAM=$GITHUB_WORKSPACE/VTest/vtest

View File

@@ -15,6 +15,7 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
@@ -27,11 +28,14 @@ jobs:
configure: --enable-hitch
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-hitch
path: build-dir
path: build-dir.tgz
retention-days: 5
hitch_check:
@@ -44,6 +48,7 @@ jobs:
ignore-tests: >-
test13-r82.sh test15-proxy-v2-npn.sh test39-client-cert-proxy.sh
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 4
@@ -53,7 +58,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-hitch
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
@@ -100,4 +107,4 @@ jobs:
working-directory: ./hitch
run: |
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
make check
make check

View File

@@ -22,6 +22,7 @@ jobs:
- build_id: hostap-build2
wolf_extra_config: --enable-brainpool --enable-wpas-dpp
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-20.04
# This should be a safe limit for the tests to run.
@@ -99,6 +100,7 @@ jobs:
build_id: hostap-build2
}
name: hwsim test
if: github.repository_owner == 'wolfssl'
# For openssl 1.1
runs-on: ubuntu-20.04
# This should be a safe limit for the tests to run.
@@ -181,7 +183,7 @@ jobs:
- name: Checkout hostap
uses: actions/checkout@v4
with:
repository: julek-wolfssl/hostap-mirror
repository: julek-wolfssl/hostap-mirror
path: hostap
ref: ${{ matrix.config.hostap_ref }}
# necessary for cherry pick step
@@ -210,7 +212,7 @@ jobs:
done
- if: ${{ matrix.hostapd }}
name: Setup hostapd config file
name: Setup hostapd config file
run: |
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
hostap/hostapd/.config
@@ -220,7 +222,7 @@ jobs:
EOF
- if: ${{ matrix.wpa_supplicant }}
name: Setup wpa_supplicant config file
name: Setup wpa_supplicant config file
run: |
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
hostap/wpa_supplicant/.config

41
.github/workflows/disabled/msys2.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: MSYS2 Build Test
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
msys2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { sys: ucrt64, compiler: mingw-w64-ucrt-x86_64-gcc }
- { sys: mingw64, compiler: mingw-w64-x86_64-gcc }
- { sys: msys, compiler: gcc }
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: git ${{matrix.compiler}} autotools base-devel autoconf netcat
- name: configure wolfSSL
run: ./autogen.sh && ./configure CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
- name: build wolfSSL
run: make check
- name: Display log
if: always()
run: cat test-suite.log

View File

@@ -14,7 +14,8 @@ concurrency:
jobs:
espressif_latest:
name: latest Docker container
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 12
container:
@@ -22,22 +23,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
run: cd /opt/esp/idf && . ./export.sh && cd $GITHUB_WORKSPACE; IDE/Espressif/ESP-IDF/compileAllExamples.sh
espressif_v4_4:
name: v4.4 Docker container
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
container:
image: espressif/idf:release-v4.4
steps:
- uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
run: cd /opt/esp/idf && . ./export.sh && cd $GITHUB_WORKSPACE; IDE/Espressif/ESP-IDF/compileAllExamples.sh
espressif_v5_0:
name: v5.0 Docker container
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
container:
image: espressif/idf:release-v5.0
steps:
- uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
run: cd /opt/esp/idf && . ./export.sh && cd $GITHUB_WORKSPACE; IDE/Espressif/ESP-IDF/compileAllExamples.sh

View File

@@ -17,7 +17,8 @@ concurrency:
jobs:
build_library:
name: Compile libwolfssl.so
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
container:
@@ -28,15 +29,20 @@ jobs:
- uses: actions/checkout@v4
- name: Compile libwolfssl.so
run: ./autogen.sh && ./configure --enable-all && make
# 2024-08-05 - Something broke in the actions. They are no longer following links.
- name: tar libwolfssl.so
working-directory: src/.libs
run: tar -zcf libwolfssl.tgz libwolfssl.so*
- name: Upload libwolfssl.so
uses: actions/upload-artifact@v4
with:
name: openwrt-libwolfssl.so
path: src/.libs/libwolfssl.so
path: src/.libs/libwolfssl.tgz
retention-days: 5
compile_container:
name: Compile container
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 2
needs: build_library
@@ -50,7 +56,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: openwrt-libwolfssl.so
path: Docker/OpenWrt/.
path: .
- name: untar libwolfssl.so
run: tar -xf libwolfssl.tgz -C Docker/OpenWrt
- name: Build but dont push
uses: docker/build-push-action@v5
with:

41
.github/workflows/gencertbuf.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Test gencertbuf script
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
gencertbuf:
name: gencertbuf
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test generate wolfssl/certs_test.h
run: ./gencertbuf.pl
- name: Test wolfSSL
run: |
./autogen.sh
./configure --enable-all --enable-experimental --enable-dilithium --enable-kyber
make
./wolfcrypt/test/testwolfcrypt
- name: Print errors
if: ${{ failure() }}
run: |
if [ -f test-suite.log ] ; then
cat test-suite.log
fi

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -27,11 +28,14 @@ jobs:
configure: --enable-all 'CPPFLAGS=-DWOLFSSL_RSA_KEY_CHECK -DHAVE_EX_DATA_CLEANUP_HOOKS'
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-grpc
path: build-dir
path: build-dir.tgz
retention-days: 5
grpc_check:
@@ -47,7 +51,8 @@ jobs:
test_core_security_ssl_credentials_test test_cpp_end2end_ssl_credentials_test
h2_ssl_cert_test h2_ssl_session_reuse_test
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
needs: build_wolfssl
@@ -65,7 +70,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-grpc
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4

91
.github/workflows/haproxy.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: haproxy Test
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-haproxy
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-haproxy
path: build-dir.tgz
retention-days: 5
test_haproxy:
name: ${{ matrix.haproxy_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 15
needs: build_wolfssl
strategy:
fail-fast: false
matrix:
haproxy_ref: [ 'v3.1.0' ]
steps:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install libpcre2-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-haproxy
- name: untar build-dir
run: tar -xf build-dir.tgz
# check cache for haproxy if not there then download it
- name: Check haproxy cache
uses: actions/cache@v4
id: cache-haproxy
with:
path: build-dir/haproxy-${{matrix.haproxy_ref}}
key: haproxy-${{matrix.haproxy_ref}}
- name: Download haproxy if needed
if: steps.cache-haproxy.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: haproxy/haproxy
ref: ${{matrix.haproxy_ref}}
path: build-dir/haproxy-${{matrix.haproxy_ref}}
- name: Build haproxy
working-directory: build-dir/haproxy-${{matrix.haproxy_ref}}
run: make clean && make TARGET=linux-glibc USE_OPENSSL_WOLFSSL=1 SSL_LIB=$GITHUB_WORKSPACE/build-dir/lib SSL_INC=$GITHUB_WORKSPACE/build-dir/include ADDLIB=-Wl,-rpath,$GITHUB_WORKSPACE/build-dir/lib CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
- name: Build haproxy vtest
working-directory: build-dir/haproxy-${{matrix.haproxy_ref}}
run: ./scripts/build-vtest.sh
- name: Test haproxy
working-directory: build-dir/haproxy-${{matrix.haproxy_ref}}
run: VTEST_PROGRAM=$GITHUB_WORKSPACE/build-dir/vtest/vtest make reg-tests -- --debug reg-tests/ssl/*

View File

@@ -13,7 +13,7 @@ concurrency:
# END OF COMMON SECTION
env:
LINUX_REF: v6.6
LINUX_REF: v6.12
jobs:
build_wolfssl:
@@ -24,10 +24,11 @@ jobs:
wolf_extra_config: --disable-tls13
- build_id: hostap-vm-build2
wolf_extra_config: >-
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
--enable-tlsv10 --enable-oldtls
name: Build wolfSSL
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -52,40 +53,65 @@ jobs:
${{ env.wolf_debug_flags }} ${{ matrix.wolf_extra_config }}
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build_id }}
path: build-dir
path: build-dir.tgz
retention-days: 5
checkout_hostap:
name: Checkout hostap repo
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- name: Checking if we have hostap in cache
uses: actions/cache@v4
id: cache
with:
path: hostap
key: hostap-repo
lookup-only: true
- name: Checkout hostap
run: git clone git://w1.fi/hostap.git hostap
build_uml_linux:
name: Build UML (UserMode Linux)
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: checkout_hostap
steps:
- name: Checking if we have kernel in cache
uses: actions/cache@v4
id: cache
with:
path: linux/linux
key: ${{ env.LINUX_REF }}
key: hostap-linux-${{ env.LINUX_REF }}
lookup-only: true
- name: Checkout hostap
- name: Checking if we have hostap in cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
uses: actions/cache/restore@v4
with:
repository: julek-wolfssl/hostap-mirror
path: hostap
key: hostap-repo
fail-on-cache-miss: true
- name: Checkout linux
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: torvalds/linux
repository: torvalds/linux
path: linux
ref: ${{ env.LINUX_REF }}
- name: Compile linux
if: steps.cache.outputs.cache-hit != 'true'
@@ -136,18 +162,18 @@ jobs:
build_id: hostap-vm-build2
}
name: hwsim test
# For openssl 1.1
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 45
needs: [build_wolfssl, build_uml_linux]
needs: [build_wolfssl, build_uml_linux, checkout_hostap]
steps:
- name: Checking if we have kernel in cache
uses: actions/cache/restore@v4
id: cache
with:
path: linux/linux
key: ${{ env.LINUX_REF }}
key: hostap-linux-${{ env.LINUX_REF }}
fail-on-cache-miss: true
- name: show file structure
@@ -178,7 +204,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ matrix.config.build_id }}
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Install dependencies
run: |
@@ -188,15 +216,18 @@ jobs:
# hostap dependencies
sudo apt-get install -y libpcap0.8 libpcap-dev curl libcurl4-openssl-dev \
libnl-3-dev binutils-dev libssl-dev libiberty-dev libnl-genl-3-dev \
libnl-route-3-dev libdbus-1-dev bridge-utils tshark
sudo pip3 install pycryptodome
libnl-route-3-dev libdbus-1-dev bridge-utils tshark python3-pycryptodome
- name: Checkout hostap
uses: actions/checkout@v4
- name: Checking if we have hostap in cache
uses: actions/cache/restore@v4
with:
repository: julek-wolfssl/hostap-mirror
path: hostap
ref: ${{ matrix.config.hostap_ref }}
key: hostap-repo
fail-on-cache-miss: true
- name: Checkout correct ref
working-directory: hostap
run: git checkout ${{ matrix.config.hostap_ref }}
- name: Update certs
working-directory: hostap/tests/hwsim/auth_serv
@@ -228,7 +259,7 @@ jobs:
fi
- if: ${{ matrix.hostapd }}
name: Setup hostapd config file
name: Setup hostapd config file
run: |
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
hostap/hostapd/.config
@@ -238,7 +269,7 @@ jobs:
EOF
- if: ${{ matrix.wpa_supplicant }}
name: Setup wpa_supplicant config file
name: Setup wpa_supplicant config file
run: |
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
hostap/wpa_supplicant/.config

View File

@@ -0,0 +1,52 @@
name: Dynamic C Fallback Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -DWC_AES_C_DYNAMIC_FALLBACK -DWC_C_DYNAMIC_FALLBACK -DDEBUG_VECTOR_REGISTER_ACCESS -DDEBUG_VECTOR_REGISTER_ACCESS_FUZZING -DWC_DEBUG_CIPHER_LIFECYCLE"'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL with WC_C_DYNAMIC_FALLBACK and DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
run: |
./autogen.sh
randseed=$(head -c 4 /dev/urandom | od -t u4 --address-radix=n)
randseed="${randseed#"${randseed%%[![:space:]]*}"}"
echo "fuzzing seed=${randseed}"
./configure ${{ matrix.config }} CFLAGS="-DWC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED=$randseed -fsanitize=leak -g -fno-omit-frame-pointer"
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

85
.github/workflows/ipmitool.yml vendored Normal file
View File

@@ -0,0 +1,85 @@
name: ipmitool Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
# Don't run tests as this config is tested in many other places
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-ipmitool
path: build-dir.tgz
retention-days: 5
build_ipmitool:
strategy:
fail-fast: false
matrix:
git_ref: [ c3939dac2c060651361fc71516806f9ab8c38901 ]
name: ${{ matrix.git_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
needs: build_wolfssl
steps:
- name: Install dependencies
run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y libreadline8
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-ipmitool
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Build ipmitool
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: ipmitool/ipmitool
ref: ${{ matrix.git_ref }}
path: ipmitool
patch-file: $GITHUB_WORKSPACE/osp/ipmitool/*-${{ matrix.git_ref }}.patch
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir
# No checks included and not running since it depends on hardware
check: false
- name: Confirm built with wolfSSL
working-directory: ipmitool
run: |
ldd src/ipmitool | grep wolfssl
ldd src/ipmievd | grep wolfssl

96
.github/workflows/jwt-cpp.yml vendored Normal file
View File

@@ -0,0 +1,96 @@
name: jwt-cpp Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
# Don't run tests as this config is tested in many other places
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-jwt-cpp
path: build-dir.tgz
retention-days: 5
build_pam-ipmi:
if: github.repository_owner == 'wolfssl'
strategy:
fail-fast: false
matrix:
config:
- ref: 0.7.0
runner: ubuntu-22.04
- ref: 0.6.0
runner: ubuntu-22.04
name: ${{ matrix.config.ref }}
runs-on: ${{ matrix.config.runner }}
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install libgtest-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-jwt-cpp
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout jwt-cpp
uses: actions/checkout@v4
with:
repository: Thalhammer/jwt-cpp
path: jwt-cpp
ref: v${{ matrix.config.ref }}
- name: Build pam-ipmi
working-directory: jwt-cpp
run: |
patch -p1 < ../osp/jwt-cpp/${{ matrix.config.ref }}.patch
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
make -j -C build
ldd ./build/tests/jwt-cpp-test | grep wolfssl
- name: Run jwt-cpp tests
working-directory: jwt-cpp
run: ./build/tests/jwt-cpp-test

View File

@@ -16,7 +16,8 @@ jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 5
steps:
@@ -31,11 +32,14 @@ jobs:
configure: --enable-krb CC='gcc -fsanitize=address'
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-krb5
path: build-dir
path: build-dir.tgz
retention-days: 5
krb5_check:
@@ -45,7 +49,8 @@ jobs:
# List of releases to test
ref: [ 1.21.1 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 8
needs: build_wolfssl
@@ -54,7 +59,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-krb5
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
@@ -85,7 +92,7 @@ jobs:
# Using rpath because LD_LIBRARY_PATH is overwritten during testing
export WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include -I$GITHUB_WORKSPACE/build-dir/include/wolfssl -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
export WOLFSSL_LIBS="-lwolfssl -L$GITHUB_WORKSPACE/build-dir/lib -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
./configure --with-crypto-impl=wolfssl --with-tls-impl=wolfssl --disable-pkinit \
./configure --with-crypto-impl=wolfssl --with-tls-impl=wolfssl --disable-pkinit --with-spake-openssl \
CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address'
CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address' make -j

91
.github/workflows/libspdm.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: libspdm Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all --enable-static CFLAGS='-DRSA_MIN_SIZE=512'
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-libspdm
path: build-dir.tgz
retention-days: 5
libspdm_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 3.3.0 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-libspdm
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout libspdm
uses: actions/checkout@v4
with:
repository: DMTF/libspdm
path: libspdm
ref: ${{ matrix.ref }}
- name: Build and test libspdm
working-directory: libspdm
run: |
patch -p1 < ../osp/libspdm/${{ matrix.ref }}/libspdm-${{ matrix.ref }}.patch
git submodule update --init --recursive
# Silence cmake version warnings
find -name CMakeLists.txt -exec sed -i 's/cmake_minimum_required.*/cmake_minimum_required(VERSION 3.10)/g' {} \;
mkdir build
cd build
cmake -DARCH=x64 -DTOOLCHAIN=GCC -DTARGET=Debug -DCRYPTO=wolfssl -DENABLE_BINARY_BUILD=1 \
-DCOMPILED_LIBWOLFSSL_PATH=$GITHUB_WORKSPACE/build-dir/lib/libwolfssl.a \
-DWOLFSSL_INCDIR=$GITHUB_WORKSPACE/build-dir/include ..
make -j
cd ../unit_test/sample_key
../../build/bin/test_crypt
../../build/bin/test_spdm_secured_message
../../build/bin/test_spdm_crypt

View File

@@ -16,7 +16,8 @@ jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -28,11 +29,14 @@ jobs:
check: false # config is already tested in many other PRB's
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-libssh2
path: build-dir
path: build-dir.tgz
retention-days: 5
libssh2_check:
@@ -40,9 +44,10 @@ jobs:
fail-fast: false
matrix:
# List of releases to test
ref: [ 1.11.0 ]
ref: [ 1.11.1 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 8
needs: build_wolfssl
@@ -51,7 +56,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-libssh2
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Build and test libssh2
uses: wolfSSL/actions-build-autotools-project@v1
@@ -63,5 +70,8 @@ jobs:
check: true
- name: Confirm libssh2 built with wolfSSL
working-directory: ./libssh2
run: ldd src/.libs/libssh2.so | grep wolfssl
run: ldd libssh2/src/.libs/libssh2.so | grep wolfssl
- name: print server logs
if: ${{ failure() }}
run: tail -n +1 libssh2/tests/*.log

86
.github/workflows/libvncserver.yml vendored Normal file
View File

@@ -0,0 +1,86 @@
name: libvncserver Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
# Don't run tests as this config is tested in many other places
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-libvncserver
path: build-dir.tgz
retention-days: 5
build_libvncserver:
strategy:
fail-fast: false
matrix:
ref: [ 0.9.13, 0.9.14 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-libvncserver
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout libvncserver
uses: actions/checkout@v4
with:
repository: LibVNC/libvncserver
path: libvncserver
ref: LibVNCServer-${{ matrix.ref }}
- name: Build libvncserver
working-directory: libvncserver
run: |
patch -p1 < ../osp/libvncserver/${{ matrix.ref }}.patch
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
cmake -B build -DWITH_GNUTLS=OFF -DWITH_OPENSSL=OFF -DWITH_GCRYPT=OFF -DWITH_WOLFSSL=ON .
make -j -C build VERBOSE=1
ldd build/libvncclient.so | grep wolfssl
ldd build/libvncserver.so | grep wolfssl
- name: Run libvncserver tests
working-directory: libvncserver
run: make -C build test

79
.github/workflows/mbedtls.sh vendored Normal file
View File

@@ -0,0 +1,79 @@
#!/usr/bin/env bash
set -e
set -x
# Basic TLS test
./mbedtls/build/programs/ssl/ssl_server2 > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
./mbedtls/build/programs/ssl/ssl_client2 # Confirm working with mbed
env -C wolfssl ./examples/client/client -p 4433 -g \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
kill $SERVER_PID
sleep 0.1
env -C wolfssl ./examples/server/server -p 4433 -i -g \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/server2-sha256.crt \
-k ../mbedtls/framework/data_files/server2.key.pem > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
./mbedtls/build/programs/ssl/ssl_client2
env -C wolfssl ./examples/client/client -p 4433 -g \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
kill $SERVER_PID
sleep 0.1
# Basic DTLS test
./mbedtls/build/programs/ssl/ssl_server2 dtls=1 > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
./mbedtls/build/programs/ssl/ssl_client2 dtls=1 # Confirm working with mbed
env -C wolfssl ./examples/client/client -p 4433 -g -u \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
kill $SERVER_PID
sleep 0.1
env -C wolfssl ./examples/server/server -p 4433 -i -g -u \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/server2-sha256.crt \
-k ../mbedtls/framework/data_files/server2.key.pem > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
env -C wolfssl ./examples/client/client -p 4433 -g -u \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
./mbedtls/build/programs/ssl/ssl_client2 dtls=1
kill $SERVER_PID
sleep 0.1
# DTLS 1.2 CID test
./mbedtls/build/programs/ssl/ssl_server2 dtls=1 cid=1 cid_val=121212 > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
./mbedtls/build/programs/ssl/ssl_client2 dtls=1 cid=1 cid_val=232323 # Confirm working with mbed
env -C wolfssl ./examples/client/client -p 4433 -g -u --cid 232323 \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
kill $SERVER_PID
sleep 0.1
env -C wolfssl ./examples/server/server -p 4433 -i -g -u --cid 121212 \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/server2-sha256.crt \
-k ../mbedtls/framework/data_files/server2.key.pem > /tmp/server.log 2>&1 &
SERVER_PID=$!
sleep 0.1
./mbedtls/build/programs/ssl/ssl_client2 dtls=1 cid_val=232323
env -C wolfssl ./examples/client/client -p 4433 -g -u --cid 232323 \
-A ../mbedtls/framework/data_files/test-ca-sha256.crt \
-c ../mbedtls/framework/data_files/cli-rsa-sha256.crt \
-k ../mbedtls/framework/data_files/cli-rsa-sha256.key.pem
kill $SERVER_PID
sleep 0.1

86
.github/workflows/mbedtls.yml vendored Normal file
View File

@@ -0,0 +1,86 @@
name: mbedtls interop Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
env:
MBED_REF: v3.6.2
jobs:
build_mbedtls:
name: Build mbedtls
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- name: Checking if we have mbed in cache
uses: actions/cache@v4
id: cache
with:
path: mbedtls
key: mbedtls-${{ env.MBED_REF }}
lookup-only: true
- name: Checkout mbedtls
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: Mbed-TLS/mbedtls
ref: ${{ env.MBED_REF }}
path: mbedtls
- name: Compile mbedtls
if: steps.cache.outputs.cache-hit != 'true'
working-directory: mbedtls
run: |
git submodule update --init
mkdir build
cd build
cmake ..
make -j
# convert key to pem format
openssl pkey -in framework/data_files/cli-rsa-sha256.key.der -text > framework/data_files/cli-rsa-sha256.key.pem
openssl pkey -in framework/data_files/server2.key.der -text > framework/data_files/server2.key.pem
mbedtls_test:
name: Test interop with mbedtls
runs-on: ubuntu-latest
needs: build_mbedtls
timeout-minutes: 10
if: github.repository_owner == 'wolfssl'
steps:
- name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
- name: Checking if we have mbed in cache
uses: actions/cache/restore@v4
id: cache
with:
path: mbedtls
key: mbedtls-${{ env.MBED_REF }}
fail-on-cache-miss: true
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-dtls --enable-dtlscid
install: false
check: false
- name: Test interop
run: bash wolfssl/.github/workflows/mbedtls.sh
- name: print server logs
if: ${{ failure() }}
run: cat /tmp/server.log

View File

@@ -16,7 +16,8 @@ jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
@@ -28,11 +29,14 @@ jobs:
- name: Bundle Docker entry point
run: cp wolfssl/.github/workflows/memcached.sh build-dir/bin
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-memcached
path: build-dir
path: build-dir.tgz
retention-days: 5
memcached_check:
@@ -43,14 +47,17 @@ jobs:
include:
- ref: 1.6.22
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-memcached
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4

105
.github/workflows/mosquitto.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: mosquitto Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN"
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-mosquitto
path: build-dir.tgz
retention-days: 5
mosquitto_check:
strategy:
fail-fast: false
matrix:
ref: [ 2.0.18 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-mosquitto
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make python3-psutil
- name: Checkout mosquitto
uses: actions/checkout@v4
with:
repository: eclipse/mosquitto
ref: v${{ matrix.ref }}
path: mosquitto
- name: Update certs
run: |
cd $GITHUB_WORKSPACE/mosquitto/test/ssl
./gen.sh
cat all-ca.crt >> server.crt
- name: Configure and build mosquitto
run: |
cd $GITHUB_WORKSPACE/mosquitto/
patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir
- name: Run mosquitto tests
working-directory: ./mosquitto
run: |
# Retry up to five times
for i in {1..5}; do
TEST_RES=0
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
if [ "$TEST_RES" -eq "0" ]; then
break
fi
done
if [ "$TEST_RES" -ne "0" ]; then
exit $TEST_RES
fi

View File

@@ -36,7 +36,8 @@ jobs:
CFLAGS: -marm -DWOLFSSL_SP_ARM_ARCH=6
ARCH: armel
EXTRA_OPTS: --enable-sp-asm
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -51,7 +52,7 @@ jobs:
CFLAGS: ${{ matrix.CFLAGS }}
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
- name: Print errors
- name: Print errors
if: ${{ failure() }}
run: |
if [ -f config.log ] ; then

View File

@@ -21,16 +21,16 @@ jobs:
include:
- CC: gcc-9
CXX: g++-9
OS: ubuntu-latest
OS: ubuntu-22.04
- CC: gcc-10
CXX: g++-10
OS: ubuntu-latest
OS: ubuntu-22.04
- CC: gcc-11
CXX: g++-11
OS: ubuntu-latest
OS: ubuntu-22.04
- CC: gcc-12
CXX: g++-12
OS: ubuntu-latest
OS: ubuntu-22.04
- CC: clang-10
CXX: clang++-10
OS: ubuntu-20.04
@@ -42,14 +42,17 @@ jobs:
OS: ubuntu-20.04
- CC: clang-13
CXX: clang++-13
OS: ubuntu-latest
OS: ubuntu-22.04
- CC: clang-14
CXX: clang++-14
OS: ubuntu-latest
OS: ubuntu-22.04
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.OS }}
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Install dependencies
run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y ${{ matrix.CC }}
- uses: actions/checkout@v4
- name: Build
env:

84
.github/workflows/net-snmp.yml vendored Normal file
View File

@@ -0,0 +1,84 @@
name: net-snmp Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-net-snmp
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-net-snmp
path: build-dir.tgz
retention-days: 5
net-snmp_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
include:
- ref: 5.9.3
test_opts: -e 'agentxperl'
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-net-snmp
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Build net-snmp
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: net-snmp/net-snmp
ref: v${{ matrix.ref }}
path: net-snmp
patch-file: $GITHUB_WORKSPACE/osp/net-snmp/${{ matrix.ref }}.patch
configure: --disable-shared --with-wolfssl=$GITHUB_WORKSPACE/build-dir
check: false
- name: Run net-snmp tests
working-directory: net-snmp
run: |
autoconf --version | grep -P '2\.\d\d' -o > dist/autoconf-version
make -j test TESTOPTS="${{ matrix.test_opts }}"

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -33,11 +34,14 @@ jobs:
configure: --enable-nginx ${{ env.wolf_debug_flags }}
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-nginx
path: build-dir
path: build-dir.tgz
retention-days: 5
nginx_check:
@@ -93,7 +97,7 @@ jobs:
stream_ssl_preread.t stream_ssl_realip.t stream_ssl_session_reuse.t stream_ssl.t
stream_ssl_variables.t stream_ssl_verify_client.t stream_upstream_zone_ssl.t
upstream_zone_ssl.t uwsgi_ssl_certificate.t uwsgi_ssl_certificate_vars.t
uwsgi_ssl.t uwsgi_ssl_verify.t
uwsgi_ssl.t uwsgi_ssl_verify.t
# Following tests do not pass with sanitizer on (with OpenSSL too)
sanitize-not-ok: >-
grpc_ssl.t h2_proxy_request_buffering_ssl.t h2_proxy_ssl.t
@@ -102,7 +106,8 @@ jobs:
stream_proxy_protocol_ssl.t stream_proxy_ssl_conf_command.t stream_proxy_ssl.t
stream_proxy_ssl_verify.t
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
needs: build_wolfssl
@@ -111,7 +116,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-nginx
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Install dependencies
run: |
@@ -216,4 +223,4 @@ jobs:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib \
TMPDIR=$GITHUB_WORKSPACE TEST_NGINX_BINARY=../nginx/objs/nginx \
prove ${{ matrix.sanitize-ok }}

View File

@@ -18,10 +18,11 @@ jobs:
matrix:
config: [
# Add new configs here
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC"',
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024"',
]
name: make check
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
@@ -35,7 +36,7 @@ jobs:
make
./wolfcrypt/test/testwolfcrypt
- name: Print errors
- name: Print errors
if: ${{ failure() }}
run: |
if [ -f test-suite.log ] ; then

27
.github/workflows/nss.sh vendored Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
set -x
# Setup nss cert db
mkdir nssdb
./dist/Debug/bin/certutil -d nssdb -N --empty-password
./dist/Debug/bin/certutil -d nssdb -A -a -i wolfssl/certs/test/server-localhost.pem \
-t TCP -n 'wolf localhost'
# App data for nss
echo Hello from nss > /tmp/in
# TLS 1.3 test
env -C wolfssl ./examples/server/server -v 4 -p 4433 \
-c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 &
sleep 0.1
./dist/Debug/bin/tstclnt -V tls1.3: -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v
sleep 0.1
# DTLS 1.3 test
env -C wolfssl ./examples/server/server -v 4 -p 4433 -u \
-c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 &
sleep 0.1
./dist/Debug/bin/tstclnt -V tls1.3: -P client -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v
sleep 0.1

89
.github/workflows/nss.yml vendored Normal file
View File

@@ -0,0 +1,89 @@
name: nss interop Tests
### TODO uncomment stuff
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
env:
NSS_REF: NSS_3_107_RTM
jobs:
build_nss:
name: Build nss
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
steps:
- name: Checking if we have nss in cache
uses: actions/cache@v4
id: cache
with:
path: dist
key: nss-${{ env.NSS_REF }}
lookup-only: true
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
# hostap dependencies
sudo apt-get install -y gyp ninja-build
- name: Checkout nss
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: nss-dev/nss
ref: ${{ env.NSS_REF }}
path: nss
- name: Compile nss
if: steps.cache.outputs.cache-hit != 'true'
run: |
hg clone https://hg.mozilla.org/projects/nspr
cd nss
./build.sh
nss_test:
name: Test interop with nss
runs-on: ubuntu-22.04
needs: build_nss
timeout-minutes: 10
if: github.repository_owner == 'wolfssl'
steps:
- name: Checking if we have nss in cache
uses: actions/cache/restore@v4
id: cache
with:
path: dist
key: nss-${{ env.NSS_REF }}
fail-on-cache-miss: true
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-dtls --enable-dtls13
install: false
check: false
- name: Test interop
run: bash wolfssl/.github/workflows/nss.sh
- name: print server logs
if: ${{ failure() }}
run: |
cat /tmp/server.log

93
.github/workflows/ntp.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: ntp Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-ntp
path: build-dir.tgz
retention-days: 5
ntp_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 4.2.8p15, 4.2.8p17 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-ntp
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
# Avoid DoS'ing ntp site so cache the tar.gz
- name: Check if we have ntp
uses: actions/cache@v4
id: cache
with:
path: ntp-${{ matrix.ref }}.tar.gz
key: ntp-${{ matrix.ref }}.tar.gz
- name: Download ntp
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://downloads.nwtime.org/ntp/4.2.8/ntp-${{ matrix.ref }}.tar.gz
- name: Extract ntp
run: |
tar -xf ntp-${{ matrix.ref }}.tar.gz
- name: Build and test ntp
working-directory: ntp-${{ matrix.ref }}
run: |
patch -p1 < $GITHUB_WORKSPACE/osp/ntp/${{ matrix.ref }}/ntp-${{ matrix.ref }}.patch
./bootstrap
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
make -j
make -j check

View File

@@ -15,7 +15,8 @@ concurrency:
jobs:
ocsp_stapling:
name: ocsp stapling
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout wolfSSL

91
.github/workflows/openldap.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: openldap Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-openldap CPPFLAGS=-DWOLFSSL_NO_ASN_STRICT
install: true
check: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-openldap
path: build-dir.tgz
retention-days: 5
openldap_check:
strategy:
fail-fast: false
matrix:
include:
# List of releases to test
- osp_ref: 2.5.13
git_ref: OPENLDAP_REL_ENG_2_5_13
- osp_ref: 2.6.7
git_ref: OPENLDAP_REL_ENG_2_6_7
name: ${{ matrix.osp_ref }}
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 20
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-openldap
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout openldap
uses: actions/checkout@v4
with:
repository: openldap/openldap
path: openldap
ref: ${{ matrix.git_ref }}
- name: Build and test OpenLDAP
working-directory: openldap
run: |
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
patch -p1 < $GITHUB_WORKSPACE/osp/openldap/${{ matrix.osp_ref }}/openldap-${{ matrix.osp_ref }}.patch
rm aclocal.m4
autoreconf -ivf
./configure --with-tls=wolfssl --disable-bdb --disable-hdb \
CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include \
-I$GITHUB_WORKSPACE/build-dir/include/wolfssl \
-L$GITHUB_WORKSPACE/build-dir/lib"
make -j depend
make -j
make -j check

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -26,14 +27,17 @@ jobs:
path: wolfssl
configure: >-
--enable-openssh --enable-dsa --with-max-rsa-bits=8192
--enable-intelasm --enable-sp-asm
--enable-intelasm --enable-sp-asm CFLAGS="-DRSA_MIN_SIZE=1024"
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-openssh
path: build-dir
path: build-dir.tgz
retention-days: 5
openssh_check:
@@ -44,14 +48,17 @@ jobs:
- git_ref: 'V_9_6_P1'
osp_ver: '9.6'
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-openssh
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
@@ -69,7 +76,7 @@ jobs:
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-rpath=-Wl,-rpath=
check: false
# make tests take >20 minutes. Consider limiting?
# make tests take >20 minutes. Consider limiting?
- name: Run tests
working-directory: ./openssh
run: |

50
.github/workflows/opensslcoexist.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: OPENSSL_COEXIST and TEST_OPENSSL_COEXIST
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic"',
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -DTEST_OPENSSL_COEXIST"'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test --enable-opensslcoexist and TEST_OPENSSL_COEXIST
run: |
./autogen.sh || $(exit 2)
./configure ${{ matrix.config }} || $(exit 3)
make -j 4 || $(exit 4)
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in config.log scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -27,11 +28,14 @@ jobs:
configure: --enable-openvpn
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-openvpn
path: build-dir
path: build-dir.tgz
retention-days: 5
openvpn_check:
@@ -39,9 +43,10 @@ jobs:
fail-fast: false
matrix:
# List of refs to test
ref: [ release/2.6, v2.6.0, master ]
ref: [ release/2.6, master ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl
@@ -50,7 +55,9 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-openvpn
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Install dependencies
run: |

View File

@@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-22.04, macos-latest ]
config: [
# Add new configs here
'',
@@ -25,16 +25,26 @@ jobs:
'--enable-all --enable-asn=original',
'--enable-harden-tls',
'--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
--enable-opensslextra --enable-sessioncerts
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
--enable-opensslextra --enable-sessioncerts
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
-DWOLFSSL_TICKET_HAVE_ID -DHAVE_EX_DATA -DSESSION_CACHE_DYNAMIC_MEM'' ',
'--enable-all --enable-secure-renegotiation',
'--enable-all --enable-haproxy --enable-quic',
'--enable-dtls --enable-dtls13 --enable-earlydata
--enable-session-ticket --enable-psk
'--enable-dtls --enable-dtls13 --enable-earlydata
--enable-session-ticket --enable-psk
CPPFLAGS=''-DWOLFSSL_DTLS13_NO_HRR_ON_RESUME'' ',
'--enable-experimental --enable-kyber --enable-dtls --enable-dtls13
--enable-dtls-frag-ch',
'--enable-all --enable-dtls13 --enable-dtls-frag-ch',
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
--enable-dtls-mtu',
'--enable-dtls --enable-dtlscid --enable-dtls13 --enable-secure-renegotiation
--enable-psk --enable-aesccm --enable-nullcipher CPPFLAGS=-DWOLFSSL_STATIC_RSA',
'--enable-ascon --enable-experimental',
'--enable-ascon CPPFLAGS=-DWOLFSSL_ASCON_UNROLL --enable-experimental',
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 14
@@ -49,12 +59,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-22.04, macos-latest ]
user-settings: [
# Add new user_settings.h here
'examples/configs/user_settings_all.h',
]
name: make user_setting.h
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 14
@@ -70,15 +81,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-22.04, macos-latest ]
user-settings: [
# Add new user_settings.h here
'examples/configs/user_settings_eccnonblock.h',
'examples/configs/user_settings_min_ecc.h',
'examples/configs/user_settings_wolfboot_keytools.h',
'examples/configs/user_settings_wolftpm.h',
'examples/configs/user_settings_wolfssh.h',
'examples/configs/user_settings_tls12.h',
]
name: make user_setting.h (testwolfcrypt only)
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 14
@@ -98,8 +112,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-22.04, macos-latest ]
name: make user_setting.h (with sed)
if: github.repository_owner == 'wolfssl'
runs-on: ${{ matrix.os }}
# This should be a safe limit for the tests to run.
timeout-minutes: 14
@@ -118,7 +133,12 @@ jobs:
windows_build:
name: Windows Build Test
if: github.repository_owner == 'wolfssl'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [ x64, Win32, ARM64 ]
# This should be a safe limit for the tests to run.
timeout-minutes: 6
env:
@@ -129,7 +149,6 @@ jobs:
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
BUILD_PLATFORM: x64
steps:
- uses: actions/checkout@v4
@@ -144,8 +163,9 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{matrix.arch}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Run Test
- if: ${{ matrix.arch != 'ARM64' }}
name: Run Test
working-directory: ${{env.GITHUB_WORKSPACE}}
run: Release/x64/testsuite.exe
run: Release/${{matrix.arch}}/testsuite.exe

View File

@@ -15,7 +15,8 @@ concurrency:
jobs:
build_wolfssl:
name: Package wolfSSL
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
@@ -37,8 +38,9 @@ jobs:
- name: Build wolfSSL .deb
run: make deb-docker
- name: Build wolfSSL .rpm
run: make rpm-docker
# disabled 20240919 -- broken target.
# - name: Build wolfSSL .rpm
# run: make rpm-docker
- name: Confirm packages built
run: |
@@ -47,8 +49,9 @@ jobs:
echo Did not find exactly two deb packages!!!
exit 1
fi
RPM_COUNT=$(find -name 'wolfssl*.rpm' | wc -l)
if [ "$RPM_COUNT" != "4" ]; then
echo Did not find exactly four rpm packages!!!
exit 1
fi
# disabled 20240919 -- broken target.
# RPM_COUNT=$(find -name 'wolfssl*.rpm' | wc -l)
# if [ "$RPM_COUNT" != "4" ]; then
# echo Did not find exactly four rpm packages!!!
# exit 1
# fi

92
.github/workflows/pam-ipmi.yml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: pam-ipmi Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
# Don't run tests as this config is tested in many other places
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-pam-ipmi
path: build-dir.tgz
retention-days: 5
build_pam-ipmi:
strategy:
fail-fast: false
matrix:
git_ref: [ e4b13e6725abb178f62ee897fe1c0e81b06a9431 ]
name: ${{ matrix.git_ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install libpam-dev ninja-build meson
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-pam-ipmi
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout pam-ipmi
uses: actions/checkout@v4
with:
repository: openbmc/pam-ipmi
path: pam-ipmi
ref: ${{ matrix.git_ref }}
- name: Build pam-ipmi
working-directory: pam-ipmi
run: |
patch -p1 < ../osp/pam-ipmi/*-${{ matrix.git_ref }}.patch
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig meson setup build
ninja -C build
- name: Confirm built with wolfSSL
working-directory: pam-ipmi
run: |
ldd ./build/src/pam_ipmisave/pam_ipmisave.so | grep wolfssl

49
.github/workflows/pq-all.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Quantum Resistant Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
make_check:
strategy:
matrix:
config: [
# Add new configs here
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST"'
]
name: make check
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL
run: |
./autogen.sh
./configure ${{ matrix.config }}
make -j 4
make check
- name: Print errors
if: ${{ failure() }}
run: |
for file in scripts/*.log
do
if [ -f "$file" ]; then
echo "${file}:"
cat "$file"
echo "========================================================================"
fi
done

116
.github/workflows/rng-tools.yml vendored Normal file
View File

@@ -0,0 +1,116 @@
name: rng-tools Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
install: true
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-rng-tools
path: build-dir.tgz
retention-days: 5
rng-tools_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 6.16 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libp11-dev librtlsdr-dev libcap-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-rng-tools
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout jitterentropy-library
uses: actions/checkout@v4
with:
repository: smuellerDD/jitterentropy-library
path: jitterentropy-library
ref: v3.5.0
- name: Build jitterentropy-library
working-directory: jitterentropy-library
run: make -j
- name: Build rng-tools
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: nhorman/rng-tools
ref: v${{ matrix.ref }}
path: rng-tools
patch-file: $GITHUB_WORKSPACE/osp/rng-tools/${{ matrix.ref }}.patch
configure: --without-pkcs11 --enable-jitterentropy=$GITHUB_WORKSPACE/jitterentropy-library --with-wolfssl=$GITHUB_WORKSPACE/build-dir
check: false
- name: Testing rng-tools
id: testing
working-directory: rng-tools
run: |
# Retry up to five times
for i in {1..5}; do
TEST_RES=0
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib make check || TEST_RES=$?
if [ "$TEST_RES" -eq "0" ]; then
break
fi
done
if [ "$TEST_RES" -ne "0" ]; then
exit $TEST_RES
fi
- name: Print logs
if: ${{ failure() && steps.testing.outcome == 'failure' }}
working-directory: rng-tools/tests
run: cat test-suite.log

81
.github/workflows/socat.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
name: socat Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-maxfragment --enable-opensslall --enable-opensslextra --enable-dtls --enable-oldtls --enable-tlsv10 --enable-ipv6 'CPPFLAGS=-DWOLFSSL_NO_DTLS_SIZE_CHECK -DOPENSSL_COMPATIBLE_DEFAULTS'
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-socat
path: build-dir.tgz
retention-days: 5
socat_check:
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 30
needs: build_wolfssl
steps:
- name: Install prereqs
run:
sudo apt-get install build-essential autoconf libtool pkg-config clang libc++-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-socat
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Download socat
run: curl -O http://www.dest-unreach.org/socat/download/socat-1.8.0.0.tar.gz && tar xvf socat-1.8.0.0.tar.gz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Build socat
working-directory: ./socat-1.8.0.0
run: |
patch -p1 < ../osp/socat/1.8.0.0/socat-1.8.0.0.patch
autoreconf -vfi
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir --enable-default-ipv=4
make
- name: Run socat tests
working-directory: ./socat-1.8.0.0
run: |
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
export SHELL=/bin/bash
SOCAT=$GITHUB_WORKSPACE/socat-1.8.0.0/socat ./test.sh -t 0.5 --expect-fail 36,64,146,214,216,217,309,310,386,399,402,403,459,460,467,468,475,478,492,528,530

94
.github/workflows/softhsm.yml vendored Normal file
View File

@@ -0,0 +1,94 @@
name: SoftHSMv2 Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all CFLAGS=-DRSA_MIN_SIZE=1024
install: true
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-softhsm
path: build-dir.tgz
retention-days: 5
softhsm_check:
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 2.6.1 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 20
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y libcppunit-dev
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-softhsm
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout SoftHSMv2
uses: actions/checkout@v4
with:
repository: opendnssec/SoftHSMv2
path: softhsm
ref: ${{ matrix.ref }}
# Not using wolfSSL/actions-build-autotools-project@v1 because autogen.sh doesn't work
- name: Build softhsm
working-directory: softhsm
run: |
patch -p1 < $GITHUB_WORKSPACE/osp/softhsm/${{ matrix.ref }}.patch
autoreconf -if
./configure --with-crypto-backend=wolfssl WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
make -j
- name: Test softhsm
working-directory: softhsm
run: make -j check

99
.github/workflows/sssd.yml vendored Normal file
View File

@@ -0,0 +1,99 @@
name: sssd Tests
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_wolfssl:
if: github.repository_owner == 'wolfssl'
name: Build wolfSSL
# Just to keep it the same as the testing target
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all CFLAGS=-DWOLFSSL_NO_ASN_STRICT
install: true
check: false
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-sssd
path: build-dir.tgz
retention-days: 5
sssd_check:
if: github.repository_owner == 'wolfssl'
strategy:
fail-fast: false
matrix:
# List of releases to test
ref: [ 2.9.1 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-22.04
container:
image: quay.io/sssd/ci-client-devel:ubuntu-latest
env:
LD_LIBRARY_PATH: /usr/local/lib
# This should be a safe limit for the tests to run.
timeout-minutes: 20
needs: build_wolfssl
steps:
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y build-essential autoconf libldb-dev libldb2 python3-ldb bc
- name: Setup env
run: |
ln -s samba-4.0/ldb.h /usr/include/ldb.h
ln -s samba-4.0/ldb_errors.h /usr/include/ldb_errors.h
ln -s samba-4.0/ldb_handlers.h /usr/include/ldb_handlers.h
ln -s samba-4.0/ldb_module.h /usr/include/ldb_module.h
ln -s samba-4.0/ldb_version.h /usr/include/ldb_version.h
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-sssd
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Build and test sssd
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: SSSD/sssd
ref: ${{ matrix.ref }}
path: sssd
patch-file: $GITHUB_WORKSPACE/osp/sssd/${{ matrix.ref }}.patch
configure: >-
--without-samba --without-nfsv4-idmapd-plugin --with-oidc-child=no
--without-manpages WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
check: true

View File

@@ -15,8 +15,9 @@ concurrency:
jobs:
build_wolfssl:
name: Build wolfSSL
if: github.repository_owner == 'wolfssl'
# Just to keep it the same as the testing target
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
@@ -27,11 +28,14 @@ jobs:
configure: --enable-stunnel
install: true
- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir
- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-stunnel
path: build-dir
path: build-dir.tgz
retention-days: 5
stunnel_check:
@@ -41,7 +45,8 @@ jobs:
# List of releases to test
ref: [ 5.67 ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
needs: build_wolfssl
@@ -50,8 +55,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: wolf-install-stunnel
path: build-dir
- name: untar build-dir
run: tar -xf build-dir.tgz
- name: Checkout OSP
uses: actions/checkout@v4
with:

84
.github/workflows/watcomc.yml vendored Normal file
View File

@@ -0,0 +1,84 @@
name: Build Watcom C
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
wolfssl_watcomc_windows:
if: github.repository_owner == 'wolfssl'
strategy:
fail-fast: false
matrix:
common:
- cmake: '-G "Watcom WMake" -DCMAKE_VERBOSE_MAKEFILE=TRUE -DWOLFSSL_ASM=no -DWOLFSSL_EXAMPLES=no -DWOLFSSL_CRYPT_TESTS=no'
platform:
- title: 'Windows OW 2.0'
system: 'Windows'
image: 'windows-latest'
owimage: '2.0'
id: 'win32ow20'
cmake: '-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86'
- title: 'Linux OW 2.0'
system: 'Linux'
image: 'ubuntu-latest'
owimage: '2.0'
id: 'linuxow20'
cmake: '-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=x86'
- title: 'OS/2 OW 2.0'
system: 'OS2'
image: 'windows-latest'
owimage: '2.0'
id: 'os2ow20'
cmake: '-DCMAKE_SYSTEM_NAME=OS2 -DCMAKE_SYSTEM_PROCESSOR=x86'
thread:
- id: 'multi'
cmake: ''
owcmake: '-DCMAKE_POLICY_DEFAULT_CMP0136=NEW -DCMAKE_WATCOM_RUNTIME_LIBRARY=MultiThreaded'
- id: 'single'
cmake: '-DWOLFSSL_SINGLE_THREADED=yes'
owcmake: '-DCMAKE_POLICY_DEFAULT_CMP0136=NEW -DCMAKE_WATCOM_RUNTIME_LIBRARY=SingleThreaded'
library:
- id: 'dll'
cmake: ''
owcmake: 'DLL'
- id: 'static'
cmake: '-DBUILD_SHARED_LIBS=no'
owcmake: ''
exclude:
- { platform: { system: 'Linux' }, library: { id: 'dll' } }
runs-on: ${{ matrix.platform.image }}
name: ${{ matrix.platform.title }} (${{ matrix.thread.id }} ${{ matrix.library.id }})
steps:
- name: Setup Open Watcom ${{ matrix.platform.owimage }}
uses: open-watcom/setup-watcom@v0
with:
version: ${{ matrix.platform.owimage }}
- name: Checkout wolfSSL
uses: actions/checkout@v4
with:
path: wolfssl
- name: Build wolfSSL
working-directory: wolfssl
shell: bash
run: |
cmake -B build ${{matrix.common.cmake}} ${{ matrix.platform.cmake }} ${{ matrix.thread.cmake }} ${{ matrix.library.cmake }} ${{ matrix.thread.owcmake }}${{ matrix.library.owcmake }}
cmake --build build
- name: Upload build errors
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.id }}-${{ matrix.thread.id }}-${{ matrix.library.id }}
path: |
build/**

58
.github/workflows/win-csharp-test.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Windows CSharp Build Test
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
if: github.repository_owner == 'wolfssl'
runs-on: windows-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 6
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: wolfssl\wrapper\CSharp\wolfSSL_CSharp.sln
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Debug
BUILD_PLATFORM: x64
steps:
- name: Pull wolfssl
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
- name: Create FIPS stub files (autogen)
working-directory: wolfssl
run: |
echo $null >> wolfcrypt\src\fips.c
echo $null >> wolfcrypt\src\fips_test.c
echo $null >> wolfcrypt\src\wolfcrypt_first.c
echo $null >> wolfcrypt\src\wolfcrypt_last.c
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Run wolfCrypt test
working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
run: ./wolfCrypt-test.exe
- name: Run wolfSSL client/server example
working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
run: ./wolfSSL-TLS-Server.exe && sleep 1 & ./wolfSSL-TLS-Client.exe

View File

@@ -0,0 +1,41 @@
name: wolfCrypt conversion warnings
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
build_library:
strategy:
matrix:
config: [
# Add new configs here
'--disable-asm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-smallstack --disable-asm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-smallstack --enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion -DNO_INT128"'
]
name: build library
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Build wolfCrypt with extra type conversion warnings
run: |
./autogen.sh || $(exit 2)
echo "running ./configure ${{ matrix.config }}"
./configure ${{ matrix.config }} || $(exit 3)
make -j 4 || $(exit 4)

View File

@@ -25,7 +25,8 @@ jobs:
zephyr-sdk: 0.16.3
- zephyr-ref: v2.7.4
zephyr-sdk: 0.16.3
runs-on: ubuntu-latest
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-22.04
# This should be a safe limit for the tests to run.
timeout-minutes: 25
steps:
@@ -45,7 +46,7 @@ jobs:
libglib2.0-dev libgtk2.0-0 liblocale-gettext-perl libncurses5-dev libpcap-dev \
libpopt0 libsdl1.2-dev libsdl2-dev libssl-dev libtool libtool-bin locales make \
net-tools ninja-build openssh-client parallel pkg-config python3-dev python3-pip \
python3-ply python3-setuptools python-is-python3 qemu rsync socat srecord sudo \
python3-ply python3-setuptools python-is-python3 qemu-kvm rsync socat srecord sudo \
texinfo unzip wget ovmf xz-utils
- name: Install west

25
.gitignore vendored
View File

@@ -10,6 +10,7 @@ ctaocrypt/src/src/
*.cache
.dirstamp
*.user
!*-VS2022.vcxproj.user
configure
config.*
!cmake/config.in
@@ -245,6 +246,7 @@ linuxkm/libwolfssl.mod.c
linuxkm/libwolfssl.lds
linuxkm/module_exports.c
linuxkm/linuxkm/get_thread_size
*.nds
# autotools generated
scripts/unit.test
@@ -413,6 +415,19 @@ user_settings_asm.h
/IDE/Espressif/**/sdkconfig
/IDE/Espressif/**/sdkconfig.old
# ESP8266 RTOS SDK has a slightly different sdkconfig filename to exclude:
/IDE/Espressif/**/sdkconfig.debug
/IDE/Espressif/**/sdkconfig.release
/IDE/Espressif/**/sdkconfig-debug
/IDE/Espressif/**/sdkconfig-release
# Always include Espressif makefiles (typically only used for ESP8266)
!/IDE/Espressif/**/Makefile
!/IDE/Espressif/**/component.mk
# Ignore all the example logs
/IDE/Espressif/ESP-IDF/examples/**/logs/*
# MPLAB
/IDE/MPLABX16/wolfssl.X/dist/default/
/IDE/MPLABX16/wolfssl.X/.generated_files
@@ -434,6 +449,12 @@ debian/changelog
debian/control
*.deb
# Ada/Alire files
wrapper/Ada/alire/
wrapper/Ada/config/
wrapper/Ada/lib/
wrapper/Ada/obj/
# PlatformIO
/**/.pio
/**/.vscode/.browse.c_cpp.db*
@@ -441,3 +462,7 @@ debian/control
/**/.vscode/launch.json
/**/.vscode/ipch
/**/sdkconfig.esp32dev
# Autogenerated debug trace headers
wolfssl/debug-trace-error-codes.h
wolfssl/debug-untrace-error-codes.h

990
.wolfssl_known_macro_extras Normal file
View File

@@ -0,0 +1,990 @@
AES_GCM_GMULT_NCT
AFX_RESOURCE_DLL
AFX_TARG_ENU
ALLOW_BINARY_MISMATCH_INTROSPECTION
ALLOW_V1_EXTENSIONS
ANDROID
APP_ESP_HTTP_CLIENT
APP_ESP_HTTP_CLIENT_EXAMPLE
APSTUDIO_INVOKED
ARCH_sim
ARDUINO
ARDUINO_ARCH_RP2040
ARDUINO_SAMD_NANO_33_IOT
ARDUINO_SAM_DUE
ASN_DUMP_OID
ASN_TEMPLATE_SKIP_ISCA_CHECK
ATCAPRINTF
ATCA_ENABLE_DEPRECATED
AVR
BASE64_NO_TABLE
BLAKE2B_SELFTEST
BLAKE2S_SELFTEST
BLOCKING
BSP_DEFAULT_IO_CHANNEL_DEFINED
BSP_LED_0
BSP_LED_1
BSP_SDCARD_ESDHC_CHANNEL
BSP_SDCARD_SDHC_CHANNEL
BSP_SDCARD_SPI_CHANNEL
CAAM_OUT_INVALIDATE
CERT_REL_PREFIX
CIOCASYMFEAT
CIOCGSESSINFO
CMSIS_OS2_H_
COMPONENT_WOLFSSL
CONFIG_ARCH_CHIP_STM32F746ZG
CONFIG_ARCH_CHIP_STM32H743ZI
CONFIG_ARCH_CHIP_STM32L552ZE
CONFIG_ARCH_POSIX
CONFIG_ARM
CONFIG_ARM64
CONFIG_BOARD_NATIVE_POSIX
CONFIG_COMPILER_OPTIMIZATION_DEFAULT
CONFIG_COMPILER_OPTIMIZATION_NONE
CONFIG_COMPILER_OPTIMIZATION_PERF
CONFIG_COMPILER_OPTIMIZATION_SIZE
CONFIG_CRYPTO_FIPS
CONFIG_CRYPTO_MANAGER
CONFIG_CSPRNG_ENABLED
CONFIG_ESP32C2_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32H2_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP8266_XTAL_FREQ_26
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_160
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_80
CONFIG_ESP_ENABLE_WOLFSSH
CONFIG_ESP_MAIN_TASK_STACK_SIZE
CONFIG_ESP_TLS_USING_WOLFSSL
CONFIG_ESP_WIFI_PASSWORD
CONFIG_ESP_WIFI_SSID
CONFIG_ESP_WOLFSSL_ENABLE_KYBER
CONFIG_ESP_WOLFSSL_ENABLE_WOLFSSH
CONFIG_ESP_WOLFSSL_NO_ESP32_CRYPT
CONFIG_ESP_WOLFSSL_NO_HW_AES
CONFIG_ESP_WOLFSSL_NO_HW_HASH
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
CONFIG_FREERTOS_HZ
CONFIG_FREERTOS_UNICORE
CONFIG_IDF_TARGET
CONFIG_IDF_TARGET_ARCH_RISCV
CONFIG_IDF_TARGET_ARCH_XTENSA
CONFIG_IDF_TARGET_ESP32
CONFIG_IDF_TARGET_ESP32C2
CONFIG_IDF_TARGET_ESP32C3
CONFIG_IDF_TARGET_ESP32C6
CONFIG_IDF_TARGET_ESP32H2
CONFIG_IDF_TARGET_ESP32S2
CONFIG_IDF_TARGET_ESP32S3
CONFIG_IDF_TARGET_ESP8266
CONFIG_IDF_TARGET_ESP8684
CONFIG_MAIN_TASK_STACK_SIZE
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
CONFIG_MBEDTLS_PSA_CRYPTO_C
CONFIG_MIPS
CONFIG_MODULE_SIG
CONFIG_NET_SOCKETS_SOCKOPT_TLS
CONFIG_NEWLIB_LIBC
CONFIG_NEWLIB_NANO_FORMAT
CONFIG_PICOLIBC
CONFIG_POSIX_API
CONFIG_POSIX_THREADS
CONFIG_PREEMPT_COUNT
CONFIG_PTHREAD_IPC
CONFIG_SMP
CONFIG_SNTP_TIME_SYNC_METHOD_SMOOTH
CONFIG_TIMER_TASK_STACK_DEPTH
CONFIG_TIMER_TASK_STACK_SIZE
CONFIG_TLS_STACK_WOLFSSL
CONFIG_USE_WOLFSSL_ESP_SDK_TIME
CONFIG_USE_WOLFSSL_ESP_SDK_WIFI
CONFIG_WOLFCRYPT_ARMASM
CONFIG_WOLFCRYPT_FIPS
CONFIG_WOLFCRYPT_INTELASM
CONFIG_WOLFSSL
CONFIG_WOLFSSL_ALLOW_TLS13
CONFIG_WOLFSSL_ALPN
CONFIG_WOLFSSL_ALT_CERT_CHAINS
CONFIG_WOLFSSL_APPLE_HOMEKIT
CONFIG_WOLFSSL_ASN_ALLOW_0_SERIAL
CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
CONFIG_WOLFSSL_DTLS
CONFIG_WOLFSSL_ENABLE_KYBER
CONFIG_WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER
CONFIG_WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER
CONFIG_WOLFSSL_EXAMPLE_NAME_NONE
CONFIG_WOLFSSL_EXAMPLE_NAME_TEMPLATE
CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT
CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER
CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT
CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE
CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER
CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE
CONFIG_WOLFSSL_HKDF
CONFIG_WOLFSSL_MAX_FRAGMENT_LEN
CONFIG_WOLFSSL_NO_ASN_STRICT
CONFIG_WOLFSSL_PSK
CONFIG_WOLFSSL_RSA_PSS
CONFIG_WOLFSSL_TARGET_HOST
CONFIG_WOLFSSL_TARGET_PORT
CONFIG_WOLFSSL_TLS13_ENABLED
CONFIG_WOLFSSL_TLS_VERSION_1_2
CONFIG_WOLFSSL_TLS_VERSION_1_3
CONFIG_WOLFTPM
CONFIG_WOLFTPM_EXAMPLE_NAME_ESPRESSIF
CONFIG_X86
CONV_WITH_DIV
CPA_CY_API_VERSION_NUM_MAJOR
CPU_MIMXRT1176DVMAA_cm7
CPU_MK82FN256VLL15
CRLDP_VALIDATE_DATA
CRL_REPORT_LOAD_ERRORS
CRL_STATIC_REVOKED_LIST
CRYPTOCELL_KEY_SIZE
CRYP_HEADERWIDTHUNIT_BYTE
CRYP_KEYIVCONFIG_ONCE
CRYP_KEYSIZE_192B
CSM_UNSUPPORTED_ALGS
CTYPE_USER
CURVED448_SMALL
CY_USING_HAL
DCP_USE_DCACHE
DILITHIUM_MUL_11_SLOW
DILITHIUM_MUL_44_SLOW
DILITHIUM_MUL_QINV_SLOW
DILITHIUM_MUL_Q_SLOW
DILITHIUM_MUL_SLOW
DILITHIUM_USE_HINT_CT
DTLS_RECEIVEFROM_NO_TIMEOUT_ON_INVALID_PEER
ECCSI_ORDER_MORE_BITS_THAN_PRIME
ECC_DUMP_OID
ECDHE_SIZE
ENABLE_SECURE_SOCKETS_LOGS
ESP32
ESP8266
ESP_ENABLE_WOLFSSH
ESP_IDF_VERSION_MAJOR
ESP_IDF_VERSION_MINOR
ESP_PLATFORM
ESP_TASK_MAIN_STACK
EV_TRIGGER
FP_ECC_CONTROL
FREERTOS_TCP_WINSIM
FREESCALE
FREESCALE_RNGB
FREESCALE_USE_MMCAU_CLASSIC
FSL_FEATURE_HAS_L1CACHE
FSL_FEATURE_LTC_HAS_DES
FSL_FEATURE_LTC_HAS_GCM
FSL_FEATURE_LTC_HAS_PKHA
FSL_FEATURE_LTC_HAS_SHA
FSL_FEATURE_SOC_LTC_COUNT
FSL_FEATURE_SOC_MMCAU_COUNT
FSL_FEATURE_SOC_RNG_COUNT
FSL_FEATURE_SOC_TRNG_COUNT
FUSION_RTOS
GENERATE_MACHINE_PARSEABLE_REPORT
GE_P3_TOBYTES_IMPL
GOAHEAD_WS
HAL_RTC_MODULE_ENABLED
HARDWARE_CACHE_COHERENCY
HASH_AlgoMode_HASH
HASH_BYTE_SWAP
HASH_CR_LKEY
HASH_DIGEST
HASH_DataType_8b
HASH_IMR_DCIE
HASH_IMR_DINIE
HAVE_AESGCM_DECRYPT
HAVE_BYTEREVERSE64
HAVE_CERTIFICATE_STATUS_V2
HAVE_COLDFIRE_SEC
HAVE_CRL_UPDATE_CB
HAVE_CSHARP
HAVE_CURL
HAVE_CURVE22519
HAVE_DANE
HAVE_ECC239
HAVE_ECC320
HAVE_ECC512
HAVE_ECC_CDH_CAST
HAVE_ECC_SM2
HAVE_ESP_CLK
HAVE_FACON
HAVE_FIPS_VERSION_PORT
HAVE_FUZZER
HAVE_INTEL_MULX
HAVE_INTEL_QAT_SYNC
HAVE_INTEL_SPEEDUP
HAVE_MDK_RTX
HAVE_NETX_BSD
HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK
HAVE_POCO_LIB
HAVE_RTP_SYS
HAVE_SECURE_GETENV
HAVE_STACK_SIZE_VERBOSE_LOG
HAVE_THREADX
HAVE_TM_TYPE
HAVE_VALIDATE_DATE
HAVE_VA_COPY
HAVE_X448
HONOR_MATH_USED_LENGTH
HSM_KEY_TYPE_HMAC_224
HSM_KEY_TYPE_HMAC_256
HSM_KEY_TYPE_HMAC_384
HSM_KEY_TYPE_HMAC_512
HSM_OP_KEY_GENERATION_FLAGS_CREATE
HSM_OP_KEY_GENERATION_FLAGS_UPDATE
HSM_SVC_KEY_STORE_FLAGS_UPDATE
IDIRECT_DEV_RANDOM
IDIRECT_DEV_TIME
ID_TRNG
IGNORE_KEY_EXTENSIONS
IGNORE_NETSCAPE_CERT_TYPE
INCLUDE_uxTaskGetStackHighWaterMark
INTEGRITY
INTIMEVER
IOTSAFE_NO_GETDATA
IOTSAFE_SIG_8BIT_LENGTH
KCAPI_USE_XMALLOC
KYBER_NONDETERMINISTIC
K_SERIES
LIBWOLFSSL_VERSION_GIT_BRANCH
LIBWOLFSSL_VERSION_GIT_HASH
LIBWOLFSSL_VERSION_GIT_HASH_DATE
LIBWOLFSSL_VERSION_GIT_ORIGIN
LIBWOLFSSL_VERSION_GIT_SHORT_HASH
LIBWOLFSSL_VERSION_GIT_TAG
LINUXKM_FPU_STATES_FOLLOW_THREADS
LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
LINUX_CYCLE_COUNT
LINUX_RUSAGE_UTIME
LP64
MAX3266X_AESGCM
MAX3266X_RSA
MAXQ10XX_PRODUCTION_KEY
MAXQ_EXPORT_TLS_KEYS
MAXQ_SHA1
MAXSEG_64K
MAX_WOLFSSL_FILE_SIZE
MDK_CONF_BARE_METAL
MDK_CONF_FS
MDK_CONF_RTX_TCP_FS
MDK_CONF_TCP_FS
MDK_WOLFLIB
MICRIUM_MALLOC
MICROCHIP_MPLAB_HARMONY
MICROCHIP_MPLAB_HARMONY_3
MICRO_SESSION_CACHEx
MODULE_SOCK_TCP
MP_31BIT
MP_8BIT
MQX_USE_IO_OLD
MULTI_VALUE_STATISTICS
MUTEX_DURING_INIT
NEED_THREADX_TYPES
NETX_DUO
NET_SECURE_MODULE_EN
NOTE_TRIGGER
NO_AES_DECRYPT
NO_ARDUINO_DEFAULT
NO_ASM
NO_ASN_OLD_TYPE_NAMES
NO_CAMELLIA_CBC
NO_CERT
NO_CIPHER_SUITE_ALIASES
NO_CLIENT_CACHE
NO_CLOCK_SPEEDUP
NO_CURVE25519_KEY_EXPORT
NO_CURVE25519_KEY_IMPORT
NO_CURVE25519_SHARED_SECRET
NO_CURVE448_KEY_EXPORT
NO_CURVE448_KEY_IMPORT
NO_CURVE448_SHARED_SECRET
NO_DEV_URANDOM
NO_ECC384
NO_ECC521
NO_ECC_CACHE_CURVE
NO_ECC_CHECK_KEY
NO_ECC_KEY_IMPORT
NO_ECC_MAKE_PUB
NO_ED25519_CLIENT_AUTH
NO_ED25519_KEY_EXPORT
NO_ED25519_KEY_IMPORT
NO_ED25519_MAKE_KEY
NO_ED25519_SIGN
NO_ED25519_VERIFY
NO_ED448_CLIENT_AUTH
NO_ED448_KEY_EXPORT
NO_ED448_KEY_IMPORT
NO_ED448_SIGN
NO_ED448_VERIFY
NO_ESP_MP_MUL_EVEN_ALT_CALC
NO_FORCE_SCR_SAME_SUITE
NO_GCM_ENCRYPT_EXTRA
NO_GETENV
NO_HANDSHAKE_DONE_CB
NO_IMX6_CAAM_AES
NO_IMX6_CAAM_HASH
NO_OLD_NAMES
NO_OLD_POLY1305
NO_OLD_TIMEVAL_NAME
NO_PBKDF1
NO_PIC32MZ_CRYPT
NO_PIC32MZ_HASH
NO_PIC32MZ_RNG
NO_PKCS11_AES
NO_PKCS11_AESCBC
NO_PKCS11_AESGCM
NO_PKCS11_ECC
NO_PKCS11_ECDH
NO_PKCS11_EC_KEYGEN
NO_PKCS11_HMAC
NO_PKCS11_RNG
NO_PKCS11_RSA
NO_PKCS11_RSA_PKCS
NO_PKCS7
NO_PKCS7_COMPRESSED_DATA
NO_PKCS7_ENCRYPTED_DATA
NO_PKCS7_STREAM
NO_POLY1305_ASM
NO_PUBLIC_CCM_SET_NONCE
NO_PUBLIC_GCM_SET_IV
NO_RESUME_SUITE_CHECK
NO_RNG
NO_RNG_MUTEX
NO_SESSION_CACHE_ROW_LOCK
NO_SKID
NO_SKIP_PREVIEW
NO_STDIO_FGETS_REMAP
NO_TKERNEL_MEM_POOL
NO_TLSX_PSKKEM_PLAIN_ANNOUNCE
NO_VERIFY_OID
NO_WC_SSIZE_TYPE
NO_WOLFSSL_ALLOC_ALIGN
NO_WOLFSSL_AUTOSAR_CRYIF
NO_WOLFSSL_AUTOSAR_CRYPTO
NO_WOLFSSL_AUTOSAR_CSM
NO_WOLFSSL_BASE64_DECODE
NO_WOLFSSL_BN_CTX
NO_WOLFSSL_MSG_EX
NO_WOLFSSL_RENESAS_FSPSM_AES
NO_WOLFSSL_RENESAS_FSPSM_HASH
NO_WOLFSSL_RENESAS_TSIP_CRYPT_AES
NO_WOLFSSL_SHA256
NO_WOLFSSL_SHA256_INTERLEAVE
NO_WOLFSSL_SHA512_INTERLEAVE
NO_WOLFSSL_SKIP_TRAILING_PAD
NO_WOLFSSL_SMALL_STACK_STATIC
NO_WOLFSSL_XILINX_TAG_MALLOC
NRF52
NRF52_SERIES
NRF_ERROR_MODULE_ALREADY_INITIALIZED
OLD_HELLO_ALLOWED
OPENSSL_EXTRA_BSD
OPENSSL_EXTRA_NO_ASN1
OPENSSL_EXTRA_NO_BN
OPENSSL_NO_PK
OS_WINDOWS
OTHERBOARD
OTHER_BOARD
PEER_INFO
PKA_ECC_SCALAR_MUL_IN_B_COEFF
PLATFORMIO
PLUTON_CRYPTO_ECC
PRINT_SESSION_STATS
PTHREAD_STACK_MIN
QAT_ENABLE_HASH
QAT_ENABLE_RNG
QAT_USE_POLLING_CHECK
RC_NO_RNG
REDIRECTION_IN3_KEYELMID
REDIRECTION_IN3_KEYID
REDIRECTION_OUT1_KEYELMID
REDIRECTION_OUT1_KEYID
REDIRECTION_OUT2_KEYELMID
REDIRECTION_OUT2_KEYID
RENESAS_T4_USE
RTC_ALARMSUBSECONDMASK_ALL
RTE_CMSIS_RTOS_RTX
RTOS_MODULE_NET_AVAIL
RTPLATFORM
SA_INTERRUPT
SCEKEY_INSTALLED
SHA256_MANY_REGISTERS
SHA3_BY_SPEC
SHOW_CERTS
SHOW_GEN
SHOW_SIZES
SHOW_SSID_AND_PASSWORD
SIM_SCGC3_RNGA_MASK
SIM_SCGC5_PORTC_MASK
SIM_SCGC5_PORTD_MASK
SIM_SCGC5_PORTE_MASK
SIM_SCGC6_RNGA_MASK
SL_SE_KEY_TYPE_ECC_P384
SL_SE_KEY_TYPE_ECC_P521
SL_SE_KEY_TYPE_ECC_X25519
SL_SE_KEY_TYPE_ECC_X448
SL_SE_PRF_HMAC_SHA1
SOFTDEVICE_PRESENT
SO_NOSIGPIPE
SO_REUSEPORT
SP_INT_NO_ASM
SP_MATH_NEED_ADD_OFF
SP_USE_DIVTI3
SQRTMOD_USE_MOD_EXP
SSL_SNIFFER_EXPORTS
SSN_BUILDING_LIBYASSL
STATIC_CHUNKS_ONLY
STM32F107xC
STM32F207xx
STM32F217xx
STM32F401xE
STM32F407xx
STM32F437xx
STM32F756xx
STM32F777xx
STM32G071xx
STM32G491xx
STM32H563xx
STM32H723xx
STM32H725xx
STM32H743xx
STM32H753xx
STM32H7S3xx
STM32L475xx
STM32L4A6xx
STM32L552xx
STM32L562xx
STM32MP135Fxx
STM32U575xx
STM32U585xx
STM32U5A9xx
STM32WB55xx
STM32WL55xx
STM32_AESGCM_PARTIAL
STM32_HW_CLOCK_AUTO
STM32_NUTTX_RNG
TASK_EXTRA_STACK_SIZE
TCP_NODELAY
TFM_ALREADY_SET
TFM_SMALL_MONT_SET
THREADED_SNIFFTEST
TIME_T_NOT_LONG
TI_DUMMY_BUILD
TLS13_RSA_PSS_SIGN_CB_NO_PREHASH
UNICODE
USER_CA_CB
USER_CUSTOM_SNIFFX
USER_MATH_LIB
USE_ALT_MPRIME
USE_ANY_ADDR
USE_CERT_BUFFERS_25519
USE_CERT_BUFFERS_3072
USE_ECDSA_KEYSZ_HASH_ALGO
USE_FULL_ASSERT
USE_HAL_DRIVER
USE_NXP_LTC
USE_NXP_MMCAU
USE_QAE_THREAD_LS
USE_SECRET_CALLBACK
USE_STSAFE_RNG_SEED
USE_STSAFE_VERBOSE
USE_TLSV13
USE_WOLF_STRNSTR
USS_API
WC_AESXTS_STREAM_NO_REQUEST_ACCOUNTING
WC_AES_BS_WORD_SIZE
WC_AES_GCM_DEC_AUTH_EARLY
WC_ASN_HASH_SHA256
WC_ASYNC_ENABLE_3DES
WC_ASYNC_ENABLE_AES
/* ARC4 implementation has been removed */
WC_ASYNC_ENABLE_DH
WC_ASYNC_ENABLE_ECC
WC_ASYNC_ENABLE_ECC_KEYGEN
WC_ASYNC_ENABLE_HMAC
WC_ASYNC_ENABLE_MD5
WC_ASYNC_ENABLE_RSA
WC_ASYNC_ENABLE_RSA_KEYGEN
WC_ASYNC_ENABLE_SHA
WC_ASYNC_ENABLE_SHA224
WC_ASYNC_ENABLE_SHA256
WC_ASYNC_ENABLE_SHA3
WC_ASYNC_ENABLE_SHA384
WC_ASYNC_ENABLE_SHA512
WC_ASYNC_NO_CRYPT
WC_ASYNC_NO_HASH
WC_DILITHIUM_CACHE_PRIV_VECTORS
WC_DILITHIUM_CACHE_PUB_VECTORS
WC_DILITHIUM_FIXED_ARRAY
WC_DISABLE_RADIX_ZERO_PAD
WC_ECC_NONBLOCK_ONLY
WC_KDF_NIST_SP_800_56C
WC_LMS_FULL_HASH
WC_NO_RNG_SIMPLE
WC_NO_STATIC_ASSERT
WC_PKCS11_FIND_WITH_ID_ONLY
WC_PROTECT_ENCRYPTED_MEM
WC_RNG_BLOCKING
WC_RSA_DIRECT
WC_RSA_NONBLOCK
WC_RSA_NONBLOCK_TIME
WC_RSA_NO_FERMAT_CHECK
WC_SHA384
WC_SHA384_DIGEST_SIZE
WC_SHA512
WC_SSIZE_TYPE
WC_STRICT_SIG
WC_XMSS_FULL_HASH
WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
WOLFSENTRY_H
WOLFSENTRY_NO_JSON
WOLFSSL_32BIT_MILLI_TIME
WOLFSSL_AARCH64_PRIVILEGE_MODE
WOLFSSL_AESNI_BY4
WOLFSSL_AESNI_BY6
WOLFSSL_AFTER_DATE_CLOCK_SKEW
WOLFSSL_ALGO_HW_MUTEX
WOLFSSL_ALLOW_CRIT_AIA
WOLFSSL_ALLOW_CRIT_AKID
WOLFSSL_ALLOW_CRIT_SKID
WOLFSSL_ALLOW_ENCODING_CA_FALSE
WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST
WOLFSSL_ALLOW_NO_CN_IN_SAN
WOLFSSL_ALLOW_NO_SUITES
WOLFSSL_ALLOW_SERVER_SC_EXT
WOLFSSL_ALLOW_TLS_SHA1
WOLFSSL_ALTERNATIVE_DOWNGRADE
WOLFSSL_ALT_NAMES_NO_REV
WOLFSSL_ARM_ARCH_NEON_64BIT
WOLFSSL_ASCON_UNROLL
WOLFSSL_ASNC_CRYPT
WOLFSSL_ASN_EXTRA
WOLFSSL_ASN_INT_LEAD_0_ANY
WOLFSSL_ASN_TEMPLATE_NEED_SET_INT32
WOLFSSL_ASN_TEMPLATE_TYPE_CHECK
WOLFSSL_ATECC508
WOLFSSL_ATECC508A_NOIDLE
WOLFSSL_ATECC508A_NOSOFTECC
WOLFSSL_ATECC508A_TLS
WOLFSSL_ATECC_ECDH_IOENC
WOLFSSL_ATECC_NO_ECDH_ENC
WOLFSSL_ATECC_RNG
WOLFSSL_ATECC_TFLXTLS
WOLFSSL_ATECC_TNGTLS
WOLFSSL_ATMEL
WOLFSSL_ATMEL_TIME
WOLFSSL_BEFORE_DATE_CLOCK_SKEW
WOLFSSL_BIGINT_TYPES
WOLFSSL_BIO_NO_FLOW_STATS
WOLFSSL_BLAKE2B_INIT_EACH_FIELD
WOLFSSL_BLAKE2S_INIT_EACH_FIELD
WOLFSSL_BLIND_PRIVATE_KEY
WOLFSSL_BYTESWAP32_ASM
WOLFSSL_CAAM_BLACK_KEY_AESCCM
WOLFSSL_CAAM_BLACK_KEY_SM
WOLFSSL_CAAM_NO_BLACK_KEY
WOLFSSL_CALLBACKS
WOLFSSL_CHECK_DESKEY
WOLFSSL_CHECK_MEM_ZERO
WOLFSSL_CHIBIOS
WOLFSSL_CLANG_TIDY
WOLFSSL_COMMERCIAL_LICENSE
WOLFSSL_CONTIKI
WOLFSSL_CRL_ALLOW_MISSING_CDP
WOLFSSL_CURVE25519_BLINDING
WOLFSSL_CUSTOM_CONFIG
WOLFSSL_DILITHIUM_ASSIGN_KEY
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
WOLFSSL_DILITHIUM_NO_ASN1
WOLFSSL_DILITHIUM_NO_CHECK_KEY
WOLFSSL_DILITHIUM_NO_LARGE_CODE
WOLFSSL_DILITHIUM_NO_MAKE
WOLFSSL_DILITHIUM_REVERSE_HASH_OID
WOLFSSL_DILITHIUM_SIGN_CHECK_W0
WOLFSSL_DILITHIUM_SIGN_CHECK_Y
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC_A
WOLFSSL_DILITHIUM_SMALL_MEM_POLY64
WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC
WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
WOLFSSL_DISABLE_EARLY_SANITY_CHECKS
WOLFSSL_DTLS_DISALLOW_FUTURE
WOLFSSL_DTLS_RESEND_ONLY_TIMEOUT
WOLFSSL_DUMP_MEMIO_STREAM
WOLFSSL_DUP_CERTPOL
WOLFSSL_ECC_BLIND_K
WOLFSSL_ECC_GEN_REJECT_SAMPLING
WOLFSSL_ECC_NO_SMALL_STACK
WOLFSSL_ECC_SIGALG_PARAMS_NULL_ALLOWED
WOLFSSL_ECDHX_SHARED_NOT_ZERO
WOLFSSL_ECDSA_MATCH_HASH
WOLFSSL_ECDSA_SET_K_ONE_LOOP
WOLFSSL_EC_POINT_CMP_JACOBIAN
WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
WOLFSSL_EMNET
WOLFSSL_ESPWROOM32
WOLFSSL_EVP_PRINT
WOLFSSL_EXPORT_INT
WOLFSSL_EXPORT_SPC_SZ
WOLFSSL_EXTRA
WOLFSSL_FORCE_OCSP_NONCE_CHECK
WOLFSSL_FRDM_K64
WOLFSSL_FRDM_K64_JENKINS
WOLFSSL_FUNC_TIME
WOLFSSL_FUNC_TIME_LOG
WOLFSSL_GEN_CERT
WOLFSSL_GETRANDOM
WOLFSSL_GNRC
WOLFSSL_HARDEN_TLS_ALLOW_ALL_CIPHERSUITES
WOLFSSL_HARDEN_TLS_ALLOW_OLD_TLS
WOLFSSL_HARDEN_TLS_ALLOW_TRUNCATED_HMAC
WOLFSSL_HARDEN_TLS_NO_PKEY_CHECK
WOLFSSL_HARDEN_TLS_NO_SCR_CHECK
WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY
WOLFSSL_I2D_ECDSA_SIG_ALLOC
WOLFSSL_IAR_ARM_TIME
WOLFSSL_IGNORE_BAD_CERT_PATH
WOLFSSL_IMX6
WOLFSSL_IMX6_CAAM
WOLFSSL_IMX6_CAAM_BLOB
WOLFSSL_IMX6_CAAM_RNG
WOLFSSL_IMXRT_DCP
WOLFSSL_ISOTP
WOLFSSL_KEIL
WOLFSSL_KEIL_NET
WOLFSSL_KYBER_INVNTT_UNROLL
WOLFSSL_KYBER_NO_LARGE_CODE
WOLFSSL_KYBER_NO_MALLOC
WOLFSSL_KYBER_NTT_UNROLL
WOLFSSL_LIB
WOLFSSL_LMS_CACHE_BITS
WOLFSSL_LMS_FULL_HASH
WOLFSSL_LMS_LARGE_CACHES
WOLFSSL_LMS_MAX_HEIGHT
WOLFSSL_LMS_MAX_LEVELS
WOLFSSL_LMS_NO_SIG_CACHE
WOLFSSL_LMS_ROOT_LEVELS
WOLFSSL_LPC43xx
WOLFSSL_MAKE_SYSTEM_NAME_LINUX
WOLFSSL_MAKE_SYSTEM_NAME_WSL
WOLFSSL_MDK5
WOLFSSL_MEM_FAIL_COUNT
WOLFSSL_MLKEM_ENCAPSULATE_SMALL_MEM
WOLFSSL_MLKEM_MAKEKEY_SMALL_MEM
WOLFSSL_MONT_RED_CT
WOLFSSL_MP_COND_COPY
WOLFSSL_MP_INVMOD_CONSTANT_TIME
WOLFSSL_MULTICIRCULATE_ALTNAMELIST
WOLFSSL_NONBLOCK_OCSP
WOLFSSL_NOSHA3_384
WOLFSSL_NOT_WINDOWS_API
WOLFSSL_NO_BIO_ADDR_IN
WOLFSSL_NO_CLIENT
WOLFSSL_NO_CLIENT_CERT_ERROR
WOLFSSL_NO_COPY_CERT
WOLFSSL_NO_COPY_KEY
WOLFSSL_NO_CRL_DATE_CHECK
WOLFSSL_NO_CRL_NEXT_DATE
WOLFSSL_NO_DECODE_EXTRA
WOLFSSL_NO_DER_TO_PEM
WOLFSSL_NO_DH186
WOLFSSL_NO_DTLS_SIZE_CHECK
WOLFSSL_NO_ETM_ALERT
WOLFSSL_NO_FENCE
WOLFSSL_NO_FSEEK
WOLFSSL_NO_INIT_CTX_KEY
WOLFSSL_NO_ISSUERHASH_TDPEER
WOLFSSL_NO_KCAPI_AES_CBC
WOLFSSL_NO_KCAPI_HMAC_SHA1
WOLFSSL_NO_KCAPI_HMAC_SHA224
WOLFSSL_NO_KCAPI_HMAC_SHA256
WOLFSSL_NO_KCAPI_HMAC_SHA384
WOLFSSL_NO_KCAPI_HMAC_SHA512
WOLFSSL_NO_KCAPI_SHA224
WOLFSSL_NO_OCSP_DATE_CHECK
WOLFSSL_NO_OCSP_ISSUER_CHAIN_CHECK
WOLFSSL_NO_OCSP_OPTIONAL_CERTS
WOLFSSL_NO_PUBLIC_FFDHE
WOLFSSL_NO_RSA_KEY_CHECK
WOLFSSL_NO_SERVER_GROUPS_EXT
WOLFSSL_NO_SESSION_STATS
WOLFSSL_NO_SIGALG
WOLFSSL_NO_SOCKADDR_UN
WOLFSSL_NO_SPHINCS
WOLFSSL_NO_STRICT_CIPHER_SUITE
WOLFSSL_NO_TICKET_EXPIRE
WOLFSSL_NO_TRUSTED_CERTS_VERIFY
WOLFSSL_NO_XOR_OPS
WOLFSSL_NRF51_AES
WOLFSSL_OLDTLS_AEAD_CIPHERSUITES
WOLFSSL_OLDTLS_SHA2_CIPHERSUITES
WOLFSSL_OLD_SET_CURVES_LIST
WOLFSSL_OLD_TIMINGPADVERIFY
WOLFSSL_OLD_UNSUPPORTED_EXTENSION
WOLFSSL_OPTIONS_IGNORE_SYS
WOLFSSL_PASSTHRU_ERR
WOLFSSL_PB
WOLFSSL_PEER_ADDRESS_CHANGES
WOLFSSL_PKCS11_RW_TOKENS
WOLFSSL_PRCONNECT_PRO
WOLFSSL_PREFIX
WOLFSSL_PSA_NO_AES
WOLFSSL_PSA_NO_HASH
WOLFSSL_PSA_NO_PKCB
WOLFSSL_PSA_NO_PKCBS
WOLFSSL_PSA_NO_RNG
WOLFSSL_PSK_IDENTITY_ALERT
WOLFSSL_PSK_ID_PROTECTION
WOLFSSL_PSK_MULTI_ID_PER_CS
WOLFSSL_PSK_TLS13_CB
WOLFSSL_PSOC6_CRYPTO
WOLFSSL_PYTHON
WOLFSSL_RENESAS_FSPSM_CRYPT_ONLY
WOLFSSL_RENESAS_RA6M3
WOLFSSL_RENESAS_RA6M3G
WOLFSSL_RENESAS_RSIP
WOLFSSL_RENESAS_RZN2L
WOLFSSL_RENESAS_TLS
WOLFSSL_RENESAS_TSIP_IAREWRX
WOLFSSL_RSA_CHECK_D_ON_DECRYPT
WOLFSSL_RSA_DECRYPT_TO_0_LEN
WOLFSSL_RW_THREADED
WOLFSSL_SAKKE_SMALL
WOLFSSL_SAKKE_SMALL_MODEXP
WOLFSSL_SE050_AUTO_ERASE
WOLFSSL_SE050_CRYPT
WOLFSSL_SE050_HASH
WOLFSSL_SE050_INIT
WOLFSSL_SE050_NO_RSA
WOLFSSL_SE050_NO_TRNG
WOLFSSL_SECURE_RENEGOTIATION_ON_BY_DEFAULT
WOLFSSL_SETTINGS_FILE
WOLFSSL_SH224
WOLFSSL_SHA256_ALT_CH_MAJ
WOLFSSL_SHUTDOWNONCE
WOLFSSL_SILABS_TRNG
WOLFSSL_SM4_EBC
WOLFSSL_SNIFFER_NO_RECOVERY
WOLFSSL_SP_ARM32_UDIV
WOLFSSL_SP_DH
WOLFSSL_SP_FAST_NCT_EXPTMOD
WOLFSSL_SP_INT_SQR_VOLATILE
WOLFSSL_STACK_CHECK
WOLFSSL_STM32F427_RNG
WOLFSSL_STM32_RNG_NOLIB
WOLFSSL_STRONGEST_HASH_SIG
WOLFSSL_STSAFE_TAKES_SLOT
WOLFSSL_TELIT_M2MB
WOLFSSL_THREADED_CRYPT
WOLFSSL_TICKET_DECRYPT_NO_CREATE
WOLFSSL_TICKET_ENC_AES128_GCM
WOLFSSL_TICKET_ENC_AES256_CBC
WOLFSSL_TICKET_ENC_AES256_GCM
WOLFSSL_TICKET_ENC_CBC_HMAC
WOLFSSL_TICKET_ENC_CHACHA20_POLY1305
WOLFSSL_TICKET_ENC_HMAC_SHA384
WOLFSSL_TICKET_ENC_HMAC_SHA512
WOLFSSL_TI_CURRTIME
WOLFSSL_TLS13_DRAFT
WOLFSSL_TLS13_IGNORE_AEAD_LIMITS
WOLFSSL_TLS13_SHA512
WOLFSSL_TLS13_TICKET_BEFORE_FINISHED
WOLFSSL_TLSX_PQC_MLKEM_STORE_PRIV_KEY
WOLFSSL_TRACK_MEMORY_FULL
WOLFSSL_TRAP_MALLOC_SZ
WOLFSSL_UNALIGNED_64BIT_ACCESS
WOLFSSL_USER_FILESYSTEM
WOLFSSL_USER_LOG
WOLFSSL_USER_MUTEX
WOLFSSL_USER_THREADING
WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW
WOLFSSL_USE_FLASHMEM
WOLFSSL_USE_OPTIONS_H
WOLFSSL_USE_POPEN_HOST
WOLFSSL_VALIDATE_DH_KEYGEN
WOLFSSL_WC_XMSS_NO_SHA256
WOLFSSL_WC_XMSS_NO_SHAKE256
WOLFSSL_WICED_PSEUDO_UNIX_EPOCH_TIME
WOLFSSL_X509_STORE_CERTS
WOLFSSL_X509_TRUSTED_CERTIFICATE_CALLBACK
WOLFSSL_XFREE_NO_NULLNESS_CHECK
WOLFSSL_XILINX_CRYPTO_OLD
WOLFSSL_XILINX_PATCH
WOLFSSL_XIL_MSG_NO_SLEEP
WOLFSSL_XMSS_LARGE_SECRET_KEY
WOLFSSL_ZEPHYR
WOLF_ALLOW_BUILTIN
WOLF_CRYPTO_CB_CMD
WOLF_CRYPTO_CB_FIND
WOLF_CRYPTO_CB_ONLY_ECC
WOLF_CRYPTO_CB_ONLY_RSA
WOLF_CRYPTO_DEV
WOLF_NO_TRAILING_ENUM_COMMAS
XGETPASSWD
XMSS_CALL_PRF_KEYGEN
XPAR_VERSAL_CIPS_0_PSPMC_0_PSV_CORTEXA72_0_TIMESTAMP_CLK_FREQ
XSECURE_CACHE_DISABLE
_ABI64
_ABIO64
_ARCH_PPC64
_COMPILER_VERSION
_INTPTR_T_DECLARED
_LP64
_MSC_VER
_MSVC_LANG
_M_ARM64
_M_X64
_NETOS
_POSIX_C_SOURCE
_SDCC_VERSION_PATCHLEVEL
_SH3
_SILICON_LABS_SECURITY_FEATURE
_SOCKLEN_T
_SYS_DEVCON_LOCAL_H
_TIME_HELPER_H
_UINTPTR_T_DECLARED
_WIN32
_WIN32_WCE
_WIN64
_XOPEN_SOURCE_EXTENDED
__32MZ2048ECH144__
__32MZ2048ECM144__
__32MZ2048EFM144__
__ANDROID__
__APPLE__
__ARCH_STRCASECMP_NO_REDIRECT
__ARCH_STRCMP_NO_REDIRECT
__ARCH_STRNCASECMP_NO_REDIRECT
__ARCH_STRNCAT_NO_REDIRECT
__ARCH_STRNCMP_NO_REDIRECT
__ARCH_STRNCPY_NO_REDIRECT
__ARCH_STRSTR_NO_REDIRECT
__ARM_ARCH_7M__
__ARM_FEATURE_CRYPTO
__ASSEMBLER__
__ATOMIC_RELAXED
__AVR__
__BCPLUSPLUS__
__BIG_ENDIAN__
__BORLANDC__
__CCRX__
__COMPILER_VER__
__CYGWIN__
__DATE__
__DCACHE_PRESENT
__DCC__
__DECC_VER
__ELF__
__EMSCRIPTEN__
__FPU_PRESENT
__FreeBSD__
__GLIBC__
__GNUC_MINOR__
__GNUC__
__HP_cc
__IAR_SYSTEMS_ICC__
__ICCARM__
__ILP32__
__INCLUDE_NUTTX_CONFIG_H
__INTEGRITY
__INTEL_COMPILER
__KEIL__
__KEY_DATA_H__
__LINUX__
__LP64
__LP64__
__MACH__
__MICROBLAZE__
__MINGW32__
__MINGW64_VERSION_MAJOR
__MINGW64__
__MWERKS__
__NT__
__OS2__
__OpenBSD__
__PIE__
__POWERPC__
__PPC__
__PPU
__QNXNTO__
__QNX__
__ROPI__
__SAM3A4C__
__SAM3A8C__
__SAM3A8H__
__SAM3X4C__
__SAM3X4E__
__SAM3X8C__
__SAM3X8E__
__SANITIZE_ADDRESS__
__SDCC_VERSION_MAJOR
__SDCC_VERSION_MINOR
__SDCC_VERSION_PATCH
__SIZEOF_INT128__
__SIZEOF_LONG_LONG__
__STDC_VERSION__
__STDC__
__STM32__
__STRICT_ANSI__
__SUNPRO_C
__SUNPRO_CC
__SVR4
__TI_COMPILER_VERSION__
__TURBOC__
__UNIX__
__USE_GNU
__USE_MISC
__USE_XOPEN2K
__WATCOMC__
__WATCOM_INT64__
__XC32
__XTENSA__
__aarch64__
__alpha__
__arch64__
__arm__
__clang__
__clang_major__
__cplusplus
__ghc__
__ghs__
__hpux__
__i386
__i386__
__ia64__
__linux__
__llvm__
__mips
__mips64
__must_check
__ppc64__
__ppc__
__riscv
__riscv_xlen
__s390x__
__sparc
__sparc64__
__sun
__svr4__
__thumb__
__ti__
__x86_64__
byte
configTICK_RATE_HZ
fallthrough
noinline
ssize_t
sun
versal
wc_Tls13_HKDF_Expand_Label

View File

@@ -34,7 +34,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
You must delete them, or cmake will refuse to work.")
endif()
project(wolfssl VERSION 5.7.0 LANGUAGES C ASM)
project(wolfssl VERSION 5.7.6 LANGUAGES C ASM)
# Set WOLFSSL_ROOT if not already defined
if ("${WOLFSSL_ROOT}" STREQUAL "")
@@ -49,11 +49,11 @@ endif()
# shared library versioning
# increment if interfaces have been removed or changed
set(WOLFSSL_LIBRARY_VERSION_FIRST 42)
set(WOLFSSL_LIBRARY_VERSION_FIRST 43)
# increment if interfaces have been added
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
set(WOLFSSL_LIBRARY_VERSION_SECOND 1)
set(WOLFSSL_LIBRARY_VERSION_SECOND 0)
# increment if source code has changed
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
@@ -131,6 +131,7 @@ check_type_size("__uint128_t" __UINT128_T)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("long" SIZEOF_LONG)
check_type_size("time_t" SIZEOF_TIME_T)
check_type_size("uintptr_t" HAVE_UINTPTR_T)
# By default, HAVE___UINT128_T gets defined as TRUE,
# but we want it as 1.
@@ -152,9 +153,14 @@ endif()
# Thread local storage
include(CheckCSourceCompiles)
set(TLS_KEYWORDS "__thread" "__declspec(thread)")
foreach(TLS_KEYWORD IN LISTS TLS_KEYWORDS)
set(TLS_CODE "#include <stdlib.h>
if(CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_THREAD_LS")
endif()
else()
set(TLS_KEYWORDS "__thread" "__declspec(thread)")
foreach(TLS_KEYWORD IN LISTS TLS_KEYWORDS)
set(TLS_CODE "#include <stdlib.h>
static void foo(void) {
static ${TLS_KEYWORD} int bar\;
exit(1)\;
@@ -163,21 +169,22 @@ foreach(TLS_KEYWORD IN LISTS TLS_KEYWORDS)
int main() {
return 0\;
}"
)
check_c_source_compiles(${TLS_CODE} THREAD_LS_ON)
)
check_c_source_compiles(${TLS_CODE} THREAD_LS_ON)
if(THREAD_LS_ON)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_THREAD_LS")
break()
else()
# THREAD_LS_ON is cached after each call to
# check_c_source_compiles, and the function
# won't run subsequent times if the variable
# is in the cache. To make it run again, we
# need to remove the variable from the cache.
unset(THREAD_LS_ON CACHE)
endif()
endforeach()
if(THREAD_LS_ON)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_THREAD_LS")
break()
else()
# THREAD_LS_ON is cached after each call to
# check_c_source_compiles, and the function
# won't run subsequent times if the variable
# is in the cache. To make it run again, we
# need to remove the variable from the cache.
unset(THREAD_LS_ON CACHE)
endif()
endforeach()
endif()
# TODO: AX_PTHREAD does a lot. Need to implement the
# rest of its logic.
@@ -197,13 +204,20 @@ find_package(Threads)
# Example for map file and custom linker script
#set(CMAKE_EXE_LINKER_FLAGS " -Xlinker -Map=output.map -T\"${CMAKE_CURRENT_SOURCE_DIR}/linker.ld\"")
message(STATUS "C Compiler ID: ${CMAKE_C_COMPILER_ID}")
if(DEFINED WARNING_C_FLAGS)
set(CMAKE_C_FLAGS "${WARNING_C_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "${WARNING_C_FLAGS} ${CMAKE_C_FLAGS}")
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wx -wcd=202")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_HAVE_MIN -DWOLFSSL_HAVE_MAX -DNO_WRITEV")
elseif(WIN32)
# Windows cl.exe does not support the -Wextra, -Wno-unused and -Werror flags.
set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
# Windows cl.exe does not support the -Wextra, -Wno-unused and -Werror flags.
set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
else()
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Werror ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Werror ${CMAKE_C_FLAGS}")
endif()
####################################################
@@ -280,10 +294,10 @@ if(NOT WOLFSSL_SINGLE_THREADED)
if(CMAKE_USE_PTHREADS_INIT)
list(APPEND WOLFSSL_LINK_LIBS Threads::Threads)
set(HAVE_PTHREAD 1)
list(APPEND WOLFSSL_DEFINITIONS
"-DHAVE_PTHREAD"
"-D_POSIX_THREADS")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PTHREAD")
endif()
else()
list(APPEND WOLFSSL_DEFINITIONS "-DSINGLE_THREADED")
endif()
# DTLS-SRTP
@@ -417,16 +431,17 @@ if(WOLFSSL_CURL)
set(WOLFSSL_MD4 "yes")
set(WOLFSSL_DES3 "yes")
set(WOLFSSL_ALPN "yes")
set(WOLFSSL_WOLFSSH "yes")
set(WOLFSSL_OPENSSLEXTRA "yes")
set(WOLFSSL_CRL "yes")
set(WOLFSSL_OCSP "yes")
set(WOLFSSL_OCSPSTAPLING "yes")
set(WOLFSSL_OCSPSTAPLING_V2 "yes")
# Note: OCSP sets requisite HAVE_TLS_EXTENSIONS and HAVE_CERTIFICATE_STATUS_REQUEST(_V2)
set(WOLFSSL_SNI "yes")
set(WOLFSSL_ALT_CERT_CHAINS "yes")
set(WOLFSSL_IP_ALT_NAME "yes")
set(WOLFSSL_SESSION_TICKET "yes")
set(WOLFSSL_WOLFSSH "yes")
list(APPEND WOLFSSL_DEFINITIONS
"-DNO_SESSION_CACHE_REF" "-DWOLFSSL_DES_ECB")
endif()
@@ -437,7 +452,7 @@ add_option(WOLFSSL_ALPN
"no" "yes;no")
if(WOLFSSL_ALPN)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ALPN" "-DHAVE_TLS_EXTENSIONS")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ALPN" "-DHAVE_TLS_EXTENSIONS")
endif()
# altcertchains
@@ -536,6 +551,15 @@ if (WOLFSSL_OPENSSLALL)
"-DWOLFSSL_ERROR_CODE_OPENSSL" "-DWOLFSSL_CERT_NAME_ALL")
endif()
add_option(WOLFSSL_NO_STUB
"Removes OpenSSL compatibility stub functions (default: disabled)"
"no" "yes;no")
if (WOLFSSL_NO_STUB)
list(APPEND WOLFSSL_DEFINITIONS
"-DNO_WOLFSSL_STUB")
endif()
# TODO: - IPv6 test apps
set(WOLFSSL_SLOW_MATH "yes")
@@ -631,6 +655,16 @@ else()
endif()
endif()
# LMS
add_option(WOLFSSL_LMS
"Enable the wolfSSL LMS implementation (default: disabled)"
"no" "yes;no")
# XMSS
add_option(WOLFSSL_XMSS
"Enable the wolfSSL XMSS implementation (default: disabled)"
"no" "yes;no")
# TODO: - Lean PSK
# - Lean TLS
# - Low resource
@@ -644,8 +678,6 @@ endif()
# - Atomic user record layer
# - Public key callbacks
# - Microchip/Atmel CryptoAuthLib
# - XMSS
# - LMS
# - dual-certs
# AES-CBC
@@ -934,13 +966,29 @@ if(WOLFSSL_ECC)
endif()
endif()
# TODO: - ECC custom curves
# - Compressed key
# TODO: - Compressed key
# - FP ECC, fixed point cache ECC
# - ECC encrypt
# - PSK
# - Single PSK identity
# ECC custom curves
add_option("WOLFSSL_ECCCUSTCURVES"
"Enable ECC Custom Curves (default: disabled)"
"no" "yes;no;all")
if(WOLFSSL_ECCCUSTCURVES)
if("${WOLFSSL_ECCCUSTCURVES}" STREQUAL "all")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR2")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR3")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_BRAINPOOL")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_KOBLITZ")
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_CDH")
endif()
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_CUSTOM_CURVES")
endif()
# CURVE25519
set(WOLFSSL_CURVE25519_SMALL "no")
add_option("WOLFSSL_CURVE25519"
@@ -1101,8 +1149,7 @@ if(NOT WOLFSSL_MEMORY)
else()
# turn off memory cb if leanpsk or leantls on
if(WOLFSSL_LEAN_PSK OR WOLFSSL_LEAN_TLS)
# but don't turn on NO_WOLFSSL_MEMORY because using own
override_cache(WOLFSSL_MEMORY "no")
list(APPEND WOLFSSL_DEFINITIONS "-DNO_WOLFSSL_MEMORY")
endif()
endif()
@@ -1306,8 +1353,8 @@ if(NOT WOLFSSL_DES3_TLS_SUITES)
list(APPEND WOLFSSL_DEFINITIONS "-DNO_DES3_TLS_SUITES")
endif()
# ARC4
set(WOLFSSL_ARC4_HELP_STRING "Enable ARC4 (default: disabled)")
# RC4 API (ARC4 implementation removed)
set(WOLFSSL_ARC4_HELP_STRING "Enable RC4 API (default: disabled, ARC4 implementation removed)")
add_option("WOLFSSL_ARC4" ${WOLFSSL_ARC4_HELP_STRING} "no" "yes;no")
if(WOLFSSL_OPENSSH OR WOLFSSL_WPAS)
@@ -1533,6 +1580,15 @@ add_option(WOLFSSL_SNI ${WOLFSSL_SNI_HELP_STRING} ${SNI_DEFAULT} "yes;no")
set(WOLFSSL_TLSX_HELP_STRING "Enable all TLS Extensions (default: disabled)")
add_option(WOLFSSL_TLSX ${WOLFSSL_TLSX_HELP_STRING} "no" "yes;no")
add_option(WOLFSSL_EX_DATA
"Enable app data (default: disabled)"
"no" "yes;no")
if (WOLFSSL_EX_DATA)
list(APPEND WOLFSSL_DEFINITIONS
"-DHAVE_EX_DATA")
endif()
# Supported elliptic curves extensions
add_option("WOLFSSL_SUPPORTED_CURVES"
"Enable Supported Elliptic Curves (default: enabled)"
@@ -1857,6 +1913,10 @@ add_option("WOLFSSL_CRYPTOCB"
"Enable crypto callbacks (default: disabled)"
"no" "yes;no")
add_option("WOLFSSL_CRYPTOCB_NO_SW_TEST"
"Disable crypto callback SW testing (default: disabled)"
"no" "yes;no")
add_option("WOLFSSL_PKCALLBACKS"
"Enable public key callbacks (default: disabled)"
"no" "yes;no")
@@ -2060,6 +2120,10 @@ if(WOLFSSL_CRYPTOCB)
list(APPEND WOLFSSL_DEFINITIONS "-DWOLF_CRYPTO_CB")
endif()
if(WOLFSSL_CRYPTOCB_NO_SW_TEST)
list(APPEND WOLFSSL_DEFINITIONS "-DWC_TEST_NO_CRYPTOCB_SW_TEST")
endif()
# Public Key Callbacks
if(WOLFSSL_PKCALLBACKS)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PK_CALLBACKS")
@@ -2236,32 +2300,6 @@ endif()
file(REMOVE ${OPTION_FILE})
file(APPEND ${OPTION_FILE} "/* wolfssl options.h\n")
file(APPEND ${OPTION_FILE} " * generated from configure options\n")
file(APPEND ${OPTION_FILE} " *\n")
file(APPEND ${OPTION_FILE} " * Copyright (C) 2006-2023 wolfSSL Inc.\n")
file(APPEND ${OPTION_FILE} " *\n")
file(APPEND ${OPTION_FILE} " * This file is part of wolfSSL. (formerly known as CyaSSL)\n")
file(APPEND ${OPTION_FILE} " *\n")
file(APPEND ${OPTION_FILE} " */\n\n")
file(APPEND ${OPTION_FILE} "#ifndef WOLFSSL_OPTIONS_H\n")
file(APPEND ${OPTION_FILE} "#define WOLFSSL_OPTIONS_H\n\n\n")
file(APPEND ${OPTION_FILE} "#ifdef __cplusplus\n")
file(APPEND ${OPTION_FILE} "extern \"C\" {\n")
file(APPEND ${OPTION_FILE} "#endif\n\n")
add_to_options_file("${WOLFSSL_DEFINITIONS}" "${OPTION_FILE}")
# CMAKE_C_FLAGS is just a string of space-separated flags to pass to the C
# compiler. We need to replace those spaces with semicolons in order to treat it
# as a CMake list.
string(REPLACE " " ";" CMAKE_C_FLAGS_LIST "${CMAKE_C_FLAGS}")
add_to_options_file("${CMAKE_C_FLAGS_LIST}" "${OPTION_FILE}")
file(APPEND ${OPTION_FILE} "\n#ifdef __cplusplus\n")
file(APPEND ${OPTION_FILE} "}\n")
file(APPEND ${OPTION_FILE} "#endif\n\n\n")
file(APPEND ${OPTION_FILE} "#endif /* WOLFSSL_OPTIONS_H */\n\n")
####################################################
# Library Target
####################################################
@@ -2339,6 +2377,20 @@ if(WOLFSSL_ARIA)
message(STATUS "ARIA Check: WOLFSSL_LINK_LIBS = ${WOLFSSL_LINK_LIBS}")
endif()
foreach(DEF IN LISTS WOLFSSL_DEFINITIONS)
string(REGEX MATCH "^(-D)?([^=]+)(=(.*))?$" DEF_MATCH ${DEF})
if (NOT "${CMAKE_MATCH_4}" STREQUAL "")
set(${CMAKE_MATCH_2} ${CMAKE_MATCH_4})
# message("set(${CMAKE_MATCH_2} ${CMAKE_MATCH_4})")
else()
set(${CMAKE_MATCH_2} 1)
# message("set(${CMAKE_MATCH_2} 1)")
endif()
endforeach()
# If new build options are added please update the cmake/options.h.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/options.h.in ${OPTION_FILE})
set_target_properties(wolfssl
PROPERTIES
SOVERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}
@@ -2375,17 +2427,24 @@ target_include_directories(wolfssl
target_link_libraries(wolfssl PUBLIC ${WOLFSSL_LINK_LIBS})
if(WIN32)
# For Windows link ws2_32
if(CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(wolfssl PUBLIC ws2_32 crypt32)
endif()
elseif (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "^MSYS" OR ${CMAKE_SYSTEM_NAME} MATCHES "^MINGW")
# For Windows link required libraries
message("Building on Windows/MSYS/MINGW")
target_link_libraries(wolfssl PUBLIC
$<$<PLATFORM_ID:Windows>:ws2_32 crypt32>)
ws2_32 crypt32 advapi32)
elseif(APPLE)
message("Building on Apple")
if(WOLFSSL_SYS_CA_CERTS)
target_link_libraries(wolfssl PUBLIC
${CORE_FOUNDATION_FRAMEWORK}
${SECURITY_FRAMEWORK})
endif()
else()
message("Building on Linux (or other)")
if(WOLFSSL_DH AND NOT WOLFSSL_DH_CONST)
# DH requires math (m) library
target_link_libraries(wolfssl
@@ -2437,12 +2496,14 @@ if(WOLFSSL_EXAMPLES)
PROPERTY RUNTIME_OUTPUT_DIRECTORY
${WOLFSSL_OUTPUT_BASE}/examples/echoserver)
if(NOT WIN32)
if(NOT WIN32 AND NOT WOLFSSL_SINGLE_THREADED)
# Build TLS benchmark example
add_executable(tls_bench
${CMAKE_CURRENT_SOURCE_DIR}/examples/benchmark/tls_bench.c)
target_link_libraries(tls_bench wolfssl)
target_link_libraries(tls_bench Threads::Threads)
if(CMAKE_USE_PTHREADS_INIT)
target_link_libraries(tls_bench Threads::Threads)
endif()
set_property(TARGET tls_bench
PROPERTY RUNTIME_OUTPUT_DIRECTORY
${WOLFSSL_OUTPUT_BASE}/examples/benchmark)
@@ -2451,19 +2512,51 @@ if(WOLFSSL_EXAMPLES)
# Build unit tests
add_executable(unit_test
tests/api.c
tests/hash.c
tests/api/test_md2.c
tests/api/test_md4.c
tests/api/test_md5.c
tests/api/test_sha.c
tests/api/test_sha256.c
tests/api/test_sha512.c
tests/api/test_sha3.c
tests/api/test_blake2.c
tests/api/test_sm3.c
tests/api/test_ripemd.c
tests/api/test_hash.c
tests/api/test_hmac.c
tests/api/test_cmac.c
tests/api/test_des3.c
tests/api/test_chacha.c
tests/api/test_poly1305.c
tests/api/test_chacha20_poly1305.c
tests/api/test_camellia.c
# ARC4 implementation has been removed
tests/api/test_rc2.c
tests/api/test_aes.c
tests/api/test_ascon.c
tests/api/test_sm4.c
tests/api/test_wc_encrypt.c
tests/api/test_mlkem.c
tests/api/test_dtls.c
tests/api/test_ocsp.c
tests/api/test_evp.c
tests/srp.c
tests/suites.c
tests/w64wrapper.c
tests/unit.c
tests/quic.c
tests/utils.c
testsuite/utils.c
examples/server/server.c
examples/client/client.c)
examples/client/client.c
wolfcrypt/test/test.c)
target_include_directories(unit_test PRIVATE
${CMAKE_CURRENT_BINARY_DIR})
target_compile_options(unit_test PUBLIC "-DNO_MAIN_DRIVER")
target_link_libraries(unit_test wolfssl)
target_link_libraries(unit_test Threads::Threads)
if(CMAKE_USE_PTHREADS_INIT)
target_link_libraries(unit_test Threads::Threads)
endif()
set_property(TARGET unit_test
PROPERTY RUNTIME_OUTPUT_DIRECTORY
${WOLFSSL_OUTPUT_BASE}/tests/)
@@ -2713,14 +2806,17 @@ if(WOLFSSL_INSTALL)
set(includedir "\${prefix}/include")
set(VERSION ${PROJECT_VERSION})
# Setting libm in Libs.private of wolfssl.pc.
# See "Link Libraries" in above about `m` insertion to LINK_LIBRARIES
get_target_property(_wolfssl_dep_libs wolfssl LINK_LIBRARIES)
list(FIND _wolfssl_dep_libs m _dep_libm)
if ("${_dep_libm}" GREATER -1)
set(LIBM -lm)
if(CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom")
else()
set(LIBM)
# Setting libm in Libs.private of wolfssl.pc.
# See "Link Libraries" in above about `m` insertion to LINK_LIBRARIES
get_target_property(_wolfssl_dep_libs wolfssl LINK_LIBRARIES)
list(FIND _wolfssl_dep_libs m _dep_libm)
if ("${_dep_libm}" GREATER -1)
set(LIBM -lm)
else()
set(LIBM)
endif()
endif()
configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)

View File

@@ -1,3 +1,430 @@
# wolfSSL Release 5.7.6 (Dec 31, 2024)
Release 5.7.6 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
NOTE:
* --enable-heapmath is deprecated.
* In this release, the default cipher suite preference is updated to prioritize
TLS_AES_256_GCM_SHA384 over TLS_AES_128_GCM_SHA256 when enabled.
* This release adds a sanity check for including wolfssl/options.h or
user_settings.h.
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
number where the code change was added.
## Vulnerabilities
* [Med] An OCSP (non stapling) issue was introduced in wolfSSL version 5.7.4
when performing OCSP requests for intermediate certificates in a certificate
chain. This affects only TLS 1.3 connections on the server side. It would not
impact other TLS protocol versions or connections that are not using the
traditional OCSP implementation. (Fix in pull request 8115)
## New Feature Additions
* Add support for RP2350 and improve RP2040 support, both with RNG optimizations
(PR 8153)
* Add support for STM32MP135F, including STM32CubeIDE support and HAL support
for SHA2/SHA3/AES/RNG/ECC optimizations. (PR 8223, 8231, 8241)
* Implement Renesas TSIP RSA Public Enc/Private support (PR 8122)
* Add support for Fedora/RedHat system-wide crypto-policies (PR 8205)
* Curve25519 generic keyparsing API added with wc_Curve25519KeyToDer and
wc_Curve25519KeyDecode (PR 8129)
* CRL improvements and update callback, added the functions
wolfSSL_CertManagerGetCRLInfo and wolfSSL_CertManagerSetCRLUpdate_Cb (PR 8006)
* For DTLS, add server-side stateless and CID quality-of-life API. (PR 8224)
## Enhancements and Optimizations
* Add a CMake dependency check for pthreads when required. (PR 8162)
* Update OS_Seed declarations for legacy compilers and FIPS modules (boundary
not affected). (PR 8170)
* Enable WOLFSSL_ALWAYS_KEEP_SNI by default when using --enable-jni. (PR 8283)
* Change the default cipher suite preference, prioritizing
TLS_AES_256_GCM_SHA384 over TLS_AES_128_GCM_SHA256. (PR 7771)
* Add SRTP-KDF (FIPS module v6.0.0) to checkout script for release bundling
(PR 8215)
* Make library build when no hardware crypto available for Aarch64 (PR 8293)
* Update assembly code to avoid `uint*_t` types for better compatibility with
older C standards. (PR 8133)
* Add initial documentation for writing ASN template code to decode BER/DER.
(PR 8120)
* Perform full reduction in sc_muladd for EdDSA with Curve448 (PR 8276)
* Allow SHA-3 hardware cryptography instructions to be explicitly not used in
MacOS builds (PR 8282)
* Make Kyber and ML-KEM available individually and together. (PR 8143)
* Update configuration options to include Kyber/ML-KEM and fix defines used in
wolfSSL_get_curve_name. (PR 8183)
* Make GetShortInt available with WOLFSSL_ASN_EXTRA (PR 8149)
* Improved test coverage and minor improvements of X509 (PR 8176)
* Add sanity checks for configuration methods, ensuring the inclusion of
wolfssl/options.h or user_settings.h. (PR 8262)
* Enable support for building without TLS (NO_TLS). Provides reduced code size
option for non-TLS users who want features like the certificate manager or
compatibility layer. (PR 8273)
* Exposed get_verify functions with OPENSSL_EXTRA. (PR 8258)
* ML-DSA/Dilithium: obtain security level from DER when decoding (PR 8177)
* Implementation for using PKCS11 to retrieve certificate for SSL CTX (PR 8267)
* Add support for the RFC822 Mailbox attribute (PR 8280)
* Initialize variables and adjust types resolve warnings with Visual Studio in
Windows builds. (PR 8181)
* Refactors and expansion of opensslcoexist build (PR 8132, 8216, 8230)
* Add DTLS 1.3 interoperability, libspdm and DTLS CID interoperability tests
(PR 8261, 8255, 8245)
* Remove trailing error exit code in wolfSSL install setup script (PR 8189)
* Update Arduino files for wolfssl 5.7.4 (PR 8219)
* Improve Espressif SHA HW/SW mutex messages (PR 8225)
* Apply post-5.7.4 release updates for Espressif Managed Component examples
(PR 8251)
* Expansion of c89 conformance (PR 8164)
* Added configure option for additional sanity checks with --enable-faultharden
(PR 8289)
* Aarch64 ASM additions to check CPU features before hardware crypto instruction
use (PR 8314)
## Fixes
* Fix a memory issue when using the compatibility layer with
WOLFSSL_GENERAL_NAME and handling registered ID types. (PR 8155)
* Fix a build issue with signature fault hardening when using public key
callbacks (HAVE_PK_CALLBACKS). (PR 8287)
* Fix for handling heap hint pointer properly when managing multiple WOLFSSL_CTX
objects and freeing one of them (PR 8180)
* Fix potential memory leak in error case with Aria. (PR 8268)
* Fix Set_Verify flag behaviour on Ada wrapper. (PR 8256)
* Fix a compilation error with the NO_WOLFSSL_DIR flag. (PR 8294)
* Resolve a corner case for Poly1305 assembly code on Aarch64. (PR 8275)
* Fix incorrect version setting in CSRs. (PR 8136)
* Correct debugging output for cryptodev. (PR 8202)
* Fix for benchmark application use with /dev/crypto GMAC auth error due to size
of AAD (PR 8210)
* Add missing checks for the initialization of sp_int/mp_int with DSA to free
memory properly in error cases. (PR 8209)
* Fix return value of wolfSSL_CTX_set_tlsext_use_srtp (8252)
* Check Root CA by Renesas TSIP before adding it to ca-table (PR 8101)
* Prevent adding a certificate to the CA cache for Renesas builds if it does not
set CA:TRUE in basic constraints. (PR 8060)
* Fix attribute certificate holder entityName parsing. (PR 8166)
* Resolve build issues for configurations without any wolfSSL/openssl
compatibility layer headers. (PR 8182)
* Fix for building SP RSA small and RSA public only (PR 8235)
* Fix for Renesas RX TSIP RSA Sign/Verify with wolfCrypt only (PR 8206)
* Fix to ensure all files have settings.h included (like wc_lms.c) and guards
for building all `*.c` files (PR 8257 and PR 8140)
* Fix x86 target build issues in Visual Studio for non-Windows operating
systems. (PR 8098)
* Fix wolfSSL_X509_STORE_get0_objects to handle no CA (PR 8226)
* Properly handle reference counting when adding to the X509 store. (PR 8233)
* Fix for various typos and improper size used with FreeRTOS_bind in the Renesas
example. Thanks to Hongbo for the report on example issues. (PR 7537)
* Fix for potential heap use after free with wolfSSL_PEM_read_bio_PrivateKey.
Thanks to Peter for the issue reported. (PR 8139)
# wolfSSL Release 5.7.4 (Oct 24, 2024)
Release 5.7.4 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
number where the code change was added.
## Vulnerabilities
* [Low] When the OpenSSL compatibility layer is enabled, certificate
verification behaved differently in wolfSSL than OpenSSL, in the
X509_STORE_add_cert() and X509_STORE_load_locations() implementations.
Previously, in cases where an application explicitly loaded an intermediate
certificate, wolfSSL was verifying only up to that intermediate certificate,
rather than verifying up to the root CA. This only affects use cases where the
API is called directly, and does not affect TLS connections. Users that call
the API X509_STORE_add_cert() or X509_STORE_load_locations() directly in their
applications are recommended to update the version of wolfSSL used or to have
additional sanity checks on certificates loaded into the X509_STORE when
verifying a certificate. (https://github.com/wolfSSL/wolfssl/pull/8087)
## PQC TLS Experimental Build Fix
* When using TLS with post quantum algorithms enabled, the connection uses a
smaller EC curve than agreed on. Users building with --enable-experimental and
enabling PQC cipher suites with TLS connections are recommended to update the
version of wolfSSL used. Thanks to Daniel Correa for the report.
(https://github.com/wolfSSL/wolfssl/pull/8084)
## New Feature Additions
* RISC-V 64 new assembly optimizations added for SHA-256, SHA-512, ChaCha20,
Poly1305, and SHA-3 (PR 7758,7833,7818,7873,7916)
* Implement support for Connection ID (CID) with DTLS 1.2 (PR 7995)
* Add support for (DevkitPro)libnds (PR 7990)
* Add port for Mosquitto OSP (Open Source Project) (PR 6460)
* Add port for init sssd (PR 7781)
* Add port for eXosip2 (PR 7648)
* Add support for STM32G4 (PR 7997)
* Add support for MAX32665 and MAX32666 TPU HW and ARM ASM Crypto Callback
Support (PR 7777)
* Add support for building wolfSSL to be used in libspdm (PR 7869)
* Add port for use with Nucleus Plus 2.3 (PR 7732)
* Initial support for RFC5755 x509 attribute certificates (acerts). Enabled with
--enable-acert (PR 7926)
* PKCS#11 RSA Padding offload allows tokens to perform CKM_RSA_PKCS
(sign/encrypt), CKM_RSA_PKCS_PSS (sign), and CKM_RSA_PKCS_OAEP (encrypt).
(PR 7750)
* Added “new” and “delete” style functions for heap/pool allocation and freeing
of low level crypto structures (PR 3166 and 8089)
## Enhancements and Optimizations
* Increase default max alt. names from 128 to 1024 (PR 7762)
* Added new constant time DH agree function wc_DhAgree_ct (PR 7802)
* Expanded compatibility layer with the API EVP_PKEY_is_a (PR 7804)
* Add option to disable cryptocb test software test using
--disable-cryptocb-sw-test (PR 7862)
* Add a call to certificate verify callback before checking certificate dates
(PR 7895)
* Expanded algorithms supported with the wolfCrypt CSharp wrapper. Adding
support for RNG, ECC(ECIES and ECDHE), RSA, ED25519/Curve25519, AES-GCM, and
Hashing (PR 3166)
* Expand MMCAU support for use with DES ECB (PR 7960)
* Update AES SIV to handle multiple associated data inputs (PR 7911)
* Remove HAVE_NULL_CIPHER from --enable-openssh (PR 7811)
* Removed duplicate if(NULL) checks when calling XFREE (macro does) (PR 7839)
* Set RSA_MIN_SIZE default to 2048 bits (PR 7923)
* Added support for wolfSSL to be used as the default TLS in the zephyr kernel
(PR 7731)
* Add enable provider build using --enable-wolfprovider with autotools (PR 7550)
* Renesas RX TSIP ECDSA support (PR 7685)
* Support DTLS1.3 downgrade when the server supports CID (PR 7841)
* Server-side checks OCSP even if it uses v2 multi (PR 7828)
* Add handling of absent hash params in PKCS7 bundle parsing and creation
(PR 7845)
* Add the use of w64wrapper for Poly1305, enabling Poly1305 to be used in
environments that do not have a word64 type (PR 7759)
* Update to the maxq10xx support (PR 7824)
* Add support for parsing over optional PKCS8 attributes (PR 7944)
* Add support for either side method with DTLS 1.3 (PR 8012)
* Added PKCS7 PEM support for parsing PEM data with BEGIN/END PKCS7 (PR 7704)
* Add CMake support for WOLFSSL_CUSTOM_CURVES (PR 7962)
* Add left-most wildcard matching support to X509_check_host() (PR 7966)
* Add option to set custom SKID with PKCS7 bundle creation (PR 7954)
* Building wolfSSL as a library with Ada and corrections to Alire manifest
(PR 7303,7940)
* Renesas RX72N support updated (PR 7849)
* New option WOLFSSL_COPY_KEY added to always copy the key to the SSL object
(PR 8005)
* Add the new option WOLFSSL_COPY_CERT to always copy the cert buffer for each
SSL object (PR 7867)
* Add an option to use AES-CBC with HMAC for default session ticket enc/dec.
Defaults to AES-128-CBC with HMAC-SHA256 (PR 7703)
* Memory usage improvements in wc_PRF, sha256 (for small code when many
registers are available) and sp_int objects (PR 7901)
* Change in the configure script to work around ">>" with no command. In older
/bin/sh it can be ambiguous, as used in OSs such as FreeBSD 9.2 (PR 7876)
* Don't attempt to include system headers when not required (PR 7813)
* Certificates: DER encoding of ECC signature algorithm parameter is now
allowed to be NULL with a define (PR 7903)
* SP x86_64 asm: check for AVX2 support for VMs (PR 7979)
* Update rx64n support on gr-rose (PR 7889)
* Update FSP version to v5.4.0 for RA6M4 (PR 7994)
* Update TSIP driver version to v1.21 for RX65N RSK (PR 7993)
* Add a new crypto callback for RSA with padding (PR 7907)
* Replaced the use of pqm4 with wolfSSL implementations of Kyber/MLDSA
(PR 7924)
* Modernized memory fence support for C11 and clang (PR 7938)
* Add a CRL error override callback (PR 7986)
* Extend the X509 unknown extension callback for use with a user context
(PR 7730)
* Additional debug error tracing added with TLS (PR 7917)
* Added runtime support for library call stack traces with
enable-debug-trace-errcodes=backtrace, using libbacktrace (PR 7846)
* Expanded C89 conformance (PR 8077)
* Expanded support for WOLFSSL_NO_MALLOC (PR 8065)
* Added support for cross-compilation of Linux kernel module (PR 7746)
* Updated Linux kernel module with support for kernel 6.11 and 6.12 (PR 7826)
* Introduce WOLFSSL_ASN_ALLOW_0_SERIAL to allow parsing of certificates with a
serial number of 0 (PR 7893)
* Add conditional repository_owner to all wolfSSL GitHub workflows (PR 7871)
### Espressif / Arduino Updates
* Update wolfcrypt settings.h for Espressif ESP-IDF, template update (PR 7953)
* Update Espressif sha, util, mem, time helpers (PR 7955)
* Espressif _thread_local_start and _thread_local_end fix (PR 8030)
* Improve benchmark for Espressif devices (PR 8037)
* Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig (PR 7866)
* Add wolfSSL esp-tls and Certificate Bundle Support for Espressif ESP-IDF
(PR 7936)
* Update wolfssl Release for Arduino (PR 7775)
### Post Quantum Crypto Updates
* Dilithium: support fixed size arrays in dilithium_key (PR 7727)
* Dilithium: add option to use precalc with small sign (PR 7744)
* Allow Kyber to be built with FIPS (PR 7788)
* Allow Kyber asm to be used in the Linux kernel module (PR 7872)
* Dilithium, Kyber: Update to final specification (PR 7877)
* Dilithium: Support FIPS 204 Draft and Final Draft (PR 7909,8016)
### ARM Assembly Optimizations
* ARM32 assembly optimizations added for ChaCha20 and Poly1305 (PR 8020)
* Poly1305 assembly optimizations improvements for Aarch64 (PR 7859)
* Poly1305 assembly optimizations added for Thumb-2 (PR 7939)
* Adding ARM ASM build option to STM32CubePack (PR 7747)
* Add ARM64 to Visual Studio Project (PR 8010)
* Kyber assembly optimizations for ARM32 and Aarch64 (PR 8040,7998)
* Kyber assembly optimizations for ARMv7E-M/ARMv7-M (PR 7706)
## Fixes
* ECC key load: fixes for certificates with parameters that are not default for
size (PR 7751)
* Fixes for building x86 in Visual Studio for non-windows OS (PR 7884)
* Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret
(PR 7812)
* Fixes for PowerPC assembly use with Darwin and SP math all (PR 7931)
* Fix for detecting older versions of Mac OS when trying to link with
libdispatch (PR 7932)
* Fix for DTLS1.3 downgrade to DTLS1.2 when the server sends multiple handshake
packets combined into a single transmission. (PR 7840)
* Fix for OCSP to save the request if it was stored in ssl->ctx->certOcspRequest
(PR 7779)
* Fix to OCSP for searching for CA by key hash instead of ext. key id (PR 7934)
* Fix for staticmemory and singlethreaded build (PR 7737)
* Fix to not allow Shake128/256 with Xilinx AFALG (PR 7708)
* Fix to support PKCS11 without RSA key generation (PR 7738)
* Fix not calling the signing callback when using PK callbacks + TLS 1.3
(PR 7761)
* Cortex-M/Thumb2 ASM fix label for IAR compiler (PR 7753)
* Fix with PKCS11 to iterate correctly over slotId (PR 7736)
* Stop stripping out the sequence header on the AltSigAlg extension (PR 7710)
* Fix ParseCRL_AuthKeyIdExt with ASN template to set extAuthKeyIdSet value
(PR 7742)
* Use max key length for PSK encrypt buffer size (PR 7707)
* DTLS 1.3 fix for size check to include headers and CID fixes (PR 7912,7951)
* Fix STM32 Hash FIFO and add support for STM32U5A9xx (PR 7787)
* Fix CMake build error for curl builds (PR 8021)
* SP Maths: PowerPC ASM fix to use XOR instead of LI (PR 8038)
* SSL loading of keys/certs: testing and fixes (PR 7789)
* Misc. fixes for Dilithium and Kyber (PR 7721,7765,7803,8027,7904)
* Fixes for building wolfBoot sources for PQ LMS/XMSS (PR 7868)
* Fixes for building with Kyber enabled using CMake and zephyr port (PR 7773)
* Fix for edge cases with session resumption with TLS 1.2 (PR 8097)
* Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member
(PR 8099)
# wolfSSL Release 5.7.2 (July 08, 2024)
Release 5.7.2 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
## Vulnerabilities
* [Medium] CVE-2024-1544
Potential ECDSA nonce side channel attack in versions of wolfSSL before 5.6.6 with wc_ecc_sign_hash calls. Generating the ECDSA nonce k samples a random number r and then truncates this randomness with a modular reduction mod n where n is the order of the elliptic curve. Analyzing the division through a control-flow revealing side-channel reveals a bias in the most significant bits of k. Depending on the curve this is either a negligible bias or a significant bias large enough to reconstruct k with lattice reduction methods. Thanks to Luca Wilke, Florian Sieck and Thomas Eisenbarth (University of Lübeck) for reporting the vulnerability. Details will appear in the proceedings of CCS 24.
Fixed https://github.com/wolfSSL/wolfssl/pull/7020
* [Medium] CVE-2024-5288
A private key blinding operation, enabled by defining the macro WOLFSSL_BLIND_PRIVATE_KEY, was added to mitigate a potential row hammer attack on ECC operations. If performing ECC private key operations in an environment where a malicious user could gain fine control over the device and perform row hammer style attacks it is recommended to update the version of wolfSSL used and to build with WOLFSSL_BLIND_PRIVATE_KEY defined. Thanks to Kemal Derya, M. Caner Tol, Berk Sunar for the report (Vernam Applied Cryptography and Cybersecurity Lab at Worcester Polytechnic Institute)
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7416
* [Low] When parsing a provided maliciously crafted certificate directly using wolfSSL API, outside of a TLS connection, a certificate with an excessively large number of extensions could lead to a potential DoS. There are existing sanity checks during a TLS handshake with wolfSSL which mitigate this issue. Thanks to Bing Shi for the report.
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7597
* [Low] CVE-2024-5991
In the function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. Specifically, the Openssl compatibility function X509_check_host() takes in a pointer and length to check against, with no requirements that it be NULL terminated. While calling without a NULL terminated string is very uncommon, it is still technically allowed. If a caller was attempting to do a name check on a non*NULL terminated buffer, the code would read beyond the bounds of the input array until it found a NULL terminator.
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7604
* [Medium] CVE-2024-5814
A malicious TLS1.2 server can force a TLS1.3 client with downgrade capability to use a ciphersuite that it did not agree to and achieve a successful connection. This is because, aside from the extensions, the client was skipping fully parsing the server hello when downgrading from TLS 1.3.
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7619
* [Medium] OCSP stapling version 2 response verification bypass issue when a crafted response of length 0 is received. Found with internal testing.
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7702
* [Medium] OCSP stapling version 2 revocation bypass with a retry of a TLS connection attempt. A revoked CA certificate could incorrectly be loaded into the trusted signers list and used in a repeat connection attempt. Found with internal testing.
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7702
## New Feature Additions
* Added Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87 (PR 7622)
* AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM (PR 7569)
* Added CUDA support for AES encryption (PR 7436)
* Added support for gRPC (PR 7445)
* Added function wc_RsaPrivateKeyDecodeRaw to import raw RSA private keys (PR 7608)
* Added crypto callback for SHA-3 (PR 7670)
* Support for Infineon Modus Toolbox with wolfSSL (PR 7369)
* Allow user to send a user_canceled alert by calling wolfSSL_SendUserCanceled (PR 7590)
* C# wrapper SNI support added (PR 7610)
* Quantum-safe algorithm support added to the Linux kernel module (PR 7574)
* Support for NIST 800-56C Option 1 KDF, using the macro WC_KDF_NIST_SP_800_56C added (PR 7589)
* AES-XTS streaming mode added, along with hardware acceleration and kernel module use (PR 7522, 7560, 7424)
* PlatformIO FreeRTOS with ESP build and addition of benchmark and test example applications (PR 7528, 7413, 7559, 7542)
## Enhancements and Optimizations
* Expanded STM32 AES hardware acceleration support for use with STM32H5 (PR 7578)
* Adjusted wc_xmss and wc_lms settings to support use with wolfBoot (PR 7393)
* Added the --enable-rpk option to autotools build for using raw public key support (PR 7379)
* SHA-3 Thumb2, ARM32 assembly implementation added (PR 7667)
* Improvements to RSA padding to expose Pad/Unpad APIs (PR 7612)
* Updates and API additions for supporting socat version 1.8.0.0 (PR 7594)
* cmake build improvements, expanding build options with SINGLE_THREADED and post-quantum algorithms, adjusting the generation of options.h file and using “yes;no” boolean instead of strings (PR 7611, 7546, 7479, 7480, 7380)
* Improvements for Renesas RZ support (PR 7474)
* Improvements to dual algorithm certificates for post-quantum keys (PR 7286)
* Added wolfSSL_SessionIsSetup so the user can check if a session ticket has been sent by the server (PR 7430)
* hostap updates: Implement PACs for EAP-FAST and filter cipher list on TLS version change (PR 7446)
* Changed subject name comparison to match different upper and lower cases (PR 7420)
* Support for DTLS 1.3 downgrade when using PSK (PR 7367)
* Update to static memory build for more generic memory pools used (PR 7418)
* Improved performance of Kyber C implementation (PR 7654)
* Support for ECC_CACHE_CURVE with no malloc (PR 7490)
* Added the configure option --enable-debug-trace-errcodes (macro WOLFSSL_DEBUG_TRACE_ERROR_CODES) which enables more debug tracking of error code values (PR 7634)
* Enhanced wc_MakeRsaKey and wc_RsaKeyToDer to work with WOLFSSL_NO_MALLOC (PR 7362)
* Improvements to assembly implementations of ChaCha20 and Poly1305 ASM for use with MSVC (PR 7319)
* Cortex-M inline assembly labels with unique number appended (PR 7649)
* Added secret logging callback to TLS <= 1.2, enabled with the macro HAVE_SECRET_CALLBACK (PR 7372)
* Made wc_RNG_DRBG_Reseed() a public wolfCrypt API (PR 7386)
* Enabled DES3 support without the DES3 ciphers. To re-enable DES3 cipher suites, use the configure flag --enable-des3-tls-suites (PR 7315)
* Added stubs required for latest nginx (1.25.5) (PR 7449)
* Added option for using a custom salt with the function wc_ecc_ctx_set_own_salt (PR 7552)
* Added PQ files for Windows (PR 7419)
* Enhancements to static memory feature, adding the option for a global heap hint (PR 7478) and build options for a lean or debug setting, enabled with --enable-staticmemory=small or --enable-staticmemory=debug (PR 7597)
* Updated --enable-jni to define SESSION_CERTS for wolfJSSE (PR 7557)
* Exposed DTLS in Ada wrapper and updated examples (PR 7397)
* Added additional minimum TLS extension size sanity checks (PR 7602)
* ESP improvements: updating the examples and libraries, updates for Apple HomeKit SHA/SRP, and fix for endianness with SHA512 software fallback (PR 7607, 7392, 7505, 7535)
* Made the wc_CheckCertSigPubKey API publicly available with the define of the macro WOLFSSL_SMALL_CERT_VERIFY (PR 7599)
* Added an alpha/preview of additional FIPS 140-3 full submission, bringing additional algorithms such as SRTP-KDF, AES-XTS, GCM streaming, AES-CFB, ED25519, and ED448 into the FIPS module boundary (PR 7295)
* XCODE support for v5.2.3 of the FIPS module (PR 7140)
* Expanded OpenSSL compatibility layer and added EC_POINT_hex2point (PR 7191)
## Fixes
* Fixed Kyber control-flow timing leak. Thanks to Antoon Purnal from PQShield for the report
* Fixed the NXP MMCAU HW acceleration for SHA-256 (PR 7389)
* Fixed AES-CFB1 encrypt/decrypt on size (8*x-1) bits (PR 7431)
* Fixed use of %rip with SHA-256 x64 assembly (PR 7409)
* Fixed OCSP response message build for DTLS (PR 7671)
* Handled edge case in wc_ecc_mulmod() with zero (PR 7532)
* Fixed RPK (Raw Public Key) to follow certificate use correctly (PR 7375)
* Added sanity check on record header with QUIC use (PR 7638)
* Added sanity check for empty directory strings in X.509 when parsing (PR 7669)
* Added sanity check on non-conforming serial number of 0 in certificates being parsed (PR 7625)
* Fixed wolfSSL_CTX_set1_sigalgs_list() to make the TLS connection conform to the selected sig hash algorithm (PR 7693)
* Various fixes for dual algorithm certificates including small stack use and support for Certificate Signing Requests (PR 7577)
* Added sanity check for critical policy extension when wolfSSL is built without policy extension support enabled (PR 7388)
* Added sanity check that the ed25519 signature is smaller than the order (PR 7513)
* Fixed Segger emNet to handle non-blocking want read/want write (PR 7581)
# wolfSSL Release 5.7.0 (Mar 20, 2024)
Release 5.7.0 has been developed according to wolfSSL's development and QA
@@ -112,7 +539,7 @@ fixed this omission in several PRs for this release.
* [Low] CVE-2023-6936: A potential heap overflow read is possible in servers connecting over TLS 1.3 when the optional `WOLFSSL_CALLBACKS` has been defined. The out of bounds read can occur when a server receives a malicious malformed ClientHello. Users should either discontinue use of `WOLFSSL_CALLBACKS` on the server side or update versions of wolfSSL to 5.6.6. Thanks to the tlspuffin fuzzer team for the report which was designed and developed by; Lucca Hirschi (Inria, LORIA), Steve Kremer (Inria, LORIA), and Max Ammann (Trail of Bits). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6949.
* [Low] A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “`--enable-aes-bitsliced`” configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
* [Low] CVE-2024-1543: A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “`--enable-aes-bitsliced`” configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
* [Low] CVE-2023-6937: wolfSSL prior to 5.6.6 did not check that messages in a single (D)TLS record do not span key boundaries. As a result, it was possible to combine (D)TLS messages using different keys into one (D)TLS record. The most extreme edge case is that, in (D)TLS 1.3, it was possible that an unencrypted (D)TLS 1.3 record from the server containing first a ServerHello message and then the rest of the first server flight would be accepted by a wolfSSL client. In (D)TLS 1.3 the handshake is encrypted after the ServerHello but a wolfSSL client would accept an unencrypted flight from the server. This does not compromise key negotiation and authentication so it is assigned a low severity rating. Thanks to Johannes Wilson for the report (Sectra Communications and Linköping University). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/7029.
@@ -766,9 +1193,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
## Enhancements
* DTLSv1.3: Do HRR Cookie exchange by default
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
* Update ide win10 build files to add missing sp source files
* Improve Workbench docs
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
* Update ide win10 build files to add missing sp source files
* Improve Workbench docs
* Improve EVP support for CHACHA20_POLY1305
* Improve `wc_SetCustomExtension` documentation
* RSA-PSS with OCSP and add simple OCSP response DER verify test case
@@ -776,23 +1203,23 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
* Don't over-allocate memory for DTLS fragments
* Add WOLFSSL_ATECC_TFLXTLS for Atmel port
* SHA-3 performance improvements with x86_64 assembly
* Add code to fallback to S/W if TSIP cannot handle
* Add code to fallback to S/W if TSIP cannot handle
* Improves entropy with VxWorks
* Make time in milliseconds 64-bits for longer session ticket lives
* Support for setting cipher list with bytes
* wolfSSL_set1_curves_list(), wolfSSL_CTX_set1_curves_list() improvements
* Add to RSAES-OAEP key parsing for pkcs7
* Add missing DN nid to work with PrintName()
* SP int: default to 16 bit word size when NO_64BIT defined
* SP int: default to 16 bit word size when NO_64BIT defined
* Limit the amount of fragments we store per a DTLS connection and error out when max limit is reached
* Detect when certificate's RSA public key size is too big and fail on loading of certificate
## Fixes
* Fix for async with OCSP non-blocking in `ProcessPeerCerts`
* Fixes for building with 32-bit and socket size sign/unsigned mismatch
* Fix Windows CMakeList compiler options
* TLS 1.3 Middle-Box compat: fix missing brace
* Configuration consistency fixes for RSA keys and way to force disable of private keys
* Fix Windows CMakeList compiler options
* TLS 1.3 Middle-Box compat: fix missing brace
* Configuration consistency fixes for RSA keys and way to force disable of private keys
* Fix for Aarch64 Mac M1 SP use
* Fix build errors and warnings for MSVC with DTLS 1.3
* Fix HMAC compat layer function for SHA-1
@@ -800,9 +1227,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
* Check return from call to wc_Time
* SP math: fix build configuration with opensslall
* Fix for async session tickets
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
* Ed. function to make public key now checks for if the private key flag is set
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
* Fix for building with PSK only
* Set correct types in wolfSSL_sk_*_new functions
* Sanity check that size passed to mp_init_size() is no more than SP_INT_DIGITS
@@ -916,7 +1343,7 @@ CVE-2020-12966 https://www.amd.com/en/corporate/product-security/bulletin/amd-sb
* Update SP math all to not use sp_int_word when SQR_MUL_ASM is available
### SP Math Fixes
* Fixes for constant time with div function
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
* Fix for div_word when not using div function
* Fixes for user settings with SP ASM and ED/Curve25519 small
* Additional Wycheproof tests ran and fixes
@@ -1096,7 +1523,7 @@ Release 5.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
### Math Library Fixes
* Sanity check with SP math that ECC points ordinates are not greater than modulus length
* Additional sanity checks that _sp_add_d does not error due to overflow
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
* TFM fp_div_2_ct rework to avoid potential overflow
### Misc.
@@ -1337,7 +1764,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
###### PORT Fixes
* Building with Android wpa_supplicant and KeyStore
* Setting initial value of CA certificate with TSIP enabled
* Cryptocell ECC build fix and fix with RSA disabled
* Cryptocell ECC build fix and fix with RSA disabled
* IoT-SAFE improvement for Key/File slot ID size, fix for C++ compile, and fixes for retrieving the public key after key generation
###### Math Library Fixes
@@ -1476,7 +1903,7 @@ Release 5.0.0 of wolfSSL embedded TLS has bug fixes and new features including:
- SSL_SESSION_has_ticket()
- SSL_SESSION_get_ticket_lifetime_hint()
- DIST_POINT_new
- DIST_POINT_free
- DIST_POINT_free
- DIST_POINTS_free
- CRL_DIST_POINTS_free
- sk_DIST_POINT_push
@@ -1639,7 +2066,7 @@ Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
### Vulnerabilities
* [Low] CVE-2021-37155: OCSP request/response verification issue. In the case that the serial number in the OCSP request differs from the serial number in the OCSP response the error from the comparison was not resulting in a failed verification. We recommend users that have wolfSSL version 4.6.0 and 4.7.0 with OCSP enabled update their version of wolfSSL. Version 4.5.0 and earlier are not affected by this report. Thanks to Rainer Mueller-Amersdorffer, Roee Yankelevsky, Barak Gutman, Hila Cohen and Shoshi Berko (from CYMOTIVE Technologies and CARIAD) for the report.
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
### New Feature Additions
###### New Product

View File

@@ -6,11 +6,11 @@ USER root
# Set timezone to UTC
RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat-traditional binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git"
ARG DEPS_UDP_PROXY="wget libevent-dev"
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate libnl-genl-3-dev libcap-ng-dev"
ARG DEPS_TOOLS="ccache clang-tidy maven"
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate libnl-genl-3-dev libcap-ng-dev python3-virtualenv curl jq"
ARG DEPS_TOOLS="ccache clang-tidy maven libfile-util-perl android-tools-adb usbutils shellcheck"
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} ${DEPS_UDP_PROXY} ${DEPS_TESTS} ${DEPS_TOOLS} \
&& apt clean -y && rm -rf /var/lib/apt/lists/*
@@ -40,10 +40,12 @@ RUN cd /opt/sources && git clone --single-branch https://github.com/cisco/hash-s
# Install pkixssh to /opt/pkixssh for X509 interop testing with wolfSSH
RUN mkdir /var/empty
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-14.1.1.tar.gz | tar xzf - && cd pkixssh-14.1.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-15.1.tar.gz | tar xzf - && cd pkixssh-15.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
# Install udp/tcp-proxy
RUN cd /opt/sources && git clone --depth=1 --single-branch --branch=main http://github.com/wolfssl/udp-proxy && cd udp-proxy && make && cp tcp_proxy udp_proxy /bin/.
# Install libbacktrace
RUN cd /opt/sources && git clone --depth=1 --single-branch https://github.com/ianlancetaylor/libbacktrace.git && cd libbacktrace && mkdir build && cd build && ../configure && make && make install
# Allow non-root to use tcpdump (will need NET_RAW and NET_ADMIN capability when running the container)
RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Assume we're in wolfssl/Docker
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)
@@ -18,18 +18,37 @@ docker build -t wolfssl/wolfssl-builder:${CUR_DATE} ${DOCKER_BUILD_OPTIONS} "${W
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest
if [ $? -eq 0 ]; then
echo "Pushing containers to DockerHub"
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
echo "Push containers to DockerHub [y/N]? "
read val
if [ "$val" = "y" ]; then
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
if [ $? -ne 0 ]; then
echo "Warning: push failed. Continuing"
((NUM_FAILURES++))
fi
fi
else
echo "Warning: Build wolfssl/wolfssl-builder failed. Continuing"
((NUM_FAILURES++))
fi
echo "Building wolfssl/wolfCLU:${CUR_DATE}"
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU" && \
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU"
if [ $? -ne 0 ]; then
DOCKER_ARGS="--pull --build-arg DUMMY=${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 ${WOLFSSL_DIR}/Docker/wolfCLU"
docker buildx build -t wolfssl/wolfclu:${CUR_DATE} ${DOCKER_ARGS} && \
docker buildx build -t wolfssl/wolfclu:latest ${DOCKER_ARGS}
if [ $? -eq 0 ]; then
echo "Push containers to DockerHub [y/N]? "
read val
if [ "$val" = "y" ]; then
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:${CUR_DATE} && \
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:latest
if [ $? -ne 0 ]; then
echo "Warning: push failed. Continuing"
((NUM_FAILURES++))
fi
fi
else
echo "Warning: Build wolfssl/wolfclu failed. Continuing"
((NUM_FAILURES++))
fi

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "Running with \"${*}\"..."

View File

@@ -1,9 +1,9 @@
ARG DOCKER_BASE_IMAGE=ubuntu
FROM ubuntu as BUILDER
FROM ubuntu AS builder
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat iputils-ping bubblewrap"
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat-traditional iputils-ping bubblewrap"
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \
&& apt install -y ${DEPS_WOLFSSL} \
&& apt clean -y && rm -rf /var/lib/apt/lists/*
ARG NUM_CPU=16
@@ -18,8 +18,8 @@ RUN git clone --depth=1 --single-branch --branch=main http://github.com/wolfssl/
FROM ${DOCKER_BASE_IMAGE}
USER root
COPY --from=BUILDER /usr/local/lib/libwolfssl.so /usr/local/lib/
COPY --from=BUILDER /usr/local/bin/wolfssl* /usr/local/bin/
COPY --from=builder /usr/local/lib/libwolfssl.so /usr/local/lib/
COPY --from=builder /usr/local/bin/wolfssl* /usr/local/bin/
RUN ldconfig
ENTRYPOINT ["/usr/local/bin/wolfssl"]
LABEL org.opencontainers.image.source=https://github.com/wolfssl/wolfssl

View File

@@ -1,6 +1,6 @@
This is a small container that has wolfCLU installed for quick access. To build your own run the following:
```
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
```
To run the container, you can use:

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Assume we're in wolfssl/Docker/yocto
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/../..; pwd)

View File

@@ -4,10 +4,46 @@ This library is restructured from [wolfSSL](https://github.com/wolfSSL/wolfssl/)
The Official wolfSSL Arduino Library is found in [The Library Manager index](http://downloads.arduino.cc/libraries/library_index.json).
See the [Arduino-wolfSSL logs](https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/).
See the [Arduino-wolfSSL logs](https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/) for publishing status.
Instructions for installing and using libraries can be found in the [Arduino docs](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries/).
## wolfSSL Configuration
As described in the [Getting Started with wolfSSL on Arduino](https://www.wolfssl.com/getting-started-with-wolfssl-on-arduino/), wolfSSL features are enabled and disabled in the `user_settings.h` file.
The `user_settings.h` file is found in the `<Arduino>/libraries/wolfssl/src` directory.
For Windows this is typically `C:\Users\%USERNAME%\Documents\Arduino\libraries\wolfssl\src`
For Mac: `~/Documents/Arduino/libraries/wolfssl/src`
For Linux: `~/Arduino/libraries/wolfssl/src`
Tips for success:
- The `WOLFSSL_USER_SETTINGS` macro must be defined project-wide. (see [wolfssl.h](https://github.com/wolfSSL/wolfssl/blob/master/IDE/ARDUINO/wolfssl.h))
- Apply any customizations only to `user_settings.h`; Do not edit wolfSSL `settings.h` or `configh.h` files.
- Do not explicitly include `user_settings.h` in any source file.
- For every source file that uses wolfssl, include `wolfssl/wolfcrypt/settings.h` before any other wolfSSL include, typically via `#include "wolfssl.h"`.
- See the [wolfSSL docs](https://www.wolfssl.com/documentation/manuals/wolfssl/chapter02.html) for details on build configuration macros.
## wolfSSL Examples
Additional wolfSSL examples can be found at:
- https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO
- https://github.com/wolfSSL/wolfssl/tree/master/examples
- https://github.com/wolfSSL/wolfssl-examples/
## Arduino Releases
The first Official wolfSSL Arduino Library is `5.6.6-Arduino.1`: a slightly modified, post [release 5.6.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.6-stable) version update.
This release of wolfSSL is version [5.7.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.7.6-stable).
See other [wolfSSL releases versions](https://github.com/wolfSSL/wolfssl/releases). The `./wolfssl-arduino.sh INSTALL` [script](https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO) can be used to install specific GitHub versions as needed.
See GitHub for [all Arduino wolfSSL releases](https://github.com/wolfSSL/Arduino-wolfSSL/releases).
The first Official wolfSSL Arduino Library was `5.6.6-Arduino.1`: a slightly modified, post [release 5.6.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.6-stable) version update.
The `./wolfssl-arduino.sh INSTALL` [script](https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO) can be used to install specific GitHub versions as needed.

View File

@@ -7,13 +7,33 @@ See the [example sketches](./sketches/README.md):
When publishing a new version to the Arduino Registry, be sure to edit `WOLFSSL_VERSION_ARUINO_SUFFIX` in the `wolfssl-arduino.sh` script.
## Getting Started
See [Getting Started with wolfSSL on Arduino](https://www.wolfssl.com/getting-started-with-wolfssl-on-arduino/), wolfSSL features are enabled and disabled in the `user_settings.h` file.
The `user_settings.h` file is found in the `<Arduino>/libraries/wolfssl/src` directory.
For Windows this is typically `C:\Users\%USERNAME%\Documents\Arduino\libraries\wolfssl\src`
For Mac: `~/Documents/Arduino/libraries/wolfssl/src`
For Linux: `~/Arduino/libraries/wolfssl/src`
Tips for success:
- The `WOLFSSL_USER_SETTINGS` macro must be defined project-wide. (see [wolfssl.h](https://github.com/wolfSSL/wolfssl/blob/master/IDE/ARDUINO/wolfssl.h))
- Apply any customizations only to `user_settings.h`; Do not edit wolfSSL `settings.h` or `configh.h` files.
- Do not explicitly include `user_settings.h` in any source file.
- For every source file that uses wolfssl, include `wolfssl/wolfcrypt/settings.h` before any other wolfSSL include, typically via `#include "wolfssl.h"`.
- See the [wolfSSL docs](https://www.wolfssl.com/documentation/manuals/wolfssl/chapter02.html) for details on build configuration macros.
## Boards
Many of the supported boards are natively built-in to the [Arduino IDE Board Manager](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager/)
and by adding [additional cores](https://docs.arduino.cc/learn/starting-guide/cores/) as needed.
STM32 Support can be added by including this link in the "Additional Boards Managers URLs" field
from [stm32duino/Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started) .
from [stm32duino/Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started).
```
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
@@ -27,7 +47,7 @@ This option will allow wolfSSL to be installed directly using the native Arduino
## Manually Reformatting wolfSSL as a Compatible Arduino Library
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
compatible with [Arduino Library Specification](https://arduino.github.io/arduino-cli/0.35/library-specification/)
for projects that use Arduino IDE 1.5.0 or newer.
@@ -55,8 +75,8 @@ from within the `wolfssl/IDE/ARDUINO` directory:
3. `./wolfssl-arduino.sh INSTALL /path/to/repository` (Used to update [arduino-wolfSSL](https://github.com/wolfSSL/arduino-wolfSSL))
- Creates an Arduino Library in `wolfSSL` directory
- Copies that directory contents to the specified `/path/to/repository`
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
4. `./wolfssl-arduino.sh INSTALL /path/to/any/other/directory`
- Creates an Arduino Library in `wolfSSL` directory
- Copies that directory contents to the specified `/path/to/any/other/directory`

View File

@@ -10,3 +10,25 @@ Examples have been most recently confirmed operational on the
For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE).
Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
## Using wolfSSL
The typical include will look something like this:
```
#include <Arduino.h>
/* wolfSSL user_settings.h must be included from settings.h
* Make all configurations changes in user_settings.h
* Do not edit wolfSSL `settings.h` or `configh.h` files.
* Do not explicitly include user_settings.h in any source code.
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
*/
#include <wolfssl.h>
#include <wolfssl/version.h>
```
For more details, see [IDE/ARDUINO/README.md](https://github.com/wolfSSL/wolfssl/blob/master/IDE/ARDUINO/README.md)

View File

@@ -1,6 +1,6 @@
/* wolfssl_client.ino
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -85,6 +85,15 @@ Tested with:
#include <NTPClient.h>
#endif
/* wolfSSL user_settings.h must be included from settings.h
* Make all configurations changes in user_settings.h
* Do not edit wolfSSL `settings.h` or `config.h` files.
* Do not explicitly include user_settings.h in any source code.
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
*/
#include <wolfssl.h>
/* Important: make sure settings.h appears before any other wolfSSL headers */
#include <wolfssl/wolfcrypt/settings.h>

View File

@@ -13,7 +13,7 @@ Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.co
## Connect with an Arduino Sketch
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
## Connect with Linux Client
@@ -35,7 +35,7 @@ press the reset button or power cycle the Arduino before making a connection.
Here's one possible script to test the server from a command-line client:
```bash
#!/bin/bash
#!/usr/bin/env bash
echo "client log " > client_log.txt
counter=1
THIS_ERR=0

View File

@@ -1,6 +1,6 @@
/* wolfssl_server.ino
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -85,6 +85,15 @@ Tested with:
#include <NTPClient.h>
#endif
/* wolfSSL user_settings.h must be included from settings.h
* Make all configurations changes in user_settings.h
* Do not edit wolfSSL `settings.h` or `config.h` files.
* Do not explicitly include user_settings.h in any source code.
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
*/
#include <wolfssl.h>
/* Important: make sure settings.h appears before any other wolfSSL headers */
#include <wolfssl/wolfcrypt/settings.h>

View File

@@ -1,24 +1,55 @@
#include <Arduino.h>
#include <wolfssl.h>
#include <wolfssl/version.h>
/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
#define SERIAL_BAUD 115200
/* Arduino setup */
void setup() {
Serial.begin(SERIAL_BAUD);
while (!Serial) {
/* wait for serial port to connect. Needed for native USB port only */
}
Serial.println(F(""));
Serial.println(F(""));
Serial.println(F("wolfSSL setup complete!"));
}
/* Arduino main application loop. */
void loop() {
Serial.print("wolfSSL Version: ");
Serial.println(LIBWOLFSSL_VERSION_STRING);
delay(60000);
}
/* wolfssl_server.ino
*
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <Arduino.h>
/* wolfSSL user_settings.h must be included from settings.h
* Make all configurations changes in user_settings.h
* Do not edit wolfSSL `settings.h` or `config.h` files.
* Do not explicitly include user_settings.h in any source code.
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
*/
#include <wolfssl.h>
#include <wolfssl/version.h>
/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
#define SERIAL_BAUD 115200
/* Arduino setup */
void setup() {
Serial.begin(SERIAL_BAUD);
while (!Serial) {
/* wait for serial port to connect. Needed for native USB port only */
}
Serial.println(F(""));
Serial.println(F(""));
Serial.println(F("wolfSSL setup complete!"));
}
/* Arduino main application loop. */
void loop() {
Serial.print("wolfSSL Version: ");
Serial.println(LIBWOLFSSL_VERSION_STRING);
delay(60000);
}

View File

@@ -20,7 +20,7 @@
# Reminder there's typically no $USER for GitHub actions, but:
# ROOT_DIR="/mnt/c/Users/$USER/Documents/Arduino/libraries"
#
# The company name is "wolfSSL Inc."; Theres a space, no comma, and a period after "Inc."
# The company name is "wolfSSL Inc."; There's a space, no comma, and a period after "Inc."
# The Arduino library name is "wolfssl" (all lower case)
# The Arduino library directory name is "wolfssl" (all lower case)
# The Arduino library include file is "wolfssl.h" (all lower case)
@@ -29,7 +29,7 @@
ROOT_DIR="/wolfssl"
# The Arduino Version will initially have a suffix appended during fine tuning stage.
WOLFSSL_VERSION_ARUINO_SUFFIX="-Arduino.3"
WOLFSSL_VERSION_ARUINO_SUFFIX=""
# For verbose copy, set CP_CMD="-v", otherwise clear it: CP_CMD="cp"
# Do not set to empty string, as copy will fail with this: CP_CMD=""
@@ -65,6 +65,11 @@ if ! [ "$CP_CMD" = "cp " ]; then
fi
fi
if [ "$ROOT_DIR" = "" ]; then
echo "ERROR: ROOT_DIR cannot be blank"
exit 1
fi
# Check environment
if [ -n "$WSL_DISTRO_NAME" ]; then
# we found a non-blank WSL environment distro name
@@ -84,6 +89,11 @@ if [ $# -gt 0 ]; then
if [ "$THIS_OPERATION" = "INSTALL" ]; then
THIS_INSTALL_DIR=$2
if [ "$THIS_INSTALL_DIR" = "/" ]; then
echo "ERROR: THIS_INSTALL_DIR cannot be /"
exit 1
fi
echo "Install is active."
if [ "$THIS_INSTALL_DIR" = "" ]; then
@@ -96,10 +106,10 @@ if [ $# -gt 0 ]; then
else
echo "Installing to $THIS_INSTALL_DIR"
if [ -d "$THIS_INSTALL_DIR/.git" ];then
echo "Target is a GitHub repository."
echo "Target is a GitHub root repository."
THIS_INSTALL_IS_GITHUB="true"
else
echo "Target is NOT a GitHub repository."
echo "Target is NOT a GitHub root directory repository. (e.g. not wolfssl/Arduino-wolfssl)"
fi
fi
else
@@ -300,24 +310,33 @@ echo ""
# Note we should have exited above if a problem was encountered,
# as we'll never want to install a bad library.
if [ "$THIS_OPERATION" = "INSTALL" ]; then
echo "Config:"
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
# Show the user_settings.h revision string:
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
echo ""
if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then
echo "Installing to GitHub directory: $THIS_INSTALL_DIR"
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
echo "Removing workspace library directory: .$ROOT_DIR"
rm -rf ".$ROOT_DIR"
else
echo "Config:"
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
# Show the user_settings.h revision string:
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
echo ""
echo "Installing to local directory:"
if [ "$THIS_INSTALL_DIR" = "" ]; then
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
echo "Install:"
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
echo "Arduino wolfSSL Version: $WOLFSSL_VERSION$WOLFSSL_VERSION_ARUINO_SUFFIX"
echo "Arduino wolfSSL Version: $WOLFSSL_VERSION$WOLFSSL_VERSION_ARUINO_SUFFIX"
else
echo "cp -r .\"$ROOT_DIR\"/* \"$THIS_INSTALL_DIR\""
mkdir -p "$THIS_INSTALL_DIR" || exit 1
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
fi
fi
fi

View File

@@ -1,6 +1,6 @@
/* wolfssl.h
*
* Copyright (C) 2006-2024 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -27,7 +27,15 @@
#include <Arduino.h>
/* wolfSSL user_settings.h must be included from settings.h */
/* wolfSSL user_settings.h must be included from settings.h
* Make all configurations changes in user_settings.h
* Do not edit wolfSSL `settings.h` or `config.h` files.
* Do not explicitly include user_settings.h in any source code.
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
* The wolfSSL "settings.h" must be listed before any other wolfSSL include.
*/
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>

View File

@@ -1,6 +1,6 @@
/* Cpu0_Main.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -63,7 +63,7 @@ int fputc(int ch, FILE *f)
if (ch == (int)'\n') {
int chcr = (int)'\r';
count = 1;
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
}
count = 1;
IfxAsclin_Asc_write(&g_asc, &ch, &count, TIME_INFINITE);

View File

@@ -9,7 +9,7 @@ Tested Platform:
## Running wolfCrypt on TriCore
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
- Only the following folders are required: `src`, `wolfcrypt` and `wolfssl`.
- See script to help with producing bundle here: https://github.com/wolfSSL/wolfssl/blob/master/scripts/makedistsmall.sh
2) Add `WOLFSSL_USER_SETTINGS` to the Preprocessing symbols list. C/C++ Build -> Settings -> TASKING C/C++ Compiler -> Preprocessing.

View File

@@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* wolf_main.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -40,7 +40,7 @@ cc_library_shared {
"./src/wolfio.c",
] + [
"./wolfcrypt/src/aes.c",
"./wolfcrypt/src/arc4.c",
// ARC4 implementation has been removed
"./wolfcrypt/src/asm.c",
"./wolfcrypt/src/asn.c",
"./wolfcrypt/src/blake2b.c",

View File

@@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -18,8 +18,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
@@ -63,4 +63,3 @@ int main(void)
return 0;
}

View File

@@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -401,6 +401,7 @@ extern "C" {
/* prototypes for user heap override functions */
/* Note: Realloc only required for normal math */
/* Note2: XFREE(NULL) must be properly handled */
#include <stddef.h> /* for size_t */
extern void *myMalloc(size_t n, void* heap, int type);
extern void myFree(void *p, void* heap, int type);

View File

@@ -1,6 +1,6 @@
/* deos_malloc.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -240,9 +240,9 @@
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_operations.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/fe_x25519_128.i</name>
<name>wolfcrypt/src/fe_x25519_128.h</name>
<type>1</type>
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_x25519_128.i</locationURI>
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_x25519_128.h</locationURI>
</link>
<link>
<name>wolfcrypt/src/fp_mont_small.i</name>

View File

@@ -1,6 +1,6 @@
/* tls_wolfssl.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* tls_wolfssl.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* user_setting.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* client_wolfssl.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* client_wolfssl.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* server_wolfssl.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* server_wolfssl.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* user_setting.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* wolfsslRunTests.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* user_setting.h
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1,6 +1,6 @@
/* wolfsslRunTests.c
*
* Copyright (C) 2006-2023 wolfSSL Inc.
* Copyright (C) 2006-2025 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@@ -1 +1 @@
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.

View File

@@ -1,11 +1,12 @@
# ESP-IDF Port
These Espressif examples have been created and tested with the latest stable release branch of
[ESP-IDF V5.2](https://docs.espressif.com/projects/esp-idf/en/release-v5.2/esp32/get-started/index.html).
The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended.
Espressif has [a list of all ESP-IDF versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html).
These Espressif examples have been created and tested with the latest stable release branch of
ESP-IDF v5.2, v5.3 and the master branch
See the latest [Espressif Migration Guides](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/index.html).
The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended.
Espressif has [a list of all ESP-IDF versions](Espressifversions.html).
See the latest Espressif Migration Guides.
## Examples
@@ -34,7 +35,7 @@ looks for the wolfSSL `user_settings.h` in the project as described below.
### File: `sdkconfig.h`
The Espressif `sdkconfig.h`, generated automatically from your `sdkconfig`
file at [build](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html)
file at [build](Espressif api-guides/build-system.html)
time, should be included before any other files.
### File: `user_settings.h`
@@ -101,7 +102,7 @@ of your source code, particularly before the `#include <wolfssl/wolfcrypt/settin
## Requirements
1. [ESP-IDF development framework](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/)
1. [ESP-IDF development framework](https://github.com/espressif/esp-idf)
## wolfSSL as an Espressif component
@@ -113,7 +114,7 @@ There are various methods available for using wolfSSL as a component:
## Espressif Managed Components
Visit https://components.espressif.com/components/wolfssl/wolfssl and see the instructions. Typically:
Visit https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/ and see the instructions. Typically:
```
idf.py add-dependency "wolfssl/wolfssl^5.6.0-stable"
@@ -140,10 +141,18 @@ See the specific examples for additional details.
This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code.
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
2. Find Wolfssl files at _/path/to/esp_`/esp-idf/components/wolfssl/`
3. Find [Example Programs](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples) under _/path/to/esp_`/esp-idf/examples/protocols/wolfssl_xxx` (where xxx is the project name)
```
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
. $WRK_IDF_PATH/export.sh
./setup.sh
```
## Setup for Windows
This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code.
@@ -169,7 +178,7 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
## Configuration
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
## Configuration (Legacy IDF install)
@@ -183,13 +192,13 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
For question please email [support@wolfssl.com]
Note: This is tested with :
Note: This is tested with :
- OS: Ubuntu 20.04.3 LTS
- Microsoft Windows 10 Pro 10.0.19041 / Windows 11 Pro 22H2 22621.2715
- Visual Studio 2022 17.7.6 with VisualGDB 5.6R9 (build 4777)
- WSL 1 Ubuntu 22.04.3 LTS
- ESP-IDF: ESP-IDF v5.1
- SoC Module : all those supported in ESP-IDF v5.1
- ESP-IDF: ESP-IDF v5.2
- SoC Module : all those supported in ESP-IDF v5.2
## JTAG Debugging Notes
@@ -226,3 +235,15 @@ ftdi layout_signal nSRST -data 0x0020
reset_config srst_push_pull trst_push_pull
```
## Windows long paths
Check "Long Paths Enabled" in Windows registry.
Please set registry HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled to 1.
The operation requires Administrator privileges. Command:
```powershell
powershell -Command "&{ Start-Process -FilePath reg 'ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f' -Verb runAs}"
```

View File

@@ -10,7 +10,7 @@ Including the following examples:
The `user_settings.h` file enables some of the hardened settings.
## Requirements
1. ESP-IDF development framework: https://docs.espressif.com/projects/esp-idf/en/latest/get-started/
1. ESP-IDF development framework: https://github.com/espressif/esp-idf
2. Microchip CryptoAuthentication Library: https://github.com/MicrochipTech/cryptoauthlib

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# testing script: compileAllExamples
#

Some files were not shown because too many files have changed in this diff Show More