Commit Graph

18673 Commits

Author SHA1 Message Date
Daniel Pouzzner
595f8a30d6 wolfcrypt/src/sp_int.c: fix bugprone-macro-parentheses in ALLOC_SP_INT() and ALLOC_SP_INT_ARRAY() introduced in aeca8cb17a. 2022-12-05 15:21:17 -06:00
David Garske
d3441545ef Merge pull request #5852 from SparkiDev/sp_c_perf_2
SP C, SP int: improve performance
2022-12-05 11:51:28 -08:00
David Garske
5dee15d074 Merge pull request #5850 from SparkiDev/sp_exptmod_nct_err_fix
SP int: fix check of err in _sp_exptmod_nct
2022-12-05 11:24:12 -08:00
David Garske
304f287a7e Merge pull request #5828 from SparkiDev/sp_int_static_size
SP int: check size required when using sp_int on stack
2022-12-05 11:23:25 -08:00
Sean Parkinson
22141faf16 SP C, SP int: improve performance
In SP C: Improve performance of large digit mul and sqr.
In SP int: include optimized 16 digit mul and sqr when compiling SAKKE.
2022-12-05 14:17:09 +10:00
Sean Parkinson
4601a57ff2 SP int: fix check of err in _sp_exptmod_nct 2022-12-05 09:36:28 +10:00
David Garske
b99f5e5041 Merge pull request #5847 from douzzer/20221203-sp-int-missing-const
20221203-sp-int-missing-const
2022-12-03 12:39:33 -08:00
Daniel Pouzzner
cd1a61288b wolfcrypt/src/sp_int.c: in _sp_mont_red(), add missing const in SP_WORD_SIZE == 32 codepath. 2022-12-03 10:14:15 -06:00
David Garske
ea2d79338c Merge pull request #5846 from douzzer/20221202-dtls-crypt-only-gating
20221202-dtls-crypt-only-gating
2022-12-03 07:21:55 -08:00
Daniel Pouzzner
3ea8dd2f67 src/dtls.c: add WOLFCRYPT_ONLY gating. 2022-12-02 15:13:31 -06:00
David Garske
efd194ea74 Merge pull request #5842 from SparkiDev/sp_int_clang_tidy
SP int: fixes for static analyser clang-tidy
2022-12-02 07:42:00 -08:00
Sean Parkinson
3239ff5b0e SP int: fixes for static analyser clang-tidy
Const poison sp_int.c to allow static analysers to work better.
sp_prime_is_prime_ex() checks whether a->used is negative to avoid bad
behavior.
2022-12-02 13:57:32 +10:00
David Garske
c079455d3e Merge pull request #5839 from SparkiDev/sp_int_pub_apis
SP int: fix which APIs are public available wiht WOLFSSL_SP_MATH
2022-12-01 19:33:11 -08:00
Sean Parkinson
39716737c1 SP int: fix which APIs are public available wiht WOLFSSL_SP_MATH
Make sp_rshd not available when WOLFSSL_SP_MATH in header.
sp_rshd is not required by any wolfCrypt code.
Fix sp_rshd comment on #endif
Make sp_div publicly available in some WOLFSSL_SP_MATH builds.
Delare sp_div for some WOLFSSL_SP_MATH builds.
Fix test.c to compile with WOLFSL_SP_MATH and HAVE_VALGRIND.
2022-12-02 09:11:35 +10:00
David Garske
5f410b47b7 Merge pull request #5829 from SparkiDev/sp_invmod_fixes
SP int: fix error checks when modulus even
2022-12-01 15:05:22 -08:00
Sean Parkinson
c59d6c36e4 Merge pull request #5838 from douzzer/20221201-fix-kcapi
20221201-fix-kcapi
2022-12-02 08:24:14 +10:00
David Garske
8fb92a283a Merge pull request #5716 from rizlik/dtls_cookie_stateless
dtls: allow for stateless client hello parsing
2022-12-01 13:47:33 -08:00
Daniel Pouzzner
1c7826b199 wolfcrypt/src/port/kcapi/kcapi_aes.c: fix error checking on KCAPI wc_AesGcmEncrypt() and wc_AesGcmDecrypt(). 2022-12-01 12:54:57 -06:00
David Garske
d1e6ce064f Merge pull request #5832 from JacobBarthelmeh/fuzzing
free signer if malloc cases fail
2022-12-01 10:35:15 -08:00
JacobBarthelmeh
1e8ecd3d71 Merge pull request #5830 from SparkiDev/sp_int_no64bit
SP int: check NO_64BIT before speculative using long long
2022-12-01 11:10:33 -07:00
Marco Oliverio
fc4b008912 dtls: fix heap hint in XFREE 2022-12-01 16:47:37 +00:00
Marco Oliverio
abbba4815e tests: add tests for stateless dtls v1.2 cookie 2022-12-01 16:47:37 +00:00
Marco Oliverio
af00c89f18 dtls v1.2: stateless support WOLFSSL_DTLS_NO_HVR_ON_RESUME 2022-12-01 16:30:54 +00:00
Marco Oliverio
cc7dad3ee6 dtls v1.2: support stateless client hello processing 2022-12-01 16:30:54 +00:00
Marco Oliverio
5bc86b8c2c fix: dtls: always use version DTLS 1.0 in HelloVerifyRequest
see rfc6347 section 4.2.1
2022-12-01 16:30:54 +00:00
Marco Oliverio
4fa1b9dd0a fix: AddRecordHeader: use correct minor when using DTLS 2022-12-01 16:30:54 +00:00
Marco Oliverio
aff01121a2 fix: dtls v1.2: reset window when invoking DtlsResetState 2022-12-01 16:30:54 +00:00
Marco Oliverio
173208728a fix: tls13: hash using right version when downgrading 2022-12-01 16:30:54 +00:00
Marco Oliverio
2c35d7f9d2 fix: formatting and typos
dtls: fix debug message when downgrading

