20051 Commits

Author SHA1 Message Date
David Garske
abe1bce914 Fix silabs_ecc_export_public to set the signing only flag. Added tests cases for import of private and public only verify in the SiLabs example. 2023-07-07 08:25:46 -07:00
David Garske
caa0e5aabf Fix for silabs_ecc_export_public to set the type (curve). 2023-07-06 08:57:02 -07:00
David Garske
500b66eb36 Add API for exporting a SiLabs SE ECC key to a wolf ECC key (silabs_ecc_export_public). Add API for supporting export of a vault's public key. Add an ECC signature example for SiLabs. 2023-06-27 09:36:41 -07:00
David Garske
48dc288b83 Fix for wc_ecc_import_raw_private using 0 for key size. Add check in silabs_ecc. 2023-06-23 14:22:46 -07:00
David Garske
cde4e8e13d Fix for signing with vault to only use if private key is not supplied. Refactor the silabs ECC key import code. Added checks for all silabs_ecc return codes. 2023-06-23 14:22:45 -07:00
David Garske
fc153ff273 Support for Silicon Labs Gecko SDK v4. Changes SE Hash to use multipart API's. Gecko SDK v3 auto-detected or manually forced using WOLFSSL_SILABS_SE_ACCEL_3. 2023-06-23 14:22:44 -07:00
David Garske
83dca07421 Updated support for Silicon Labs Simplicity Studio and the ERF32 Gecko SDK. Fix ECC unused functions with HW crypto like SE. ZD 15874. 2023-06-23 14:20:40 -07:00
David Garske
033f56bfe9
Merge pull request #6534 from mitchcapper/basic_editorconfig_addition_pr
Basic editor config to avoid some whitespace issues
2023-06-23 11:49:27 -07:00
David Garske
102cb1114a
Merge pull request #6509 from douzzer/20230613-wc_test_ret_t
20230613-wc_test_ret_t
2023-06-23 11:47:20 -07:00
David Garske
ea68920b8b
Merge pull request #6539 from JacobBarthelmeh/caam
fix for keymod with rt1170 blobs
2023-06-23 11:47:04 -07:00
lealem47
06c1dd171a
Merge pull request #6466 from dgarske/keilmdk
Fixes and cleanups for Keil MDK examples
2023-06-23 08:41:04 -06:00
JacobBarthelmeh
2d87037e4b fix for keymod with rt1170 blobs 2023-06-23 00:50:25 -07:00
David Garske
746ac3c9a3
Merge pull request #6533 from anhu/no_data_junk
make sure that when TLSX_ALPN_GetRequest() returns, data and dataSz...
2023-06-22 22:11:02 -07:00
Lealem Amedie
6f2831a252 Document inline build error & fix 2023-06-22 16:48:17 -06:00
David Garske
255aa774f2 Updated Keil MDK documentation to note RTOS and TCP default dependency. Fix for inline error due to tracking code being available too broadly. Use current branch for makedistsmall.sh. 2023-06-22 16:48:17 -06:00
David Garske
a56fe30c2c Fixes and cleanups for Keil MDK examples. Combine duplicate user_settings.h. Use SP math all by default. Disable old/deprecated algorithms. Add CMSIS RTOS timer support for TLS and benchmark. 2023-06-22 16:48:17 -06:00
David Garske
2f44ece4d8
Merge pull request #6511 from JacobBarthelmeh/nightly
fix for nightly toolchain armv7 build warning
2023-06-22 15:25:57 -07:00
David Garske
33808c75f2
Merge pull request #6527 from philljj/zd16310
Fix ThreadSanitizer unlock of an unlocked mutex warning
2023-06-22 14:26:44 -07:00
Mitch Capper
20d706aad8 Basic editor config to avoid some whitespace issues 2023-06-22 14:06:46 -07:00
Anthony Hu
3e821c6f2b make sure that when TLSX_ALPN_GetRequest() returns data and dataSz are not pointing to junk. 2023-06-22 15:01:11 -04:00
jordan
2be3bb4c56 Fix ThreadSanitizer unlock of an unlocked mutex warning 2023-06-22 13:23:08 -05:00
David Garske
3cb0b4ab29
Merge pull request #6410 from embhorn/zd15856
Update EBSNET port
2023-06-21 21:35:19 -07:00
David Garske
6697181081
Merge pull request #6500 from SparkiDev/tests_api_expect_4
Test api.c: change more tests to use Expect instead of Assert
2023-06-21 17:17:37 -07:00
David Garske
fb35526b73
Merge pull request #6528 from kareem-wolfssl/trustedCaKeys
Fix trusted_ca_keys, refactor MAX_X509_SIZE
2023-06-21 17:07:55 -07:00
Kareem
e6017dc546 Refactor MAX_X509_SIZE into a define so it can be overriden in build settings. 2023-06-21 15:35:29 -07:00
Kareem
75c8d87353 Fix trusted_ca_keys extension allowed logic. 2023-06-21 15:35:29 -07:00
Sean Parkinson
e467112a93 Test api.c: change more tests to use Expect instead of Assert
Changed EXPECT_DECL to start of as TEST_SKIPPED.
Modified other EXPECT macros appropriately.
Change test functions to not use 'res' when EXPECT_DECL is used.

