Chris Conlon
806c75d28b
Merge pull request #6450 from miyazakh/fix_jenkins_android
...
fix to cast diff type, int and uint
2023-06-01 08:33:02 -06:00
Sean Parkinson
5ffee2dbe1
Merge pull request #6459 from douzzer/20230531-analyzer-guided-fixes
...
20230531-analyzer-guided-fixes
2023-06-01 10:55:48 +10:00
Daniel Pouzzner
c45efd79af
api.c: fix 3 missed EXPECT_RESULT() == WOLFSSL_SUCCESSes to use the succincter EXPECT_SUCCESS().
2023-05-31 18:26:27 -05:00
JacobBarthelmeh
42a5d0320b
Merge pull request #6445 from jpbland1/dsa_ex
...
add ex functions to use other digest algorithms with DSA
2023-05-31 14:50:05 -06:00
Daniel Pouzzner
59a7c0d7e4
move definitions of XASM_LINK() from wolfcrypt/src/aes.c, wolfcrypt/src/asm.c, and wolfcrypt/src/cpuid.c, to wolfssl/wolfcrypt/types.h, and use __asm__() instead of asm() if __GNUC__, for compatibility with -std=c99.
2023-05-31 15:48:52 -05:00
Daniel Pouzzner
64c9026c77
wolfssl/wolfcrypt/types.h: add PRAGMA_DIAG_PUSH, PRAGMA(), and PRAGMA_DIAG_POP(), using the gcc or clang variants as applicable, to facilitate pragmas to be used on both gcc and clang;
...
tests/unit.h: fix ExpectPtr() to inhibit pedantic warnings on both gcc and clang;
wolfssl/test.h: in myVerify(), explicitly check for nullness when printing issuer/subject, to avoid cppcheck null-deref warning;
tests/api.c: fixes for:
* myriad "embedding a directive within macro arguments is not portable"
* an "ISO C forbids conversion of object pointer to function pointer type"
* some "stringop-overflow"s
* a clang-analyzer-core.uninitialized.Assign
* a clang-analyzer-core.CallAndMessage "2nd function call argument is an uninitialized value"
* a nullPointerRedundantCheck
* several clang-diagnostic-declaration-after-statement
* a spurious gcc sanitizer maybe-uninitialized in test_wolfSSL_CheckOCSPResponse()
2023-05-31 15:19:15 -05:00
Daniel Pouzzner
109a17f3bd
wolfcrypt/src/memory.c: restore required linuxkm #define WOLFSSL_NEED_LINUX_CURRENT
2023-05-31 15:17:01 -05:00
JacobBarthelmeh
80311975ce
Merge pull request #6452 from anhu/no_rsa_sigalgs
...
For NO_RSA, don't advertise support for RSA.
2023-05-31 13:41:56 -06:00
Hideki Miyazaki
554e6472b5
addressed review comments
2023-05-31 06:54:14 +09:00
JacobBarthelmeh
5604033902
Merge pull request #6453 from kaleb-himes/OE52_OE54_CHECKIN
...
Checkin STARCORE project OE52_OE54_ACVP effort
2023-05-30 14:43:25 -06:00
JacobBarthelmeh
ca2ca4f739
Merge pull request #6454 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos in src and wolfssl.
2023-05-30 14:42:04 -06:00
Chris Conlon
769c488d18
Merge pull request #6444 from night1rider/wolfssl-Onboarding
...
added test case for wolfSSL_configure_args
2023-05-30 13:03:05 -06:00
jordan
1bdd1cb157
Used codespell and fixed obvious typos in src and wolfssl.
2023-05-30 11:36:43 -05:00
kaleb-himes
f51d4c4c30
Checkin STARCORE project OE52_OE54_ACVP effort
2023-05-30 10:36:01 -06:00
Anthony Hu
ea6155c924
For NO_RSA, don't advertise support for RSA.
2023-05-30 12:34:23 -04:00
JacobBarthelmeh
dbca65f028
Merge pull request #6447 from SparkiDev/tests_api_expect
...
Tests api.c: rework for malloc failure testing
2023-05-30 09:19:54 -06:00
Hideki Miyazaki
63a5fe3229
fix to cast diff type, int and uint
2023-05-30 17:32:42 +09:00
Sean Parkinson
541ea51ad5
Tests api.c: rework for malloc failure testing
...
Modified number of tests to not crash on failure and cleanup allocations
on failure.
Added memory fail count option to set which memory allocation to start
failing on.
Fix issues found from testing.
bio.c:
BIO_new() move ref count up so that calls to wolfSSL_BIO_free()
work.
internal.c:
ImportCipherSpecState wasn't checking SetKeySide for failure. Crash
when pointer is NULL and accessed directly.
ocsp.c:
wolfSSL_OCSP_response_get1_basic() doesn't need to free vs->source
as it is freed in WOLFSSL_OCSP_RESPONSE_free().
ssl.c:
ProcessBuffer() Don't strip PKCS#8 header if failed to create DER.
Crasged as directly accessing 'der' which was NULL.
ssl_asn.c:
wolfssl_asn1_integer_require_len was checking wrong variable to see
if allocation failed.
x509,c:
wolfSSL_X509_ALGOR_set0 needs to set aobj only when no failure
possible.
wolfSSL_X509_chain_up_ref needs to call cleanup to ensure everything
is freed.
2023-05-30 12:01:21 +10:00
Sean Parkinson
37c03e3f11
Merge pull request #6442 from embedded-specialties/int-sequence
...
ASN.1 Integer sequence
2023-05-30 09:37:55 +10:00
David Garske
4f8419c641
Merge pull request #6441 from SparkiDev/cryptocb_pkcs11_rsa_get_size
...
CryptoCb, PKCS#11: add RSA key size lookup
2023-05-29 16:09:33 -07:00
Joe Hamman
d340587035
Added valid ASN.1 integer value to test_asn1
2023-05-28 21:18:45 -04:00
Joe Hamman
8fb4e7813b
Added braces to support older compilers
2023-05-28 18:59:16 -04:00
dell5060
c0116d6026
added test case for wolfSSL_configure_args and added fix
...
new fix
removing redundant () in code
2023-05-26 16:45:13 -06:00
JacobBarthelmeh
5a49b8c436
Merge pull request #6449 from anhu/syn_err
...
Fix a syntax error.
2023-05-26 15:55:36 -06:00
Anthony Hu
87bbcbb96a
Fix a syntax error.
...
Tested with:
./configure --enable-debug --enable-all CFLAGS=-DDEBUG_WOLFSSL_VERBOSE
2023-05-26 16:12:14 -04:00
JacobBarthelmeh
569a498015
Merge pull request #6443 from SparkiDev/wolfssl_x509_name_entry_leak_2
...
X509 NAME Entry: fix get object to not leak
2023-05-25 16:15:12 -06:00
John Bland
566fa1179f
add ex functions to use other digest algorithms
2023-05-25 12:50:23 -04:00
JacobBarthelmeh
a05f4f4dd9
Merge pull request #6432 from SparkiDev/wolfssl_x509_name_entry_leak
...
X509 NAME ENTRY create: ensure existing object is not lost
2023-05-25 09:28:45 -06:00
JacobBarthelmeh
6b2fe61d95
Merge pull request #6439 from lealem47/asio_cmake
...
CMake: add option to enable asio
2023-05-25 09:26:06 -06:00
Sean Parkinson
cff8e8e6f7
X509 NAME Entry: fix get object to not leak
...
wolfSSL_X509_NAME_ENTRY_get_object
- object field was being reused if it existed but lost on error
- store object only on success, ie object is not NULL
- moved function into x509.c
2023-05-25 09:26:22 +10:00
David Garske
e3be76b238
Merge pull request #6435 from SparkiDev/sp_int_count_bits_cleanup
...
SP int: cleanup sp_count_bits
2023-05-24 15:11:12 -07:00
Joe Hamman
2c59bec72c
Fixed typo in comment
2023-05-24 17:37:51 -04:00
Joe Hamman
8bd3850e58
Added ASN.1 Integer sequencing
2023-05-24 17:28:53 -04:00
Lealem Amedie
98522fa39d
Only clear last ASN_PEM_NO_HEADER error
2023-05-24 14:17:46 -06:00
JacobBarthelmeh
1218cfb7f2
Merge pull request #6087 from rizlik/embed_recv_from_fix_peer
...
dtls: improve different peer recvfrom and better error reporting on ipv6
2023-05-24 13:54:40 -06:00
Lealem Amedie
34c12789c9
CMake: add option to enable asio
2023-05-24 12:46:11 -06:00
JacobBarthelmeh
188a99bd5a
Merge pull request #6438 from anhu/ext_cache
...
Without HAVE_EXT_CACHE session dup is not compiled in
2023-05-24 11:15:00 -06:00
Anthony Hu
87a7af05dd
Without HAVE_EXT_CACHE session dup is not compiled in
2023-05-24 12:14:02 -04:00
Sean Parkinson
e954110cc5
CryptoCb, PKCS#11: add RSA key size lookup
...
wc_RsaEncryptSize(): assumed a key size of 2048 when using hardware key.
Added callback to do lookup and implemented for PKCS#11.
If lookup not supported then assumes 2048 bits.
2023-05-24 11:42:52 +10:00
David Garske
9d01411857
Merge pull request #6433 from SparkiDev/memusage_7
...
Memory usage: reduce stack usage
2023-05-22 16:35:04 -07:00
Sean Parkinson
622375b47e
SP int: clenaup sp_count_bits
...
More explicitly handle used == 0 for static code analyser.
Make sp_count_bits clearer.
2023-05-23 09:20:22 +10:00
David Garske
5a59807733
Merge pull request #6431 from douzzer/20230521-wolfsentry-mt-usage-fixes
...
20230521-wolfsentry-mt-usage-fixes
2023-05-22 10:05:52 -07:00
Marco Oliverio
5182fe3f7d
wolfio: cleaning: use WOLFSSL_IP6 define instead of AF_INET6
2023-05-22 15:33:06 +00:00
Marco Oliverio
f21c34b08d
tests: EmbedRecvFrom/EmbedSendTo error if ipv6 w/o ipv6 compiled in
2023-05-22 15:33:06 +00:00
Marco Oliverio
640f9cf967
wolfio: EmbedRecvFrom: check ipv6 peer on non-ipv6 version
2023-05-22 15:33:05 +00:00
Marco Oliverio
b4542ed270
tests: add dtls ignoring different peer test
2023-05-22 15:32:57 +00:00
Marco Oliverio
73f502e189
wolfio: dtls: retry instead of returning WANT_READ on different peer
...
If EmbedReceiveFrom() returns WANT_READ, a blocking socket will not know how to
deal with the error. Retry the recvfrom instead adjusting the timeout.
2023-05-22 15:31:58 +00:00
Marco Oliverio
5f293bf736
tests: add test_wolfssl_client_server_no_fail(_ex) to set client cb
2023-05-22 15:31:58 +00:00
Marco Oliverio
cff580b4f0
tests: api: error out on read error in test_server_nofail
2023-05-22 15:31:58 +00:00
Sean Parkinson
98a717e1d5
Memory usage: reduce stack usage
...
AES C impl: don't align to 32 bytes, align to 16 as buffer is 16 bytes
long.
SP int: Don't call _sp_mulmod but call sp_mul and _sp_div to do mod
operation. For RSA, fewer calls for mod operation means less stack used
at deepest point.
2023-05-22 16:57:07 +10:00