internal.c: fix typo
2022-12-01 16:30:53 +00:00
David Garske
1388e66059 Merge pull request #5706 from icing/ha-quic
Set of QUIC related changes for HAProxy integration.
2022-12-01 06:11:14 -08:00
Stefan Eissing
e5cfd96609 QUIC API support in OpenSSL compat layer, as needed by HAProxy integration.
- adding patch for HAProxy, see dod/QUIC.md, based on current master.
      For documentaton purposes, since HAProxy does not accept PRs. To be
      removed once forwarded to the project.
2022-12-01 10:12:35 +01:00
Sean Parkinson
aeca8cb17a SP int: check size required when using sp_int on stack
SP int can be configured to declare temporary sp_ints.
Check that the requested number of digits is not larger than the max
supported (SP_INT_DIGITS).
Also check arrays of sp_ints too.
2022-12-01 12:53:52 +10:00
David Garske
2d88fd3b75 Merge pull request #5835 from lealem47/zd15262
Making CTC_MAX_CRLINFO_SZ a compile-time option
2022-11-30 17:35:11 -08:00
Sean Parkinson
e83e0693b9 SP int: check NO_64BIT before speculative using long long
ULLONG_MAX is not defined for old versions of C compiler.
An unsigned long long type may still be available though.
Don't use unsigned long long for a 64-bit type when NO_64BIT is defined.
2022-12-01 10:25:13 +10:00
David Garske
c6a7afee74 Merge pull request #5834 from anhu/http
Correction to a webpage link.
2022-11-30 15:14:35 -08:00
Lealem Amedie
eba6a6d9f6 Making CTC_MAX_CRLINFO_SZ a compile-time option 2022-11-30 14:24:23 -08:00
Anthony Hu
3b00c9abee Correction to a webpage link. 2022-11-30 16:27:50 -05:00
JacobBarthelmeh
01833a369e free signer if malloc cases fail 2022-11-30 10:02:33 -08:00
gojimmypi
fec7469c19 Tidy up Espressif ESP32 test and benchmark examples (#5800)
Tidy up Espressif ESP32 test and benchmark examples:
* add VisualGDB project and solution files for server and client
* "hardware in use revert to software" is now verbose level message
* Remove (void) TAG;  - not needed to appease compiler
* include esp_log.h lib with defined(WOLFSSL_ESPIDF)
* large ESP32 default stack size
* check for max number of arguments assembled into array
* cleanup & comments per code review
* wolfssl_test VisualGDB updates
* Espressif wolfssl_test default stack 55,000 bytes
2022-11-30 10:01:46 -08:00
Sean Parkinson
c7c80be15e SP int: sp_invmod_div check div result before proceeding 2022-11-30 18:33:35 +10:00
Sean Parkinson
faf848a915 SP int: fix error checks when modulus even 2022-11-30 18:15:30 +10:00
Daniel Pouzzner
973de0e954 Merge pull request #5831 from SparkiDev/sp_int_div_clear_fix
SP int: don't call sp_clear unless no longer using sp_int
2022-11-30 02:15:19 -06:00
Sean Parkinson
61c2fd9a2b SP int: don't call sp_clear unless no longer using sp_int
Put in casts to be sure no compiler complains.
Tidy up other parts of the code.
2022-11-30 16:36:48 +10:00
David Garske
24cc8e7145 Merge pull request #5827 from douzzer/20221129-ecb-benchmark-throughput
20221129-ecb-benchmark-throughput
2022-11-29 18:12:23 -08:00
David Garske
63051f3826 Merge pull request #5825 from SparkiDev/api_test_sep
Unit test: rework to be able to run API tests individually
2022-11-29 18:11:57 -08:00
Sean Parkinson
fed3f53969 Merge pull request #5826 from kaleb-himes/gcc-11-12-fixes
Initialize variable causing failures with gcc-11 and gcc-12
2022-11-30 10:40:17 +10:00
Daniel Pouzzner
4bacc25e22 examples/benchmark/tls_bench.c: fix for clang-analyzer-deadcode.DeadStores in bench_tls(). 2022-11-29 17:09:05 -06:00
David Garske
b2f9838af4 Fix DSA public decode to allow extra buffer (in case private key is passed in). Fixes for clang-tidy "value stored never read". Allow showing line number and conditional with DEBUG_WOLFSSL_VERBOSE on TEST_RES_CHECK. 2022-11-29 14:58:52 -08:00
kaleb-himes
4d2b893fb3 Initialize variable causing failures with gcc-11 and gcc-12 2022-11-29 14:59:53 -07:00
Daniel Pouzzner
a9b28c1562 wolfcrypt/benchmark/benchmark.c: make iteration increment in bench_aesecb_internal() even lumpier (by a factor of 10) to further reduce false positives from iteration overhead. 2022-11-29 14:39:44 -06:00