Commit Graph

17384 Commits

Author SHA1 Message Date
Hayden Roche
10dfd8d129 Clear the leftover byte count in Aes struct when setting IV.
Setting the key already does this. The same needs to be done when setting the
IV.
2022-06-26 15:56:05 +04:00
David Garske
55414290df Merge pull request #5286 from douzzer/20220624-multi-test-fixes-sp-math-default
20220624-multi-test-fixes-sp-math-default
2022-06-24 19:26:49 -07:00
Daniel Pouzzner
9211825121 sp_int.c: fix refactor of undefined-semantics shift in _sp_mul(). 2022-06-24 18:04:51 -05:00
Daniel Pouzzner
790584113f configure.ac: WOLFSSL_WPAS[_SMALL] requires OPENSSL_EXTRA. 2022-06-24 16:38:56 -05:00
Daniel Pouzzner
9a29dfc8cb fix whitespace. 2022-06-24 16:08:38 -05:00
Daniel Pouzzner
047c662af8 fix math errors unmasked by change to sp-math-all as default math back end. 2022-06-24 15:56:54 -05:00
Daniel Pouzzner
940d0140f9 configure.ac fixes related to change in default math back end (to sp-math-all): wolfRand doesn't use fastmath;
FIPS v5-dev follows the non-FIPS default (now sp-math-all);

add -DWC_NO_CACHE_RESISTANT to AM_CFLAGS when $ENABLED_HARDEN != yes;

add ENABLED_BIGNUM sensor and use it in linuxkm math back end assert;