memory.c:
  wc_MemFailCount_Init(): don't declare variable after a statement

conf.c:
wolfSSL_TXT_DB_read(): free the whole WOLFSSL_TXT_DB on failure
instead of just the memory
wolfSSL_CONF_add_string(): pop the value added into section->value
(sk) if it can't be pushed onto conf->data
  wolfSSL_NCONF_load(): free the new value if it wasn't able to be added

ocsp.c:
  wolfSSL_OCSP_cert_to_id():
free the decoded certificate if parsing failed (is freed after use
otherwise)
free the certificate id on failure and make it NULL and continue
freeing other variables

pk.c:
wolfSSL_RSA_set0_crt_params(): set dmp1, dmq1 and iqmp fields to NULL
if setting the internal failed - returns error and caller needs to free
the passed in BNs
wolfSSL_RSA_set0_factors(): set p and q fields to NULL if setting the
internal failed - returns error and caller needs to free the passed in
BNs
wolfSSL_RSA_set0_key(): set n, e abd d fields to NULL if setting the
internal failed - returns error and caller needs to free the passed in
BNs

x509.c:
wolfSSL_X509_set_serialNumber(): explicit NULL
checkwolfSSL_X509_REQ_add1_attr_by_NID(): check whether push succeeded
and on failure free attribute

asn.c:
ConfirmSignature(): for DSA, allocate separately to ensure no leak on
memory allocation failure.

dh.c:
wc_DhGenerateParams(): ensure tmp and tmp2 are able to be cleared on
error

evp.c:
wolfSSL_EVP_PKEY_CTX_add1_hkdf_info(): fix realloc use to no leak on
failure
  wolfSSL_EVP_CIPHER_CTX_iv_length(): handle ctx being NULL.
