Commit Graph

21751 Commits

Author SHA1 Message Date
David Garske
cd0301fc66 Fixes for benchmark with small stack (RSA was being skipped). Added Thumb2 benchmarks for STM32H753. 2024-02-22 14:56:51 -08:00
JacobBarthelmeh
8a68e6aaa1 Merge pull request #7266 from bandi13/addYoctoDocker
Add in files for yocto build environment
2024-02-22 19:30:36 +07:00
JacobBarthelmeh
6f281d7e72 Merge pull request #7267 from douzzer/20240221-reproducible-build-tweaks
20240221-reproducible-build-tweaks
2024-02-22 19:28:12 +07:00
JacobBarthelmeh
162d4dc483 Merge pull request #7264 from bandi13/dockerFixes
Add in missing dependency for nightly-sp-test
2024-02-22 19:11:07 +07:00
Daniel Pouzzner
f1afa7eaff Merge pull request #7265 from embhorn/zd17547
Fix order of check for OPENSSL_EXTRA
2024-02-21 20:25:54 -05:00
Daniel Pouzzner
9e4887bcf4 configure.ac: fix --enable-reproducible-build using -g0 -ffile-prefix-map=... -Wl,--build-id=none. these fixes stabilize the hash of libwolfssl with respect to source and build directory, previously broken for out-of-tree builds. 2024-02-21 16:36:29 -06:00
Andras Fekete
e74d3e126e Add in files for yocto build environment 2024-02-21 16:49:35 -05:00
Andras Fekete
2ee47eac4d Add in missing dependency for nightly-sp-test 2024-02-21 16:16:26 -05:00
Eric Blankenhorn
3ad836ab47 Fix order of check for OPENSSL_EXTRA 2024-02-21 15:09:13 -06:00
Sean Parkinson
d027b305ab Merge pull request #7257 from philljj/zd17540
Fix unchecked ge448_scalarmult_base return value.
2024-02-22 07:05:09 +10:00
JacobBarthelmeh
88e7d47930 Merge pull request #7230 from anhu/tests_gating
Fixup some gating in the tests.
2024-02-22 01:24:55 +07:00
jordan
5aa06c26ff Fix unchecked ge448_scalarmult_base return value. 2024-02-21 08:40:38 -06:00
Anthony Hu
00c3f5be2e A fixup 2024-02-20 21:50:03 -05:00
JacobBarthelmeh
fd2b80ec22 Merge pull request #7245 from julek-wolfssl/transient-certs
Implement transient certs
2024-02-20 22:48:19 +07:00
Juliusz Sosinowicz
09de233fc0 Add dox for new API 2024-02-20 14:42:58 +01:00
Juliusz Sosinowicz
aa19d8221e Add test forcing caTable cleanup during active connections 2024-02-20 14:33:36 +01:00
Juliusz Sosinowicz
4caef93346 Implement transient certs
Add wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to store.
2024-02-20 14:33:36 +01:00
Sean Parkinson
af2b2dddb4 Merge pull request #7253 from julek-wolfssl/zd/17507
wc_ecc_shared_secret_ssh fix
2024-02-20 06:56:28 +10:00
JacobBarthelmeh
757fcbcc25 Merge pull request #7236 from julek-wolfssl/get-sig-nid
Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid
2024-02-20 02:46:37 +07:00
JacobBarthelmeh
565a4e6773 Merge pull request #7256 from douzzer/20240217-fixes
20240217-fixes
2024-02-20 01:54:32 +07:00
Daniel Pouzzner
8d894fb01b wolfssl/wolfcrypt/types.h: add WC_ARRAY_ARG() and WC_HEAP_ARRAY_ARG() constructors, for passing arrays declared by WC_DECLARE_ARRAY() and WC_DECLARE_HEAP_ARRAY(). used this to refactor bench_rsa_helper() arg list, fixing a cppcheck argumentSize warning.
wolfcrypt/test/test.c: revert overeager constification of xmss_msg and xmss_sig.
2024-02-17 15:24:55 -06:00
David Garske
7f18338322 Merge pull request #7255 from ejohnstown/ocsp-date
OCSP Date Checks
2024-02-16 20:58:20 -08:00
John Safranek
52f4dcd7aa OCSP Date Checks
When calling DecodeResponseData(), no matter the return value, if it is
not success, it is assigned to ASN_PARSE_E. This isn't the pattern for
other branch parsing. Return the value returned.