add configuration callout for "Side-channel Hardening" reporting value of $ENABLED_HARDEN.
2022-06-24 15:55:08 -05:00
JacobBarthelmeh
8dfcc76f50 Merge pull request #5279 from embhorn/gh5273
Fix config with WOLFSSL_WPAS_SMALL
2022-06-24 11:22:58 -06:00
David Garske
5ef507c78d Merge pull request #5280 from douzzer/20220623-enable-dh-const
--enable-dh=const
2022-06-24 08:29:35 -07:00
David Garske
00b82888bc Merge pull request #4759 from dgarske/sp_math_default
Enable wolfSSL SP Math all (sp_int.c) by default
2022-06-23 16:14:54 -07:00
Daniel Pouzzner
a5250482ce examples/: refactor a couple help strings to avoid hitting clang-tidy bugprone-suspicious-missing-comma. 2022-06-23 15:25:23 -05:00
Daniel Pouzzner
768737d21e configure.ac: support --enable-dh=const, and link with libm ("LT_LIB_M") only if ENABLED_DH = yes. 2022-06-23 15:00:59 -05:00
David Garske
78d3284c3c Fix for FIPS 140-2 and older ACVP math selection. Fix for building with "--disable-sp-math-all --disable-fastmath". Fix for building SAKKE with HAVE_WOLF_BIGINT. 2022-06-23 11:10:44 -07:00
David Garske
e2ad62b3d1 Merge pull request #5266 from rizlik/udp_help
examples: update usage() with DTLSv1.3 version
2022-06-23 09:27:53 -07:00
Eric Blankenhorn
7fb17e0584 Fix build error with --enable-opensslextra=x509small --enable-debug 2022-06-23 11:26:57 -05:00
Eric Blankenhorn
1cdc81546d Fix config with WOLFSSL_WPAS_SMALL 2022-06-23 09:19:14 -05:00
Sean Parkinson
ee12c12e98 Fixes required to make SP Math default
fasthugemath means turn on fastmath
Use sp_int_digit and not sp_digit in sp_int.c.
test.c needs to use large static buffer when SP Math used like fastmath.
When building static memroy, SP math all without WOLFSSL_SP_NO_MALLOC is
a valid configuration.
Fix freeing of bigint in sp_int.c.
Cast x to a signed value to negate and then back to unsigned. (For
Windows builds.)
Remove warning about empty file on Windows about integer.obj.
Allow RSA verify only and RSA public only to be used with other public
key algorithms.
If building for FIPS, then older versions of RSA and ECC require SP Math
to support negative numbers.
Get old FIPS files building with SP int.
Disallow --enable-sp-math and --enable-sp-math-all.
When just --enable-sp-math on configuration line then disable SP Math
all.
2022-06-23 14:15:54 +10:00
Sean Parkinson
8d804f6378 Merge pull request #5260 from dgarske/sp_ecc_nb_hash
Fix for SP math ECC non-blocking to always check `hashLen`
2022-06-23 07:59:28 +10:00
Marco Oliverio
fdc4cdf5ec examples: update usage() with DTLSv1.3 version 2022-06-22 18:50:18 +02:00
Sean Parkinson
acc9f3701a Merge pull request #5261 from dgarske/sha3_shake_flags
Configure fixes for SHA3 and SHAKE256
2022-06-22 11:50:28 +10:00
David Garske
deb0c3e6fa Merge pull request #5272 from lealem47/skip
Display SKIP instead of PASS when tests skipped for make check
2022-06-21 16:06:58 -07:00
David Garske
4db7732d78 Fixes for --enable-sha3 reproducibility with small. Fixes for shake256 typo and making sure WOLFSSL_NO_SHAKE256 gets set when disabled. Replaces PR #4225. 2022-06-21 16:02:42 -07:00
David Garske
74d692d6d5 Fix for SP math ECC non-blocking to always check hashLen. ZD14141 2022-06-21 15:54:01 -07:00
Chris Conlon
9e1ecf3fb5 Merge pull request #5194 from TakayukiMatsuo/heaphint 2022-06-21 16:39:07 -06:00
Chris Conlon
7dbf1a5154 Merge pull request #5262 from miyazakh/qt_unit_failure 2022-06-21 16:35:37 -06:00
Chris Conlon
bd536d3c9d Merge pull request #5229 from miyazakh/sce_example_update 2022-06-21 16:33:54 -06:00
Lealem Amedie
40d9473e6a Display SKIP instead of PASS when tests skipped for make check 2022-06-21 13:11:08 -07:00
David Garske
b8cff49044 Merge pull request #5268 from anhu/micrium_dtls_guard
Fix missing WOLFSSL_DTLS guard in Micrium build
2022-06-21 12:01:47 -07:00
Anthony Hu
099afe4419 errant if 2022-06-21 11:33:08 -04:00
Anthony Hu
beddc777d4 milliseconds not only for DTLS13 2022-06-21 11:07:19 -04:00
Anthony Hu
f05bcb30e0 div by 4 in milliseconds 2022-06-21 10:48:48 -04:00
Anthony Hu
ff4eabb17f same fix to MicriumReceive 2022-06-21 10:42:20 -04:00
Anthony Hu
1e84d1eb67 Change inspired by Rizlik review comments. 2022-06-21 10:22:44 -04:00
David Garske
d41745cd28 Merge pull request #5269 from anhu/micrium_xstr
Fixup XSTR processing for MICRIUM
2022-06-20 16:23:06 -07:00
Anthony Hu
0b0518bd55 Fixup XSTR processing for MICRIUM 2022-06-20 17:00:24 -04:00
Anthony Hu
73435389ed Fix missing WOLFSSL_DTLS in Micrium build 2022-06-20 16:33:04 -04:00
David Garske
38ac96aefb Merge pull request #5267 from douzzer/20220620-multi-test-fixes
20220620-multi-test-fixes
2022-06-20 12:13:39 -07:00
Daniel Pouzzner
69ca1d37c0 fixes for defects identified by wolfssl-multi-test: whitespace, missing void in arg lists, and -Wunused-but-set-variable found by clang-15 (prerelease). 2022-06-20 10:54:55 -05:00
David Garske
db6c14e7f9 Merge pull request #5265 from SparkiDev/dh_api_names
DH: Fix names wolSSL_* -> wolfSSL_*
2022-06-19 20:24:12 -07:00
Sean Parkinson
fab05f2527 DH: Fix names wolSSL_* -> wolfSSL_* 2022-06-20 08:58:35 +10:00
Sean Parkinson
59e19cfd6c Merge pull request #5258 from dgarske/stm32u5_bench
Fixes for STM32 Hash/PKA and additional benchmark
2022-06-20 08:33:25 +10:00
Hideki Miyazaki
b5cac49be9 fix qt_unit_test_failure
add/remove spaces and line-feed to be the same as before
2022-06-18 10:04:10 +09:00
David Garske
390908bccc Merge pull request #5236 from SparkiDev/mem_zero
Check memory is zeroized
2022-06-17 12:01:34 -07:00
David Garske
92fcea39db Fix for DES3 with STM32 and STM32_CRYPTO_AES_ONLY (broken in #5223) . Add U5 PKA support and benchmarks. Fix MD5 with OPENSSL_EXTRA and HAVE_MD5_CUST_API. 2022-06-17 11:50:29 -07:00
David Garske
9c5821569f For STM32 hashing to wait for hash done on block size + 1 word. Updated the STM32U5 benchmarks. Added note about new GCM_TABLE_4BIT. 2022-06-17 09:07:45 -07:00
David Garske
2f6b5a97a4 Merge pull request #5257 from SparkiDev/i2d_RSA_fix
i2d AIPs move pointer on when a pointer to a buffer is passed in
2022-06-16 21:44:23 -07:00
Sean Parkinson
6a0682d422 i2d AIPs move pointer on when a pointer to a buffer is passed in
Restore behaviour to be compatible with OpenSSL.
Replace comparison of DER data using AsserStrEQ to use memcmp.
2022-06-17 12:36:06 +10:00
Sean Parkinson
66775d90d4 Merge pull request #5250 from dgarske/rsa_public
Fix to expose the RSA public DER export functions with certgen
2022-06-17 12:25:19 +10:00
Sean Parkinson
4fc709d2af Merge pull request #5256 from dgarske/cert_chain_der
Fixes for loading a DER/ASN.1 certificate chain
2022-06-17 11:55:49 +10:00
David Garske
6795e1bf21 Attempt to fix issue with duplicate prototype wc_RsaKeyToPublicDer with FIPS v2 selftest. 2022-06-16 16:51:51 -07:00