Commit Graph

20003 Commits

Author SHA1 Message Date
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
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
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
0a860c793f adjust test case to handle error of peer closing down 2023-06-14 12:21:52 -07:00
JacobBarthelmeh
9e0c13bbdb sanity check on send fatal alert return 2023-06-14 11:08:56 -07:00
Sean Parkinson
82cc988226 Merge pull request #6495 from JacobBarthelmeh/build
update check for stdatomic header file
2023-06-14 14:00:04 +10:00
Sean Parkinson
cdb3d6df40 Merge pull request #6502 from JacobBarthelmeh/release
prepare for 5.6.3
2023-06-14 13:59:41 +10:00
JacobBarthelmeh
72536e0e10 prepare for 5.6.3 2023-06-13 14:47:06 -06:00
Eric Blankenhorn
58c1c0c31b Merge pull request #6499 from douzzer/20230612-windows-fixes
20230612-windows-fixes
2023-06-13 12:32:01 -05:00
Daniel Pouzzner
03a6eed037 wolfcrypt/src/{aes.c,blake2b.c,siphash.c}: fix W64LIT() arguments to not have improper 'U' suffix;
wolfssl/wolfcrypt/types.h: add 'U' suffix to W64LIT() macro defs, and add SW64LIT() macro defs (not yet used anywhere);

wolfcrypt/src/asn.c: add !WOLFSSL_ECC_CURVE_STATIC gate around DataToHexStringAlloc() to resolve -Wunused;

wolfcrypt/src/ecc.c: guard against zero-valued "len" arg to wc_ecc_get_curve_id_from_oid();

wolfcrypt/src/wc_port.c: fix several argument implicit sign changes in USE_WINDOWS_API paths;

wolfssl/wolfcrypt/ecc.h: remove const attribute from inline buffers in WOLFSSL_ECC_CURVE_STATIC struct ecc_set_type.
2023-06-12 23:15:08 -05:00
JacobBarthelmeh
47036d0166 update check for stdatomic header file 2023-06-12 13:48:24 -06:00
JacobBarthelmeh
9ffa9faecd Merge pull request #6491 from ejohnstown/fix-imp-conv
Implicit Type Conversion Fix
v5.6.2-stable
2023-06-09 13:19:18 -06:00
John Safranek
7b0283fa04 Implicit Type Conversion Fix
1. Typecast the return of strlen() to int for the variable used.
2023-06-09 11:13:44 -07:00
John Safranek
a56070cd70 Merge pull request #6490 from JacobBarthelmeh/release
Prepare for release 5.6.2
2023-06-09 11:00:10 -07:00
JacobBarthelmeh
353a2926b6 add check for stdatomic.h 2023-06-09 09:52:01 -07:00
JacobBarthelmeh
032ac405db prepare for release 5.6.2 2023-06-09 05:51:18 -07:00
JacobBarthelmeh
c59cc92379 Merge pull request #6488 from douzzer/20230608-linuxkm-__is_constexpr
20230608-linuxkm-__is_constexpr
2023-06-08 14:48:19 -06:00
Daniel Pouzzner
e35cb5bc3d linuxkm/linuxkm_wc_port.h: override definition of __is_constexpr() from /usr/src/linux/include/linux/const.h with warning-free __builtin_constant_p(). 2023-06-08 14:43:05 -05:00
John Safranek
3f1dd32f4e Merge pull request #6487 from JacobBarthelmeh/fuzzing
sanity check on socket return value for timeout with DTLS13
2023-06-08 10:41:41 -07:00
JacobBarthelmeh
0d591f1111 Merge pull request #6485 from SparkiDev/coverity_api_c_fixes
Coverity fixes: api.c
2023-06-08 09:25:08 -06:00
Sean Parkinson
897a865090 Merge pull request #6477 from JacobBarthelmeh/stm32
add sanity check on hash size with STM32 port
2023-06-08 22:21:19 +10:00
Sean Parkinson
e5bb09f281 Coverity fixes: api.c
Fixes from coverity scan in the file api.c.
2023-06-08 22:18:05 +10:00
JacobBarthelmeh
938a48d9b1 sanity check on socket return value for timeout with DTLS13 2023-06-08 02:37:21 -06:00
Sean Parkinson
66d222adfc Merge pull request #6484 from JacobBarthelmeh/cov
coverity scan fixes
2023-06-08 10:06:18 +10:00
JacobBarthelmeh
4a4a769512 check on allocation of new node before dereferencing 2023-06-07 15:20:23 -06:00
JacobBarthelmeh
84979900a7 avoid use after free in error case 2023-06-07 15:13:13 -06:00
JacobBarthelmeh
14990ad92d set return bio to null after free on error 2023-06-07 15:05:52 -06:00
JacobBarthelmeh
fb5413cea0 account for null terminator with SEP serail number 2023-06-07 14:59:07 -06:00
JacobBarthelmeh
ebc62f8d17 clear extension string and avoid potential double free 2023-06-07 14:41:47 -06:00
JacobBarthelmeh
d796aa12fc free up memory with othername object on error 2023-06-07 13:29:41 -06:00
JacobBarthelmeh
c399fba4ce set ext pointer to null after free'ing it 2023-06-07 13:23:43 -06:00
Jacob Barthelmeh
327645ff2a add additional STM32 ECC sanity check to sign 2023-06-07 10:26:40 -07:00
Jacob Barthelmeh
2a0b244393 add sanity check on hash size with STM32 port 2023-06-07 10:26:40 -07:00
JacobBarthelmeh
c040b4a339 Merge pull request #6478 from SparkiDev/kyber_fixes_1
Kyber: allow compilation with limited sizes with liboqs
2023-06-07 11:24:08 -06:00
JacobBarthelmeh
8583cc65fa Merge pull request #6471 from SparkiDev/tests_api_expect_3
Test api.c: change more tests to use Expect instead of Assert
2023-06-07 11:22:23 -06:00
JacobBarthelmeh
1445a6a832 Merge pull request #6482 from SparkiDev/regression_fixes_7
Regression testing fixes
2023-06-07 11:18:36 -06:00
JacobBarthelmeh
2b054e223b Merge pull request #6483 from SparkiDev/cppcheck_fixes_10
cppcheck: fixes from scan
2023-06-07 11:13:53 -06:00
Chris Conlon
0752a9e4f4 Merge pull request #6481 from miyazakh/fix_androidb_2
fix un-initialized var
2023-06-07 09:39:00 -06:00
Sean Parkinson
ed01b14356 cppcheck: fixes from scan
wolfssl_sce_unit_test.c:
  sce_crypt_Sha_AesCbcGcm_multitest(): duplicate condition
