8015 Commits

Author SHA1 Message Date
Andras Fekete
f00c5eb95d Fix double free
Warning 546055.3229451
2024-01-03 09:59:18 -05:00
Daniel Pouzzner
c8188eaabd
Merge pull request #7100 from philljj/zd17237
Fix uninitialized keyUsage in DecodeKeyUsage.
2024-01-02 01:51:45 -05:00
Daniel Pouzzner
b17ec3b4bc cppcheck-2.13.0 mitigations peer review:
* add explanation in DoSessionTicket() re autoVariables.
* re-refactor ECC_KEY_MAX_BITS() in ecc.c to use two separate macros, ECC_KEY_MAX_BITS() with same definition as before, and ECC_KEY_MAX_BITS_NONULLCHECK().
* in rsip_vprintf() use XVSNPRINTF() not vsnprintf().
* in types.h, fix fallthrough definition of WC_INLINE macro in !NO_INLINE cascade to be WC_MAYBE_UNUSED as it is when NO_INLINE.
2023-12-28 16:38:47 -06:00
Daniel Pouzzner
44b18de704 fixes for cppcheck-2.13.0 --force:
* fix null pointer derefs in wc_InitRsaKey_Id() and wc_InitRsaKey_Label() (nullPointerRedundantCheck).
* fix use of wrong printf variant in rsip_vprintf() (wrongPrintfScanfArgNum).
* fix wrong printf format in bench_xmss_sign_verify() (invalidPrintfArgType_sint).
* add missing WOLFSSL_XFREE_NO_NULLNESS_CHECK variants of XFREE() (WOLFSSL_LINUXKM, FREESCALE_MQX, FREESCALE_KSDK_MQX).
* suppress false-positive uninitvar on "limit" in CheckTLS13AEADSendLimit().
* suppress true-but-benign-positive autoVariables in DoClientHello().
* in wolfcrypt/src/ecc.c, refactor ECC_KEY_MAX_BITS() as a local function to resolve true-but-benign-positive identicalInnerCondition.
* refactor flow in wc_ecc_sign_hash_ex() to resolve true-but-benign-positive identicalInnerCondition.
2023-12-28 15:06:21 -06:00
jordan
46bf30ca77 Fix uninitialized keyUsage in DecodeKeyUsage. 2023-12-27 22:58:52 -06:00
Daniel Pouzzner
457188f55e
Merge pull request #7070 from dgarske/cryptocb_moreinfo
Fixes for TLS with crypto callbacks
2023-12-27 18:55:56 -05:00
David Garske
1c4d7285d3 Add documentation for HKDF functions. Improve param comments for devId. 2023-12-27 13:56:40 -08:00
lealem47
fc3977fc77
Merge pull request #7098 from dgarske/stm32_pka
Fixes for STM32 PKA
2023-12-27 14:36:53 -07:00
David Garske
c37edb09f7 Fix STM32 PKA V2 (STM32U5) point multiply missing order/coefB. 2023-12-27 11:37:16 -08:00
David Garske
0d057099af Fix line lengths. 2023-12-27 10:12:52 -08:00
David Garske
3a798e148b Fix STM32 PKA ECC cast warning. 2023-12-27 09:57:40 -08:00
David Garske
b86dfffdbe Improve the TLS v1.3 expand key label warning for possible use of uninitialized "hash". 2023-12-27 09:52:56 -08:00
Daniel Pouzzner
8a32e7f3f9 fixes for clang -Wunreachable-code-aggressive:
tests/suites.c: in SuiteTest(), swap order of (void)s and return.

wolfcrypt/src/chacha.c: gate out unreachable C wc_Chacha_encrypt_bytes() call in wc_Chacha_Process, and gate out unused implementations of wc_Chacha_wordtobyte() and wc_Chacha_encrypt_bytes(), when defined(USE_INTEL_CHACHA_SPEEDUP).

wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: fix logic in Sha256_SetTransform() and Sha512_SetTransform() to make the AVX1_RORX implementations accessible.  also add a missing Transform_Sha512_Len_p = NULL in the C path of Sha512_SetTransform().

