Commit Graph

19532 Commits

Author SHA1 Message Date
Juliusz Sosinowicz
a51daf1bfa Fix intermittent failures in test_wolfSSL_CTX_add_session 2023-04-05 13:57:10 +02:00
Sean Parkinson
10c1009bbd Merge pull request #6127 from JacobBarthelmeh/qnx
IMX6Q CAAM Port
2023-04-05 08:44:00 +10:00
JacobBarthelmeh
b8e61a241b Merge pull request #6257 from kareem-wolfssl/micriumFixes
Micrium settings fixes
2023-04-04 11:09:49 -06:00
JacobBarthelmeh
539c562ecd Merge pull request #6263 from julek-wolfssl/fix-docs-wolfSSL_set_dtls_fd_connected
Add missing semicolon
2023-04-04 10:49:02 -06:00
JacobBarthelmeh
cb422bfaf7 Merge pull request #6242 from julek-wolfssl/harden-tls
Implement TLS recommendations from RFC 9325
2023-04-04 10:13:27 -06:00
Juliusz Sosinowicz
027c8ed926 Add missing semicolon 2023-04-04 16:59:28 +02:00
David Garske
a4a6a05f06 Merge pull request #6251 from PrinceOfPuppers/master
updated zephyr includes
2023-04-03 16:25:32 -07:00
JacobBarthelmeh
e4f75afe5f update README 2023-04-03 16:41:09 -06:00
JacobBarthelmeh
f9f1347e8d third optimization pass with aes-ctr 2023-04-03 16:41:09 -06:00
JacobBarthelmeh
14b0f422c8 optimization pass through 2 2023-04-03 16:41:08 -06:00
JacobBarthelmeh
5882b8f68a cleanup user_settings example file 2023-04-03 16:41:08 -06:00
JacobBarthelmeh
30adcd58d8 IMX6Q CAAM Port 2023-04-03 16:41:08 -06:00
David Garske
b1e4d4922e Merge pull request #6259 from SparkiDev/cppcheck_fixes_9
cppcheck fixes
2023-04-03 15:35:35 -07:00
David Garske
b6ab7a9d56 Merge pull request #6261 from douzzer/20230331-fixes
20230331-fixes
2023-04-03 14:56:16 -07:00
Daniel Pouzzner
c08878ac94 configure.ac: include both -I. and -I$srcdir for "circular dependency" test, so that ${build_pwd}/wolfssl/options.h is found in out-of-tree builds; streamline scripting that dynamically sets $TRIM;
linuxkm/module_exports.c.template: include wolfssl/wolfcrypt/wolfmath.h, to bring in wc_GetMathInfo() prototype;

src/ssl.c: move "Global pointer to constant BN on" to src/ssl_bn.c; and in wolfSSL_Cleanup(), call the new wolfSSL_BN_free_one() rather than using ad hoc cleanup logic;

src/ssl_bn.c: add bn_one and wolfSSL_BN_free_one();

src/ssl_asn1.c: fix bugprone-macro-parentheses in bufLenOrNull(); refactor wolfSSL_ASN1_TIME_diff() to avoid floating point math; use intermediate tm_year variable in wolfssl_asn1_time_to_tm() to avoid target-specific type conflicts on tm->tm_year; use "FALL_THROUGH", not "/* fall-through */", in wolfSSL_ASN1_TYPE_set (clang-diagnostic-implicit-fallthrough);

wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mul2add();

wolfcrypt/src/integer.c: refactor OPT_CAST()s in mp_grow() to unconditional casts as elsewhere, to mollify a confused cppcheck-all-intmath;

tests/api.c: reformat some overlong lines.
2023-04-03 15:49:39 -05:00
Juliusz Sosinowicz
505ab746c6 Tabs -> spaces 2023-04-03 18:24:01 +02:00
Sean Parkinson
8851065848 cppcheck fixes
Fix checking of negative with unsigned variables.
Check digestSz for 0 in wc_SSH_KDF() so that no possibility of dividing
by zero.
Change XMEMCPY to XMEMSET in renesas_sce_util.c.
Fix test.c to free prvTmp and pubTmp on read error.
Remove unused variables.
XFREE checks for NULL so don't check before call.
Move variable declarations to reduce scope.
2023-04-03 16:59:58 +10:00
Kareem
a64fba93cb Micrium: Add missing XATOI/XSTRTOK definitions, update XMEMMOVE function. 2023-03-31 17:33:33 -07:00
David Garske
2ad0659fa4 Merge pull request #6255 from julek-wolfssl/fix-ssl_asn1
Add missing guards
2023-03-31 13:54:25 -07:00
Andras Fekete
c56e58db5b Remove TODO+bad tests 2023-03-31 15:51:28 -04:00
Andras Fekete
18f4b45129 Fix object size 2023-03-31 15:44:25 -04:00
Andras Fekete
80a0fb548a Zero buffer size test should be implemented another way 2023-03-31 15:44:13 -04:00
David Garske
753ad4c4c1 Merge pull request #6253 from JacobBarthelmeh/CAAM
resolve warning about uninitialized variable
2023-03-31 10:50:28 -07:00
JacobBarthelmeh
35611cad96 Merge pull request #6252 from julek-wolfssl/async-test-action
Initial async test with gh action
2023-03-31 11:33:32 -06:00
Andras Fekete
c8e1731cb7 Fix dependency issues 2023-03-31 13:21:13 -04:00
JacobBarthelmeh
74e6f0d337 Merge pull request #6243 from julek-wolfssl/reuse-wolfssl-builds
actions: Build wolfSSL in seperate job
2023-03-31 09:26:43 -06:00
Andras Fekete
7138b66b5e Compiler error 2023-03-31 11:22:58 -04:00
Juliusz Sosinowicz
9f41ed8c72 Add missing guards 2023-03-31 16:11:58 +02:00
Juliusz Sosinowicz
8f8153220b Remove trailing whitespace 2023-03-31 13:29:42 +02:00
Juliusz Sosinowicz
f1a93f524d Tabs -> spaces 2023-03-31 11:51:49 +02:00
Juliusz Sosinowicz
4ddc975aca Expand asyn-check script 2023-03-31 11:25:46 +02:00
David Garske
00e3dcfab5 Merge pull request #6226 from SparkiDev/asn1_move
Move ASN.1 APIs out to separate file: ssl_asn1.c
2023-03-30 18:22:13 -07:00
Sean Parkinson
8489095057 Move ASN.1 APIs out to separate file: ssl_asn1.c
Implementations of ASN.1 APIs reworked.

