19652 Commits

Author SHA1 Message Date
Juliusz Sosinowicz
c9d91c5e79 Zephyr port update
- Add CONFIG_PTHREAD_IPC when using threads
- Add logging config suggestions
- test.c: fix undefined `ret` error
- Increase stack size for samples
- Ignore ASN_BEFORE_DATE_E in examples
- wc_port.h: add missing posix thread includes
- wc_port.h: move definitions to relevant section
- benchmark.c: fix missing `arc` and `argv` errors
- benchmark.c: fflush does not work on stdout in Zephyr
- Update z_fs_open implementation to support flags
2023-04-19 18:18:00 +02:00
Chris Conlon
81ab16b105
Merge pull request #6314 from TakayukiMatsuo/vla2 2023-04-19 08:11:40 -06:00
gojimmypi
510038022f
Various Espressif HW crypto, SHA2, AES, MP updates. (#6287)
* various Espressif HW crypto, SHA2, AES, MP updates.

* code review updates & cleanup

* clean trailing whitespace

* cleanup per code review

* removed additional unused WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW

* Code review updates; pack & order WC_ESP32SHA

* clean up TAG text for Espressif ESP_LOG()
2023-04-19 06:10:22 -07:00
David Garske
70322f620d
Merge pull request #6303 from douzzer/20230414-yet-more-c89
20230414-yet-more-c89
2023-04-18 16:00:12 -07:00
David Garske
3a2bcf080b
Merge pull request #6276 from anhu/zephyr_stm32
Add in instructions for compiling with zephyr on STM32.
2023-04-18 14:50:53 -07:00
David Garske
243665fe37
Merge pull request #6315 from anhu/stm32_gpdma
Instructions for GPDMA configuration
2023-04-18 14:50:25 -07:00
JacobBarthelmeh
c67de7f914
Merge pull request #6308 from SparkiDev/sp_mod_err_check
SP int: sp_mod check sp_div error before adding and replacing error
2023-04-18 15:44:50 -06:00
JacobBarthelmeh
8b79248eab
Merge pull request #6307 from SparkiDev/decode_ecdsa_sig_inited
ECC, ASN.1: DecodeECC_DSA_Sig didn't handle r and s being initialized
2023-04-18 15:43:42 -06:00
JacobBarthelmeh
a525fa19f4
Merge pull request #6306 from SparkiDev/wc_ecc_is_point_check_args
ECC: wc_ecc_is_point - validate parameters
2023-04-18 15:37:22 -06:00
Anthony Hu
d59724a0f3 Instructions for GPDMA configuration 2023-04-18 16:52:57 -04:00
Anthony Hu
b3b26dd266 Add in instructions for compiling with zephyr on STM32. 2023-04-18 16:19:32 -04:00
Daniel Pouzzner
fe3099b08e wolfssl/wolfcrypt/settings.h: add #ifdef _MSC_VER clause to define ssize_t, #ifndef HAVE_SSIZE_T. 2023-04-18 14:43:41 -05:00
TakayukiMatsuo
cc747f0094 Add WOLFSSL_SP_NO_DYN_STACK macro to avoid compilation error in CC-RX compiler 2023-04-19 04:39:49 +09:00
Daniel Pouzzner
f1a674eec9 wolfcrypt/src/wc_port.c: in wc_FileLoad(), use ssize_t for fileSz, not long int, for portability. 2023-04-18 14:30:38 -05:00
Daniel Pouzzner
b87c2fc621 fix null pointer deref (found by cppcheck:nullPointerRedundantCheck) in src/x509.c:wolfSSL_X509_EXTENSION_create_by_OBJ(). 2023-04-18 14:29:13 -05:00
Daniel Pouzzner
4180a650c8 fix clang-analyzer-deadcode.DeadStores in wolfcrypt/src/asn.c:SetOthername(). 2023-04-18 14:27:52 -05:00
Daniel Pouzzner
a4aef0e55d refinements from peer review for #6303. 2023-04-18 12:23:24 -05:00
Daniel Pouzzner
193919a276 add wc_strcasecmp() and wc_strncasecmp() to wc_port.c, and set up (USE_WOLF_STR[N]CASECMP) in types.h for targets lacking native implementations (including WOLF_C89);
define USE_WOLF_STRSEP if defined(WOLF_C89).
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
4b9302cdb3 another batch of -Wconversion fixes. 2023-04-18 12:23:24 -05:00
Daniel Pouzzner
42bea705d9 fix several more C89 "comma at end of enumerator list" spots in 64-bit-only headers, missed in earlier passes; in tests/unit.h, add a WOLF_C89 definition of AssertPtr() without pragmas, to avoid a -Wdeclaration-after-statement. 2023-04-18 12:23:24 -05:00
Daniel Pouzzner
730890b8cc wolfssl/wolfcrypt/sp_int.h: fix a missed bugprone-macro-parentheses in the C89 path. 2023-04-18 12:23:24 -05:00
Daniel Pouzzner
d91f0f82d8 wolfssl/wolfcrypt/misc.h: add missing argument names in NO_INLINE path. 2023-04-18 12:23:24 -05:00
Daniel Pouzzner
3d16ec8dc1 wolfssl/wolfcrypt/asn_public.h: fix version threshold for wc_RsaPrivateKeyValidate() prototype. 2023-04-18 12:23:24 -05:00
gojimmypi
98b718f91b
wolfcrypt polish: init, checks, corrections (#6249)
* wolfcrypt polish: init, checks, corrections
2023-04-18 09:41:42 -07:00
András Fekete
f7d7e4f30a
Merge pull request #6285 from gojimmypi/Espressif_VisualGDB
platform-specific VisualGDB test & benchmark projects
2023-04-18 11:52:29 -04:00
JacobBarthelmeh
ff13a7cdc8
Merge pull request #6250 from julek-wolfssl/fix-wolfSSL_DES_ede3_cbc_encrypt
Write next IV in wolfSSL_DES_ede3_cbc_encrypt
2023-04-18 09:33:10 -06:00
Sean Parkinson
59c113d358 SP int: sp_mod check sp_div error before adding and replacing error
Fix to not overwrite error when sp_div fails in sp_mod.
2023-04-18 09:38:13 +10:00
Sean Parkinson
eddcf0c0ee ECC, ASN.1: DecodeECC_DSA_Sig didn't handle r and s being initialized
New creation of mp_ints r and s to be minimal size must not be
re-initialized.
Changes to ASN.1 code to handle r and s being initialized and to not
initialize again.
2023-04-18 09:37:23 +10:00
Sean Parkinson
04ae676629 ECC: wc_ecc_is_point - validate parameters
Public API wc_ecc_is_point() needs to validate the parameters.
Ensure that the x and y are in range [0, p-1] and z is one (affine
ordinates).

Made the API a wrapper around existing calculation code.
When x-ordinate is a large negative, then it will spend large amounts of
time adding the prime to a large negative intermediate value.
2023-04-18 09:35:22 +10:00
JacobBarthelmeh
42b73ee326
Merge pull request #6277 from anhu/upnsid
Support UPN and SID.
2023-04-17 17:03:55 -06:00
Anthony Hu
120d1f0d1a Support in the compatibility layer for UPN and SID. 2023-04-17 14:42:27 -04:00
David Garske
91a2c9f18e
Merge pull request #6310 from julek-wolfssl/hostap-certs-update-2023
hostap/hwsim: use a custom commit to update the expired certs
2023-04-17 11:36:59 -07:00
Juliusz Sosinowicz
aa47a38a9e hostap/hwsim: use a custom commit to update the expired certs
- use 'theirs' merge strategy
2023-04-17 18:43:47 +02:00
David Garske
5938a40def
Merge pull request #6297 from JacobBarthelmeh/math
clean up NO_BIG_INT build, removing WOLFSSL_SP_MATH macro and heapmath compile
2023-04-17 07:44:20 -07:00
JacobBarthelmeh
ec78d1a4b8
Merge pull request #6293 from tim-weller-wolfssl/mynewt-updates
Update wolfCrypt porting layer for Mynewt OS to remove build warning.
2023-04-17 08:07:39 -06:00
Sean Parkinson
50e15dbb36
Merge pull request #6283 from cconlon/tls13resume12
In SendTls13ClientHello() only send Session ID for sessions being resumed (< TLS 1.3)
2023-04-17 12:21:11 +10:00
David Garske
6b12831dfb
Merge pull request #6302 from douzzer/20230413-more-wolfcrypt-c89
20230413-more-wolfcrypt-c89
2023-04-14 14:08:03 -07:00
Jacob Barthelmeh
cb9a121bd7 fix configure, compatibility layer needed big int. for BN use 2023-04-14 14:52:05 -06:00
Daniel Pouzzner
1bed740710 address peer review: make C89-compatible refactors in sakke_pairing() and sakke_modexp_loop(); add explanatory comment for WOLF_ENUM_DUMMY_LAST_ELEMENT() in types.h. 2023-04-14 15:07:05 -05:00
Eric Blankenhorn
39b81ce338
Merge pull request #6282 from dgarske/fix_heapmath
Fix for including integer.h when heap math is not used
2023-04-14 14:28:38 -05:00
Daniel Pouzzner
ac85cfa3d5 fix "comma at end of enumerator list" warnings in wolfcrypt for C89 compatibility, mostly by just snipping out unneeded comma, but several using WOLF_ENUM_DUMMY_LAST_ELEMENT() to preserve gated enum values as-is. 2023-04-14 13:48:03 -05:00
Daniel Pouzzner
2bcf6bd3ca wolfssl/wolfcrypt/types.h: add WOLF_ENUM_DUMMY_LAST_ELEMENT() macro, and disable HAVE_ANONYMOUS_INLINE_AGGREGATES ifdef WOLF_C89. 2023-04-14 13:47:47 -05:00
Daniel Pouzzner
d5588af0a2 wolfcrypt/src/sakke.c: fixes for C89 "initializer element is not computable at load time". 2023-04-14 13:29:26 -05:00
Daniel Pouzzner
105714460c wolfcrypt/src/fe_448.c: fix declaration-after-statement in fe448_mul_8(). 2023-04-14 13:29:26 -05:00
Daniel Pouzzner
edf95dbcbd add WOLF_C89 clauses to the W64LIT() definitions in wolfssl/wolfcrypt/types.h, and wrap several long long numeric literals with W64LIT() in wolfcrypt/src/{aes.c,blake2b.c,siphash.c};
add WOLF_C89 handling to SP_ULONG_BITS and SP_ULLONG_BITS setup in wolfssl/wolfcrypt/sp_int.h.
2023-04-14 13:29:26 -05:00
David Garske
bc3d070629
Merge pull request #6290 from embhorn/zd15969
Allow Micrium to use STM32_RNG
2023-04-14 10:59:50 -07:00
David Garske
deae28b9a3 Fix for building with heap math and including integer.h only. Fixes https://github.com/wolfSSL/wolfssl/issues/6280
```
./configure --enable-heapmath CFLAGS="-DWOLFSSL_PUBLIC_MP" && make && sudo make install
cd ../wolfssl-examples/ecc
make clean && make
```
2023-04-14 10:37:40 -07:00
JacobBarthelmeh
36a9b9944c fix guard on ECC export 2023-04-13 16:12:08 -07:00
JacobBarthelmeh
00aa061d77
Merge pull request #6300 from douzzer/20230413-fixes
20230413-fixes
2023-04-13 15:41:51 -06:00
JacobBarthelmeh
04ee247389 do not default to heapmath if no other math libraries found, add NO_BIG_INT as a math option in settings.h 2023-04-13 14:38:35 -07:00