2023-06-22 08:21:17 +10:00
Eric Blankenhorn
53fe93430e Update EBSNET port 2023-06-21 15:52:42 -05:00
David Garske
8473275fc6
Merge pull request #6529 from kareem-wolfssl/openwrt21.02Fix
Workaround for removed kmods repo in OpenWRT 21.02.
2023-06-21 13:19:40 -07:00
JacobBarthelmeh
2d28b492b0
Merge pull request #6501 from dgarske/ecc_comp
Fix for SP math all and ECC with compressed keys (missing sp_add_d)
2023-06-21 12:01:06 -07:00
Kareem
9f24217e26 Workaround for removed kmods repo in OpenWRT 21.02. 2023-06-21 11:53:30 -07:00
David Garske
1bff338e37
Merge pull request #6507 from bandi13/fix_certs_ocsp_renewcerts
Fix certs ocsp renewcerts
2023-06-21 11:26:59 -07:00
David Garske
9204101e94
Merge pull request #6517 from douzzer/20230615-opensslextra-wolfSSL_ERR_reason_error_string
20230615-opensslextra-wolfSSL_ERR_reason_error_string
2023-06-21 11:06:51 -07:00
David Garske
aaf2408851
Merge pull request #6504 from SparkiDev/bench_embedded_scrypt
test.c, scrypt: bench embedded reduce heap usage
2023-06-21 11:06:26 -07:00
David Garske
0e2c32f726
Merge pull request #6505 from SparkiDev/alt_ecc_cryptocb
ECC, ALT_ECC_SIZE, CryptoCB: ensure err is 0 in _ecc_make_key_ex
2023-06-21 11:05:53 -07:00
David Garske
70c3e84735
Merge pull request #6503 from SparkiDev/mp_test_tfm_mips
TFM: fix big endian reading a zero length buffer
2023-06-21 11:05:40 -07:00
David Garske
3b3c175af0
Merge pull request #6521 from ejohnstown/readme
Update Readme
v5.6.3-stable
2023-06-18 21:16:56 -07:00
John Safranek
c322e1f7f8
update readme 2023-06-18 20:24:28 -07:00
David Garske
d967aae501
Merge pull request #6518 from ejohnstown/release-5.6.3
Release 5.6.3
2023-06-16 12:08:23 -07:00
John Safranek
42e934b251
Update read-me and change-log for the release. 2023-06-16 09:47:35 -07:00
David Garske
4741a0b696
Merge pull request #6508 from JacobBarthelmeh/fuzzing
sanity check on send fatal alert return
2023-06-15 20:13:49 -07:00
David Garske
78b78428e7
Merge pull request #6512 from SparkiDev/math_enc_mem_exptmod
Math, Encrypted Memory: mod exp fix
2023-06-15 19:52:41 -07:00
Sean Parkinson
e17f86d145 TFM: fix big endian reading a zero length buffer
Bail early as big endian implementation doesn't handle it.
2023-06-16 10:58:51 +10:00
Sean Parkinson
beef8b0014 outputBuffer - use idx field
dtls13.c:
Change end of outputBuffer data calculations to use function
GetOutputBuffer().
  Use idx when calculating unused byte count of outputBuffer.

internal.c:
Change end of outputBuffer data calculations to use function
GetOutputBuffer().
  Use GetOutputBuffer() to calculate end of data in outputBuffer.
  GrowOutputBuffer():
Calculate new size to allocate to include already written data in
case of static buffer.
    Copy all data including already written count (idx).
  CheckAvailableSize():
    Don't subtract idx from length when checking MTU size.
Do subtract idx from bufferSize to determine count of unused bytes
in outputBuffer.
2023-06-16 10:29:52 +10:00
Sean Parkinson
a1e8aa7269 test.c, scrypt: bench embedded reduce heap usage
Don't do scrypt test cases that allocate 1MB of memory when
BENCH_EMBEDDED is defined.
2023-06-16 10:16:34 +10:00
Daniel Pouzzner
970663f8a1 in wolfSSL_ERR_reason_error_string(), unconditionally convert positive error codes to negative, and in switch(), match against negated values of OpenSSL positive codes like WOLFSSL_ERROR_WANT_READ. fixes #6514 2023-06-15 17:42:03 -05:00
Sean Parkinson
7153dd70a6 Math, Encrypted Memory: mod exp fix
The modular exponentiation implementations in sp_int.c and tfm.c are not
safe when using Encrypted Memory.
Cannot have two pieces of memory where one changes and the other doesn't
based on private value.
Use extra variable to hold the two new values and assign them both back
at the same time in a safe manner.

Alternative implementations used when WC_PROTECT_ENCRYPTED_MEM is
defined.
2023-06-16 07:28:47 +10:00
JacobBarthelmeh
5b81dc47d2 adjust location used for writing to output buffer 2023-06-14 21:01:12 -07:00
JacobBarthelmeh
8f29111aac fix for nightly toolchain armv7 build warning 2023-06-14 14:13:59 -06:00
Daniel Pouzzner
902d47aaa1 wolfcrypt/test/test.c: fix scoping of hkdf_test();
wolfcrypt/test/test.h: include <wolfssl/wolfcrypt/types.h> to be sure sword32 is available.
2023-06-14 15:06:13 -05:00