wolfssl/internal.h: for the fallback definition of wolfSSL_curve_is_disabled, use an inline function instead of a compound-clause macro, because clang isn't smart enough to treat the compound expression as a bare constant zero, producing a lame-positive -Wunreachable-code.
2023-12-25 00:23:37 -06:00
David Garske
d9ac8b5422 Peer review fixes. Fix issues with Tls13HKDFExpandKeyLabel. Fix crypto callback line lengths. 2023-12-22 14:16:59 -08:00
Daniel Pouzzner
59cdd5c70f
Merge pull request #7082 from bandi13/ARIA_Sign_fix
Aria sign fix
2023-12-21 19:01:54 -05:00
Sean Parkinson
f77f7c70d3
Merge pull request #7018 from dgarske/ti_aes
Fixes for TI AES and SHA
2023-12-22 07:55:00 +10:00
Andras Fekete
b5592c4571 Addressing PR comments 2023-12-21 16:48:15 -05:00
Sean Parkinson
00c9625ab8
Merge pull request #7081 from gojimmypi/PR-Espressif-ESP32-C2
Add wolfcrypt SHA support for ESP32-C2/ESP8684, other minor updates
2023-12-22 07:23:51 +10:00
Sean Parkinson
a5a2b3752d
Merge pull request #7077 from gojimmypi/PR-Espressif-threads
wolfSSL_NewThread() type update for Espressif FreeRTOS
2023-12-22 07:22:33 +10:00
David Garske
00f196d497 Fix for invalid dh_ffdhe_test test with even P when using Intel QuickAssist. 2023-12-20 11:30:17 -08:00
Andras Fekete
77e8a66ca3 Not cryptocb's job to sanity check input
Don't need to check parameters at every level
2023-12-19 15:55:38 -05:00
Andras Fekete
12192b7683 Set result to invalid as first step 2023-12-19 15:54:25 -05:00
Andras Fekete
f45ffd8802 Rename variable to keep the names similar across functions 2023-12-19 15:37:58 -05:00
Andras Fekete
9e974027a8 Fix ARIA signing
Used the wrong function to extract key
2023-12-19 15:33:28 -05:00
David Garske
fb5eab8f79 Fix one shot hash routines to attempt offloading to crypto callbacks. Fix random.c health test to use devId. Fix FIPS unused "ssl". 2023-12-19 11:20:56 -08:00
David Garske
2001d1c74b Fixes for TLS v1.3 with crypto callbacks not offloading DeriveKeyMsg, KDF HMAC and ECH. 2023-12-19 08:15:58 -08:00
gojimmypi
07a5566c52 Add wolfcrypt SHA support for ESP32-C2, other minor updates 2023-12-18 17:35:43 -08:00
David Garske
90748b5f61 Remove the SHA1-/SHA2-256 auto devId selection devId = wc_CryptoCb_GetDevIdAtIndex(0); 2023-12-18 17:14:58 -08:00
David Garske
8b203719d3 Add support for using devId with one-shot hash functions. 2023-12-18 17:14:43 -08:00
David Garske
d5e83310b6 Fix typo with HMAC determination of update/final. 2023-12-18 17:11:33 -08:00
David Garske
205403ebb2 Add more information in the DEBUG_CRYPTOCB. 2023-12-18 17:11:16 -08:00
gojimmypi
da644c7be3 wolfSSL_NewThread() type update for Espressif FreeRTOS 2023-12-17 11:59:42 -08:00
Daniel Pouzzner
ef14176b7f SRTP fixes:
* in wolfssl/ssl.h, add missing arg names to wolfSSL_CTX_set_tlsext_use_srtp(), wolfSSL_set_tlsext_use_srtp(), and wolfSSL_export_dtls_srtp_keying_material();
* in wolfcrypt/src/kdf.c, call wc_AesFree if and only if wc_AesInit() succeeded;
* in src/ssl.c:DtlsSrtpSelProfiles(), fix bugprone-inc-dec-in-conditions;
* in tests/suites.c:execute_test_case(), fix several -Wdeclaration-after-statement and -Wmissing-field-initializers;
* in wolfcrypt/test/test.c, fix a shiftTooManyBitsSigned warning in srtpkdf_test(), and fix a typo (kaSz/ksSz).
2023-12-15 14:06:36 -06:00
David Garske
4b771a9b28 Document new macro and rename to: NO_TIME_SIGNEDNESS_CHECK 2023-12-14 13:58:29 -08:00
Chris Conlon
27c6ee4d05
Merge pull request #7068 from SparkiDev/srtp_kdf_label
SRTP/SRTCP KDF: add APIs that derives one key from a label
2023-12-14 14:54:58 -07:00
Chris Conlon
fb6b022f42
Merge pull request #7020 from SparkiDev/ecc_gen_k_by_reject
ECC: generate values in range of order by rejection
2023-12-14 14:54:39 -07:00
David Garske
8b048bc246 Disable the old TI workarounds. Enable support for CCM. 2023-12-14 13:50:03 -08:00
David Garske
1cf87ce0c9 Spelling fix. 2023-12-14 12:14:30 -08:00
Chris Conlon
f6ef58dbc2
Merge pull request #7064 from philljj/fix_infer_issues
Fix issues from infer diff report.
2023-12-14 12:27:34 -07:00
Chris Conlon
1b76f6d56b
Merge pull request #7065 from miyazakh/fix_ra6m3
fix benchmark compile error
2023-12-14 09:15:32 -07:00
Sean Parkinson
659a245b27 SRTP/SRTCP KDF: add APIs that derives one key from a label
Added more generic APIs that derive a single key with a label.
Added defines for label values and index lengths.
2023-12-14 14:45:35 +10:00
Hideki Miyazaki
3af91c265b
remove tab 2023-12-14 11:16:36 +09:00
David Garske
0bc244962a Fixes for TI AES GCM and GMAC. 2023-12-13 17:32:45 -08:00
Chris Conlon
d36538c40a
Merge pull request #7063 from embhorn/13dec2023_cov_fixes
Fixes for release
2023-12-13 16:19:13 -07:00
jordan
a1b44b6214 Fix issues from infer diff report: init mp_digit to 0. 2023-12-13 17:17:49 -06:00
Hideki Miyazaki
f209120218
fix benchmark compile error 2023-12-14 07:35:32 +09:00
Chris Conlon
a66137d2fe
Merge pull request #7062 from lealem47/leaks
Cleanup leaks in api.c and benchmark.c
2023-12-13 14:09:23 -07:00
Eric Blankenhorn
1d7fd42aa8 Fixes for release 2023-12-13 14:47:02 -06:00
Lealem Amedie
5fd0470f76 Cleanup leaks in api.c and benchmark.c 2023-12-13 13:00:52 -07:00
Chris Conlon
3d959b96c9
Merge pull request #7060 from dgarske/various_20231212
Fix for benchmark without filesystem unused globals
2023-12-13 11:29:28 -07:00