ssl_asn1.c:
  wolfSSL_i2t_ASN1_OBJECT(): done is not needed
  MonthStr(): fix bounds check on i
woolfcrypt_test.c, test_main.c, wolfssl_tsip_unit_test.c, devices.c,
aes.c, des3.c:
  Variable not used.
asn.c:
DecodeSubjKeyId(): sz is unsigned - check for less than zero does
nothing
kcapi_rsa.c:
  KcapiRsa_Decrypt(): fix ret check by using else
  KcapiRsa_Encrypt(): make same change for consistency
kcapi_hash.c:
  KcapiHashFinal(): move ret into #ifdef where it is needed
stm32.c:
wc_Stm32_Hash_GetDigest(): i redeclared with different type - use ii
instead
bio.c, conf.c:
  XFREE checks for NULL

Reduce scope of varialbes.
Condition same.
2023-06-07 17:27:51 +10:00
John Safranek
d67ce722ff Merge pull request #6476 from kareem-wolfssl/dtlsBlankCert
Send blank certificate message in DTLS when no client cert is loaded.
2023-06-06 22:43:01 -07:00
Sean Parkinson
b07c5d7ce8 Regression testing fixes
Fix: ./configure --disable-shared  --enable-smallstack --enable-all
CFLAGS=-DNO_ASN_TIME

Don't compile mp_test when compiling for SP Math All and RSA
verification only - very few functions available.

ssl.c:
wolfSSL_Rehandshake(): wolfSSL_UseSessionTicket only available when
not NO_WOLFSSL_CLIENT
api.c:
  test_wolfSSL_ticket_keys(): meant to be tested on server
2023-06-07 14:26:45 +10:00
Sean Parkinson
e542e51d9f Test api.c: change more tests to use Expect instead of Assert
bio.c:
  wolfSSL_BIO_push(): handles NULL for top and append.

crl.c:
InitCRL_Entry(): set toBeSigned to NULL after freeing when allocation
fails.
  AddCRL(): free CRL entry properly on error.
wolfSSL_X509_STORE_add_crl(): check for NULL after
wolfSSL_X509_crl_new call.

ssl.c:
wolfSSL_CertManagerGetCerts(): free the certificate if it didn't get
pushed onto stack
  wolfSSL_RAND_Init(): returns success if global already initialized.

ssl_asn1.c: wolfSSL_ASN1_TYPE_set now avaiable when OPENSSL_EXTRA
defined for function wolfssl_dns_entry_othername_to_gn().

x509.c:
Added support for creating a valid General Name of type GEN_OTHERNAME.
Extracted some code out into wolfssl_x509_alt_names_to_gn().
  wolfSSL_X509_set_ext(): free data correctly on errors
wolfSSL_X509_PUBKEY_set(): free str if DSA parameters cannot be
retrieved; wolfSSL_OBJ_nid2obj() called separately to handle when
returning NULL.
wolfSSL_X509_NAME_copy(): check for failure when
wolfSSL_X509_NAME_add_entry() is called.

x509_str.c:
wolfSSL_X509_STORE_CTX_new(): check for error from calling
wolfSSL_X509_STORE_CTX_init().
wolfSSL_X509_STORE_get0_objects(): don't double free x509; free memory
correctly on error
2023-06-07 14:10:42 +10:00
Hideki Miyazaki
5624df95b5 fix uninit var 2023-06-07 07:43:02 +09:00
JacobBarthelmeh
ee289fdf89 Merge pull request #6429 from embhorn/zd16184
Allow wolfSSL_RAND_Init to pass if already initialized
2023-06-06 16:23:42 -06:00