jordan
db28d38ea3
Fix fastmath and heapmath invmod to be consistent with sp-math.
2023-06-02 22:11:44 -05: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
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
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
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
Sean Parkinson
403acadf1a
X509 NAME ENTRY create: ensure existing object is not lost
...
wolfSSL_X509_NAME_ENTRY_create_by_txt and
wolfSSL_X509_NAME_ENTRY_create_by_NID:
- object field was being reused if it existed but lost on error
- extracted common code
- store object only on success, ie object is not NULL
2023-05-22 10:52:51 +10:00
Sean Parkinson
d8e4c78960
Merge pull request #6426 from jpbland1/invariant-mp-size
...
add check to sp_invmod_mont_ct to make sure the
2023-05-22 08:14:39 +10:00
Daniel Pouzzner
3e14b34bdc
wolfssl/test.h: in wolfsentry_setup(), add lock-unlock wrap before wolfsentry_route_get_main_table() (enforced by wolfSentry 1.3+, and was always required for thread safety).
2023-05-21 10:51:24 -05:00
JacobBarthelmeh
a06bd777c0
Merge pull request #6423 from cconlon/pkcs7NoStream
...
Fix PKCS#7 build with NO_PKCS7_STREAM
2023-05-19 10:32:49 -06:00
JacobBarthelmeh
235dc95b27
Merge pull request #6420 from julek-wolfssl/atomic-use-macro
...
Implement atomic operations interface
2023-05-19 10:29:04 -06:00
David Garske
8b9e13865a
Merge pull request #6383 from philljj/zd16072
...
Fix session ticket leak in wolfSSL_Cleanup
2023-05-19 09:14:07 -07:00
JacobBarthelmeh
8f4524efa0
Merge pull request #6298 from rizlik/dtls13-null-cipher
...
dtls13: support Authentication and Integrity-Only Cipher Suites
2023-05-19 10:13:44 -06:00
David Garske
10b6105505
Merge pull request #6424 from SparkiDev/coverity_2
...
Coverity scan fixes
2023-05-19 09:13:26 -07:00
John Bland
7e3aafb60c
Fix for FIPS ECC integrity check with crypto callback set ( #6425 )
...
Skip ECC private key check when the TPM is used to generate the key, since it doesn't release the private part. this option needs to be used with a FIPS approved TPM for the end result to be FIPS approved
2023-05-19 09:12:44 -07:00
John Bland
344c3338a9
add check to sp_invmod_mont_ct to make sure the
...
result integer can hold the range of the modulus
2023-05-19 10:49:42 -04:00
András Fekete
f3b66a3e26
Merge pull request #6427 from SparkiDev/scan-build_fixes_1
...
scan-build fixes
2023-05-19 10:46:00 -04:00