Added tests.

Added wolfssl_bn_set_neg for ASN.1 code.
Added wolfssl_sk_new_type() and wolfssl_sk_pop_type() to generically
handle creating and popping a stack of elements of a type.

No longer freeing pathlen field of ASN1 OBJECT in
wolfSSL_X509_EXTENSION_free(). This is happening in
wolfSSL_ASN1_OBJECT_free().
Stop wolfSSL_i2d_X509_NAME_canon from double freeing ASN.1 STRING's data
field.

Fixed up GetFormattedTime() to be better code.
Added ASN_CLASS_MASK to mask off the class part of an ASN.1 tag.
NO_ASN_TIME means no implementation to get the current time. Disable
features that won'r work without time.
2023-03-31 09:36:01 +10:00
Sean Parkinson
6bed0c5757 Merge pull request #6123 from dgarske/math_info
Add introspection for math build and math cleanups
2023-03-31 09:15:48 +10:00
Chris Conlon
7fae945ee6 Merge pull request #6214 from miyazakh/altname_next_reset 2023-03-30 16:58:09 -06:00
David Garske
22a5a5c45e Add introspection for math build and math cleanups:
* Add introspection for math build.
* Raise build error if more than one multi-precision math library used.
* Fix ESP32 to support using any multi-precision math option.
* Refactor math headers to use `wolfmath.h`
* Refactor of the opaque math variable type `MATH_INT_T` used by crypto hardware (QuickAssist, SE050, ESP32 and STM32).
* Cleanups for building with `WOLFCRYPT_ONLY` and `NO_BIG_INT`.
* Stop forcing use of fast math by default for platforms in settings.h. Note: For users that still want to use fast math (tfm.c) they will need to add USE_FAST_MATH to their build settings.

Applies To:
```
WOLFSSL_ESPWROOM32
WOLFSSL_ESPWROOM32SE
MICROCHIP_PIC32
WOLFSSL_PICOTCP_DEMO
WOLFSSL_UTASKER
WOLFSSL_NRF5x
FREERTOS_TCP
WOLFSSL_TIRTOS
EBSNET
FREESCALE_COMMON
FREESCALE_KSDK_BM
WOLFSSL_DEOS
MICRIUM
WOLFSSL_SGX
```
2023-03-30 14:42:55 -07:00
Jacob Barthelmeh
f7d3ce7843 resolve warning about uninitialized variable 2023-03-30 11:44:08 -06:00
Juliusz Sosinowicz
27794c4b7e Initial async test with gh action 2023-03-30 19:33:54 +02:00
Juliusz Sosinowicz
9120712438 Address code review 2023-03-30 15:35:52 +02:00
Juliusz Sosinowicz
4338ed9b7b Add missing define 2023-03-30 14:56:31 +02:00
Sean Parkinson
0210dcd98d Merge pull request #6240 from kaleb-himes/wolfEntropy-work
Fix a typo in PP macro and add a ceiling to guard against implementation bugs
2023-03-30 12:33:01 +10:00
PrinceOfPuppers
9b1aed0c82 updated zephyr includes 2023-03-29 22:22:31 -04:00
David Garske
a8ca958855 Merge pull request #6248 from JacobBarthelmeh/fips
visibility is dependent on macros that could be set in user_settings.h
2023-03-29 16:32:29 -07:00
David Garske
5d1a914ebd Merge pull request #6247 from JacobBarthelmeh/config
check if colrm is available for options.h creation
2023-03-29 15:19:14 -07:00
Jacob Barthelmeh
951b5bc77c visibility is dependent on macros that could be set in user_settings.h 2023-03-29 16:14:54 -06:00
JacobBarthelmeh
e1730c760c check if colrm is available for options.h creation 2023-03-29 14:11:56 -07:00
David Garske
68d6ce647d Merge pull request #6227 from julek-wolfssl/hwsim-retry
Retry hwsim tests 3 times on fail
2023-03-29 12:34:19 -07:00
David Garske
8b34ad7c4d Merge pull request #6245 from lealem47/asyncRelease
Fixes for the async release
2023-03-29 12:33:57 -07:00
Lealem Amedie
8e730534d5 Free in drbg test when appropriate 2023-03-29 10:26:59 -06:00
David Garske
3841b559ec Merge pull request #6246 from SparkiDev/siphash_asm_fix
siphash: fix assembly so that no register is left behind
2023-03-29 09:23:38 -07:00