19652 Commits

Author SHA1 Message Date
Anthony Hu
3e58e47856 Documentation fixup for wolfSSL_get_chain_cert(); 2023-04-05 15:12:43 -04:00
Daniel Pouzzner
cf173e7b7d
Merge pull request #6270 from julek-wolfssl/fix-test_wolfSSL_dtls_stateless_HashWOLFSSL
Ignore staticBuffer in test_wolfSSL_dtls_stateless_HashWOLFSSL
2023-04-05 12:53:11 -05:00
Eric Blankenhorn
d9bf93b49f Support HAVE_SESSION_TICKET without realloc 2023-04-05 11:33:06 -05:00
András Fekete
3b934b858e
Merge pull request #6268 from SparkiDev/asn1_test_0_len
ASN.1 testing: restore 0 length BIO failure tests
2023-04-05 11:14:50 -04:00
gojimmypi
bb32b6a927 mp_setneg(Z), not mpi 2023-04-05 17:10:37 +02:00
JacobBarthelmeh
6a52c727f6
Merge pull request #6267 from SparkiDev/openssl_cryptonly
OpenSSL API and cryptonly: fix to compile
2023-04-05 09:08:32 -06:00
Anthony Hu
c9e467b734 Allow user to override XSTAT 2023-04-05 10:39:16 -04:00
Juliusz Sosinowicz
171c217ae5 Add in-place support for DES_ede3_cbc_encrypt 2023-04-05 15:50:51 +02:00
Juliusz Sosinowicz
c5f03e43cf Ignore staticBuffer in test_wolfSSL_dtls_stateless_HashWOLFSSL 2023-04-05 14:23:19 +02:00
Juliusz Sosinowicz
a51daf1bfa Fix intermittent failures in test_wolfSSL_CTX_add_session 2023-04-05 13:57:10 +02:00
Sean Parkinson
9eac521521 ASN.1 testing: restore 0 length BIO failure tests
Create a fixed buffer BIO of length 1 and then write one byte into it so
that there is 0 length to write into.
Test cases removed as setting fixed buffer BIO to length 0 allocated 0
length buffer that is sometimes returning NULL.
2023-04-05 10:29:46 +10:00
Sean Parkinson
10c1009bbd
Merge pull request #6127 from JacobBarthelmeh/qnx
IMX6Q CAAM Port
2023-04-05 08:44:00 +10:00
Hideki Miyazaki
9eb3c4d31a
fix unitest failure 2023-04-05 07:25:25 +09:00
Sean Parkinson
b30c8b1fca OpenSSL API and cryptonly: fix to compile
OBJ_nid2sn not available when compiling for cryptonly - don't compile in
call to it in test.h.
2023-04-05 08:02:20 +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
ffcc66bb53 Add explicit casts 2023-03-31 11:48:18 +02:00
Juliusz Sosinowicz
4ddc975aca Expand asyn-check script 2023-03-31 11:25:46 +02:00
Hideki Miyazaki
27f5f3a3e8
fix overwriting serialnum by favouriteDrink 2023-03-31 15:56:31 +09: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