19953 Commits

Author SHA1 Message Date
JacobBarthelmeh
a5106ecda0
Merge pull request #6417 from kareem-wolfssl/docUpdates
Update AES and Chacha documentation.
2023-05-17 13:43:15 -06:00
Daniel Pouzzner
fffff657de cleanups: line length, WOLFSSL_SMALL_STACK_STATIC, and SAVE_VECTOR_REGISTERS() failure trap in benchmark.c, proper path to benchmark.c in linuxkm/module_hooks.c, and proper casting in aes.c. also harmonized semantics and prototype of bench_ripemd(). 2023-05-17 13:00:46 -05:00
Juliusz Sosinowicz
dd9edfee24 Implement atomic operations interface 2023-05-17 16:33:11 +02:00
Daniel Pouzzner
37b716192b wolfcrypt/benchmark/benchmark.c: fix typo in bench_stats_start(). 2023-05-17 02:27:04 -05:00
Daniel Pouzzner
4f4842fce6 linuxkm/linuxkm_memory.c: refactor SAVE/RESTORE_VECTOR_REGISTERS() to be per-process rather than per-CPU, and add migrate_disable/enable() to kernel_fpu_begin/end() because preempt_disable() is just a barrier on _PREEMPT_VOLUNTARY kernels;
linuxkm/linuxkm_wc_port.h: activate SAVE/RESTORE_VECTOR_REGISTERS() whenever defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) for benchmark.c support, independent of vector crypto features;

fix and optimize various alignment issues with stack and heap allocations;

fix macro definitions for XMALLOC/XREALLOC/XFREE to correctly use kvmalloc and friends when defined(HAVE_KVMALLOC), and to use wolfSSL_Malloc() and friends when defined(WOLFSSL_TRACK_MEMORY);

purge stale LINUXKM_SIMD_IRQ code.
2023-05-17 01:44:36 -05:00
Daniel Pouzzner
fc589d664e wolfssl/wolfcrypt/mem_track.h: refactor for linuxkm compatibility, mainly by supporting NO_STDIO_FILESYSTEM. 2023-05-17 01:13:36 -05:00
Daniel Pouzzner
cc1ec8ace5 wolfssl/wolfcrypt/types.h: add missing do-while-0 nonstatments to WC_FREE_VAR() and WC_FREE_ARRAY() for pedantic semicolon swallowing. 2023-05-17 01:11:01 -05:00
Daniel Pouzzner
a18dc7f10a wolfcrypt/src/aes.c: in wc_AesSetKeyLocal(), add an alignment check in the haveAESNI path for WOLFSSL_LINUXKM, because the failure mode is module crash. 2023-05-17 01:07:47 -05:00
Daniel Pouzzner
40b598289f src/ssl_asn1.c: in wolfssl_asn1_time_to_tm(), initialize localTm with memset, not the zero initializer, for C++ compatibility. 2023-05-17 01:06:17 -05:00
Daniel Pouzzner
85e0bf337b fix for benign sign clash in wc_RNG_GenerateBlock(). 2023-05-17 01:05:33 -05:00
Daniel Pouzzner
5aceae1d1c src/internal.c: fix for typo (identicalInnerCondition) in DoClientHello(). 2023-05-17 01:05:14 -05:00
Daniel Pouzzner
3ad7e39dc4 refactor benchmark.c for linux kernel compatibility -- WOLFSSL_SMALL_STACK and WOLFSSL_NO_FLOAT_FMT codepaths, SAVE/RESTORE_VECTOR_REGISTERS, refactor of several stack array initializations that broke in the kernel, and replacement of an fputs() call with printf(). 2023-05-17 01:04:40 -05:00
Daniel Pouzzner
42cce9d8e5 add --enable-linuxkm-benchmarks; add check for async.{c,h} when --enable-asynccrypt; update failure message for the opensslextra AC_CHECK_HEADER() test. 2023-05-17 01:03:26 -05:00
Kareem
6cb2c84f12 Update AES documentation to clarify block size requirement. Fix parameter ordering in wc_ChaCha20Poly1305_Decrypt documentation. 2023-05-16 14:31:51 -07:00
Eric Blankenhorn
0a5a5a65a2 Fix valgrind issue with memcpy 2023-05-16 14:38:51 -05:00
JacobBarthelmeh
5194a296e0
Merge pull request #6414 from embhorn/zd16166
Documentation for wolfSSL_CertManagerFreeCRL
2023-05-16 10:08:51 -06:00
JacobBarthelmeh
53ef26bf3a
Merge pull request #6392 from rizlik/dtls13-fix-ch-epoch
DTLS v1.3: fix epoch 0 check on plaintext message
2023-05-16 10:07:14 -06:00
JacobBarthelmeh
ae37fee134
Merge pull request #6411 from lealem47/6397
Fixes for wolfcrypt test without ECC SECP
2023-05-16 09:59:55 -06:00
Eric Blankenhorn
494febb3fb Documentation for wolfSSL_CertManagerFreeCRL 2023-05-16 09:44:00 -05:00
JacobBarthelmeh
00f1eddee4 add tls extension sanity check 2023-05-15 15:49:44 -07:00
Lealem Amedie
1c3fa38821 Fix for conflicting types for HAL timer 2023-05-15 14:12:53 -06:00
Lealem Amedie
3f795f2f47 Fixes for wolfcrypt test without ECC SECP 2023-05-15 14:12:24 -06:00
David Garske
c2a7397425
Merge pull request #6406 from JacobBarthelmeh/fuzzing
check for socket errors on SendAlert
2023-05-15 09:16:20 -07:00
JacobBarthelmeh
c17cff7265
Merge pull request #6403 from kareem-wolfssl/gh6387
Fix wolfssl_asn1_time_to_tm setting unexpected fields in tm struct.
2023-05-12 16:37:17 -06:00
Chris Conlon
a474179cdf
Merge pull request #6301 from miyazakh/ra_cryptonly
Add Renesas SCE RSA Crypt Only support
2023-05-12 16:32:15 -06:00
Kareem
f1ad37919d Add test case for ASN1_TIME_to_tm fix. 2023-05-12 14:30:55 -07:00
JacobBarthelmeh
1b6ab01d0b
Merge pull request #6407 from dgarske/stm32_cleanup
Remove STM AES always true check
2023-05-12 13:54:24 -06:00
JacobBarthelmeh
9cca571c1d
Merge pull request #6399 from bigbrett/zd16083-ocsp-double-free
fix double free in InitOCSPRequest
2023-05-12 13:50:54 -06:00
David Garske
bebf4f6e8b
Merge pull request #6405 from julek-wolfssl/zephyr-misc
Small fixes to build wolfSSL on zephyr without warnings
2023-05-12 12:33:01 -07:00
lealem47
79a5c49e47
Skip Async_DevCtxInit when using init rsa/ecc label/id api's (#6393)
* Skip Async_DevCtxInit when using init rsa/ecc label/id api's