This is seen when decoding an OCSP response that is past the
next-available time.
2024-02-16 12:12:27 -08:00
David Garske
e4ea2651a3 Merge pull request #7252 from douzzer/20240215-benchmark-smallstack-refactors
20240215-benchmark-smallstack-refactors
2024-02-16 11:45:59 -08:00
Daniel Pouzzner
af620513f1 wolfssl/wolfcrypt/types.h: fix bugprone-macro-parentheses in smallstack WC_ALLOC_VAR(). 2024-02-16 12:39:25 -06:00
David Garske
815c290293 Merge pull request #7231 from anhu/maxqrng
Use the MAXQ1065/1080 rng when available.
2024-02-16 09:43:46 -08:00
Daniel Pouzzner
3676dc02a6 wolfcrypt/benchmark/benchmark.c: mollify scan-build with XMEMSET()s in several false positives around WC_DECLARE_ARRAY(). 2024-02-16 10:27:06 -06:00
Daniel Pouzzner
44e0ee1ecd wolfssl/wolfcrypt/types.h:
* fix overallocation in WC_DECLARE_ARRAY() macro in the !WOLFSSL_SMALL_STACK path.
* rename WC_INIT_ARRAY() to WC_ALLOC_ARRAY() for clarity (it doesn't initialize any memory).
* rename WC_DECLARE_ARRAY_DYNAMIC_DEC(), WC_DECLARE_ARRAY_DYNAMIC_EXE(), and WC_FREE_ARRAY_DYNAMIC() to WC_DECLARE_HEAP_ARRAY(), WC_ALLOC_HEAP_ARRAY(), and WC_FREE_HEAP_ARRAY(), respectively, also for clarity, and refactor out the duplicate definitions.
* add WC_ALLOC_VAR(), and move the XMALLOC() in smallstack WC_DECLARE_VAR() into it.  smallstack WC_DECLARE_VAR() now initializes the pointer to NULL, like smallstack WC_DECLARE_ARRAY(), assuring all pointers are valid upon shortcircuit to cleanup for a failed allocation (see WC_ALLOC_DO_ON_FAILURE below).
* add a new hook "WC_ALLOC_DO_ON_FAILURE" in WC_ALLOC_VAR(), WC_ALLOC_ARRAY(), and WC_DECLARE_ARRAY_DYNAMIC_EXE(), which is invoked when an allocation fails.  by default the hook is defined to WC_DO_NOTHING.
* add basic safety to WC_*_HEAP_ARRAY() by recording/detecting allocation state via idx##VAR_NAME.
* add macros WC_ARRAY_OK() and WC_HEAP_ARRAY_OK() to test if allocation succeeded.
* add macros WC_CALLOC_ARRAY() and WC_CALLOC_HEAP_ARRAY() which zero the objects.
* add macro WC_CALLOC_VAR() which zeros the object.

ED448: smallstack refactor of ge448_scalarmult_base().

src/tls.c tests/api.c wolfcrypt/test/test.c: update WC_DECLARE_VAR()s with now-required matching WC_ALLOC_VAR()s.

wolfcrypt/benchmark/benchmark.c:
* no functional changes in default error-free behavior.
* add definition of WC_ALLOC_DO_ON_FAILURE() that prints error message, sets ret, and does goto exit.
* add BENCH_NTIMES and BENCH_AGREETIMES overrideeable macros, to allow fast sanitizer runs and slow high-precision runs.
* smallstack refactor of all declarations of stack arrays of the form foo[BENCH_MAX_PENDING], using WC_DECLARE_ARRAY() (35 in all).
* additional smallstack refactors, using WC_DECLARE_VAR(), for bench_aesxts(), bench_ed448KeyGen(), bench_eccsi*(), and bench_sakke*().
* fixes for various unhandled error conditions around malloc failures.

wolfcrypt/test/test.c: opportunistically constify several (42) static constants, moving them to the readonly data segment.

linuxkm/Makefile: if ENABLED_LINUXKM_BENCHMARKS, add wolfcrypt/benchmark/benchmark.o to WOLFSSL_OBJ_FILES.

linuxkm/Kbuild: enable FPU for benchmark.o, and remove enablement for module_hooks.o.

linuxkm/module_hooks.c: remove inline include of benchmark.c.
2024-02-16 10:26:21 -06:00
András Fekete
92b8196059 Merge pull request #7251 from miyazakh/ra6m4_jenkins
fix ra6m4 nightly jenkins failure
2024-02-16 09:09:12 -05:00
Juliusz Sosinowicz
469760e186 wc_ecc_shared_secret_ssh fix
- wc_ecc_shared_secret_ssh should either be declared or not. Having two different signatures for the same function is error prone.
- Don't use wc_ecc_shared_secret_ssh in our code. Use wc_ecc_shared_secret directly.
2024-02-16 13:38:35 +01:00
Juliusz Sosinowicz
44de6dfdd3 Return correct values in get_signature APIs and write tests 2024-02-16 11:32:22 +01:00
Juliusz Sosinowicz
98e328dafc Enable master openvpn testing
Depends on https://github.com/wolfSSL/wolfssl/pull/7236
2024-02-16 11:32:04 +01:00
Juliusz Sosinowicz
6537c7163c Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid 2024-02-16 11:32:04 +01:00
Hideki Miyazaki
72d8acf5aa fix ra6m4 nightly jenkins failure 2024-02-16 15:45:32 +09:00
David Garske
d34b254247 Merge pull request #7249 from bandi13/missingOpenVPNDependencies
Add in dependencies when compiling with OpenVPN
2024-02-15 15:38:07 -08:00
David Garske
f0a162c265 Merge pull request #7250 from lealem47/ecbAsync
Fix for AES-ECB benchmark livelock with Async
2024-02-15 15:37:46 -08:00
Marco Oliverio
c8f3a8f14b fix: negotiate handshake until the end in wolfSSL_read/wolfSSL_write (#7237)
* tls: negotiate until hs is complete in wolfSSL_read/wolfSSL_write

Don't rely on ssl->options.handShakeSate == HANDSHAKE_DONE to check if
negotiation is needed. wolfSSL_Connect() or wolfSSL_Accept() job may not yet be
completed and/or some messages may be waiting in the buffer because of
non-blocking I/O.

* tests: test case for handshake with wolfSSL_read()/wolfSSL_write()

* doc: clarify wolfSSL_write()

* internal.c: rename: need_negotiate -> ssl_in_handshake
2024-02-15 13:48:19 -08:00
Lealem Amedie
4cc960787f Fix for AES-ECB benchmark livelock with Async 2024-02-15 12:51:22 -07:00
Andras Fekete
71fd4782c0 Add in dependencies when compiling with OpenVPN 2024-02-15 13:48:33 -05:00
David Garske
585f0f1956 Merge pull request #7248 from lealem47/ARMASM_UnitTest
Fix unit test failure for FIPS 140-2 + WOLFSSL_ARMASM
2024-02-15 08:25:42 -08:00
Lealem Amedie
b87f544af6 Reviewer feedback 2024-02-14 16:43:01 -07:00
Lealem Amedie
152c8565b9 Fix unit test failure for FIPS 140-2 + WOLFSSL_ARMASM 2024-02-14 16:24:58 -07:00
David Garske
d39cf1e499 Merge pull request #7246 from kareem-wolfssl/zd17176
Only include CRL monitor definitions when building with HAVE_CRL_MONITOR.
2024-02-14 13:45:23 -08:00
Kareem
6dc6d58c04 Remove redundant ifdefs. 2024-02-14 11:22:32 -07:00
David Garske
375415d042 Merge pull request #7229 from kaleb-himes/win-code-up
Windows doesn't like code before variables
2024-02-14 09:50:34 -08:00
Kareem
c119826e75 Only include CRL monitor definitions when building with HAVE_CRL_MONITOR. 2024-02-13 15:37:36 -07:00
Sean Parkinson
3b6a7691c5 Merge pull request #7235 from julek-wolfssl/gh/7228
Send alert on bad psk binder
2024-02-14 07:24:52 +10:00
David Garske
6f88ed0901 Merge pull request #7177 from gojimmypi/PR-Arduino-Update
Improved Arduino Support: ESP32, Due
2024-02-13 09:43:42 -08:00
David Garske
c8d0bb0bd8 Merge pull request #7212 from SparkiDev/eddsa_check_priv
EdDsa: check private value after sign
2024-02-13 09:27:34 -08:00
Sean Parkinson
e28d6a7b71 EdDsa: check private value after sign
Check the private value hasn't changed during signing with EdDSA.
2024-02-13 22:11:48 +10:00