---------

Co-authored-by: Lealem Amedie <lealem47@github.com>
2023-05-12 11:54:03 -07:00
JacobBarthelmeh
ea40176bee check for socket errors on SendAlert 2023-05-12 09:52:01 -07:00
JacobBarthelmeh
56cd8c3dc1
Merge pull request #6401 from anhu/doc_ptr_fix
Doc Fix: TI no longer maintains the documentation; we do.
2023-05-12 09:20:37 -06:00
Juliusz Sosinowicz
62db14e676 Small fixes to build wolfSSL without warnings 2023-05-12 13:24:21 +02:00
David Garske
a68b0d8ecf
Merge pull request #6402 from lealem47/no_ecc_secp
Don't test SECP vectors when disabled in test.c
2023-05-11 17:25:42 -07:00
Kareem
6930179b8e Fix wolfssl_asn1_time_to_tm setting unexpected fields in tm struct. 2023-05-11 15:15:46 -07:00
Lealem Amedie
9a2dc120c4 Don't test SECP vectors when disabled in test.c 2023-05-11 14:21:39 -06:00
Anthony Hu
ced8198737 Doc Fix: TI no longer maintains the documentation; we do. 2023-05-11 15:23:35 -04:00
Brett Nicholas
46dce4b33f set pointer to null after freeing in InitOcspRequest() to prevent a subsequent double-free in FreeOcspRequest() 2023-05-11 12:59:25 -06:00
David Garske
dbb5ee3b1e
Merge pull request #6389 from JacobBarthelmeh/devid
always call crypto cb when compiled in
2023-05-11 11:48:30 -07:00
David Garske
6a48539309
Merge pull request #6398 from douzzer/20230511-analyzer-carps
20230511-analyzer-carps
2023-05-11 11:47:23 -07:00
David Garske
dfbd61cad9 Remove always true check. 2023-05-11 11:38:12 -07:00
Daniel Pouzzner
3c06638115 wolfcrypt/src/aes.c: fixes for bugprone-macro-parentheses;
wolfcrypt/src/ecc.c: fix for nullPointerRedundantCheck ("possible null pointer dereference").
2023-05-11 11:51:27 -05:00
JacobBarthelmeh
07c41c5498 add macro guard on test case 2023-05-10 15:51:39 -07:00
JacobBarthelmeh
bab35c4de2 add WOLF_CRYPTO_CB_FIND macro to guard find device ID callback 2023-05-10 15:28:19 -07:00
David Garske
870f7cc95b
Merge pull request #6394 from douzzer/20230509-THIS_MODULE-mem-and-more-Wconversion
20230509-THIS_MODULE-mem-and-more-Wconversion
2023-05-10 10:19:25 -07:00
JacobBarthelmeh
04e831fa63
Merge pull request #6309 from SparkiDev/aes_cache_touch_lines
AES: touch each cache line when getting offset from table
2023-05-10 09:56:27 -06:00
JacobBarthelmeh
c953716367
Merge pull request #6391 from rizlik/dtls13-label-fix
dtls13: fix: use correct label to derive resumption key
2023-05-10 08:06:27 -06:00
JacobBarthelmeh
c26a5f7514
Merge pull request #6390 from lealem47/no_asn_time
Fix for compiling with NO_ASN_TIME + doc fix
2023-05-10 08:02:45 -06:00
Marco Oliverio
5773252e33 test: add check that CH with epoch != 0 are ignored 2023-05-10 13:54:25 +00:00
Marco Oliverio
6c8811a737 dtls13: fix: check plaintext record header epoch is 0
In DTLS v1.3 the normal (plaintext) record header can be used only with
unprotected message (epoch == 0). Protected messages use the unified header.

Check this invariant using `IsAtLeastTLSv1_3` instead of `ssl->options.tls1_3`
because the latter is false before version negotiation.

In DTLSv1.2 the DTLS normal header is used for all the epoch, this check doesn't
interfere because:
1. the first CH's epoch must be zero in all DTLS versions
2. In case of downgrade after version negotiation `IsAtLeastTLSv1_3` is false
2023-05-10 13:54:25 +00:00