12989 Commits

Author SHA1 Message Date
Daniel Pouzzner
53c6d33695 test.c:aes_test(): add WOLFSSL_SMALL_STACK codepaths for WOLFSSL_AESNI test. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
1c0df61247 wolfssl/test.h and wolfcrypt/test/test.c: add STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK(), recognize macro WOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES, and add to wolfcrypt_test() runtime settability of relative cumulative stack depth assert threshold using "-s stacksize". 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
2ed75402b8 wc_DsaSign(): removal several redundant mp_clear()s preceded by mp_forcezero()s. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
bfff28ab28 ecc.c: fix mp_init_multi() vs mp_clear() dynamics in wc_ecc_verify_hash_ex() and mp_sqrtmod_prime(). 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
ec96e5ad74 wolfSSL_BN_is_odd(): fix function signature to match header (unsigned long reverted to WOLFSSL_BN_ULONG). 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
525382fb13 test.c:pkcs7authenveloped_run_vectors(): small stack refactor, and reenable for WOLFSSL_LINUXKM. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
18984abc9e configure.ac: replace --enable-stacksize-verbose with --enable-stacksize=verbose, and change _LINUXKM_DEFAULTS ENABLED_SP_DEFAULT and ENABLED_SP_MATH_ALL_DEFAULT from small to yes. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
4efa85dc03 linuxkm/module_hooks.c: add support for WOLFCRYPT_ONLY. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner
f73fc23282 ecc.c: add smallstack codepaths to ecc_mul2add(). 2020-12-11 14:16:44 -06:00
David Garske
cb8c6608f3
Merge pull request #3558 from douzzer/fix-mp_mod_2d-sub-byte-clearing
fix mp_mod_2d() for DIGIT_BIT != sizeof(mp_digit)*8
2020-12-11 08:43:51 -08:00
Elms
40087f1fd0 SiLabs: AES return code fixup and comment cleanup 2020-12-10 22:56:11 -08:00
Sean Parkinson
8b2bd1277a
Merge pull request #3551 from douzzer/fix-unit-test-EVP-arc4-32-bit
32 bit targets vs test_wolfSSL_EVP_X_STATE_LEN()
2020-12-11 16:46:10 +10:00
Sean Parkinson
3e8e7aa17f
Merge pull request #3550 from douzzer/sp-math-all-sp-word-typo
sp_int.c: fix typos in _sp_mul_4() and _sp_sqr_4().
2020-12-11 16:16:48 +10:00
Daniel Pouzzner
ef1284165f wolfcrypt/src/integer.c: fix sub-byte clearing step of mp_mod_2d() to work when DIGIT_BIT != sizeof(mp_digit)*8. 2020-12-10 23:50:30 -06:00
Jacob Barthelmeh
04e22b0747 add restriction to excluded DIR name constraint 2020-12-11 10:00:11 +07:00
Jacob Barthelmeh
f00263889b add test case 2020-12-11 08:20:48 +07:00
Sean Parkinson
a075540343
Merge pull request #3552 from tmael/shiftNeg
Check shift value
2020-12-11 10:19:27 +10:00
Tesfa Mael
9042843e42 Fix shift and clear digits 2020-12-10 16:13:30 -08:00
toddouska
2c652151ac
Merge pull request #3510 from SparkiDev/sp_modinv_nct
SP modinv: add non-constant time modinv
2020-12-10 16:06:12 -08:00
toddouska
cb61dc7d2f
Merge pull request #3522 from douzzer/cleanups-20201119
misc cleanups re sp-math-all, FIPS, smallstack
2020-12-10 15:58:33 -08:00
Takashi Kojo
47f7e46ffe Add wc_RsaPSS_Sign/Verify/CheckPadding 2020-12-11 07:58:39 +09:00
Jacob Barthelmeh
17f32c3e05 add strict check on name constraints with DIR alt names 2020-12-11 05:22:46 +07:00
Daniel Pouzzner
e9a79b2e0d configure.ac: fix rebase error, re enable-sp-asm on ARM. 2020-12-10 14:46:22 -06:00
Glenn Strauss
59cefd2c99 match preproc defs around wolfSSL_ctrl()
match preproc defs around wolfSSL_ctrl() in src/ssl.c
2020-12-10 15:46:20 -05:00
Glenn Strauss
9d095066eb wrap SNI-related code with HAVE_SNI
perhaps some of this code should additionally be wrapped in
-  #ifndef NO_WOLFSSL_SERVER

It is fragile and ugly to litter the code with the likes of
-  #if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && (defined(HAVE_STUNNEL) || \
-                               defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY) || \
-                               defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_OPENSSH) ))
while it is much clearer and much more maintainable to wrap SNI-related
code with an SNI-specific feature-define HAVE_SNI (and possibly further
restrict with feature-define #ifndef NO_WOLFSSL_SERVER).
2020-12-10 15:46:20 -05:00
Daniel Pouzzner
f4af6c053c wolfssl/openssl/aes.h: restore ALIGN16 attribute to pad member of struct WOLFSSL_AES_KEY. 2020-12-10 14:21:19 -06:00
Daniel Pouzzner
0fa4bde5b5 configure.ac: move --enable-sp-asm handling to follow --enable-sp-math-all handling, so that $ENABLED_SP requirement is properly met. 2020-12-10 14:21:08 -06:00
Daniel Pouzzner
f277339528 add explicit casts to XMALLOC()s, even for (void *), to avoid warnings in C++ and MSVC/MSVS builds, and to avoid false positives on simple text searches. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f47cdfcaed wolfcrypt/test/test.c: fix skipped initialization warned by LLVM11 scan-build. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
3b8e7d546a sp_int.h: force C linkage, so that enable-sp-math-all is compatible with CC=g++. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
741098c108 sp_int.c, srp.c: fixes for 5 deadcode.DeadStores found by LLVM11 scan-build. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f49e9bf954 dsa.c, srp.c, wolfcrypt/test/test.c: smallstack refactors: wc_DsaExportKeyRaw(), wc_DsaSign(), wc_SrpSetKey(), ecc_test_cdh_vectors(), ecc_test_custom_curves(). 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
1fc2c7714c hmac.c: include wc_port.h rather than settings.h, to pick up WOLFSSL_LINUXKM namespace tweaks. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f4ecaf05c0 openssl/aes.h: refactor WOLFSSL_AES_KEY typedef to inline sizeof(Aes) long words, rather than computing the size of Aes from its members. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
b723c7ddbe bn.h and ssl.c: define WOLFSSL_BN_ULONG to be target-native unsigned long, revert *_word() bn.h API functions to use WOLFSSL_BN_ULONG, and change wolfSSL_BN_get_word() to return WOLFSSL_BN_ULONG rather than unsigned long, for consistency. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
27a6de2c2f configure.ac, wolfssl/wolfcrypt/settings.h, wolfssl/wolfcrypt/wc_port.h: update linuxkm defaults and settings for compatibility with sp-math-all, and change linuxkm default math from sp-math to sp-math-all; refactor enable-all and enable-all-crypto logic to allow piecemeal exclusion of options from the command line. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
78b2b3ca3b ssl.c:wolfSSL_BN_get_word_1(): remove dead logic inadvertently retained. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f7bf0a78fb test.c:ecc_test_curve_size(): use a macro, not a static const size_t, for size of exportBuf, to make MS Visual Studio happy. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
89e6b1eebc wc_ecc_mulmod_ex(): be more careful freeing temp key. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
e6b587772f fix pointer type clash in wolfSSL_BN_mod_word(); restore accidentally removed WOLFSSL_KEY_GEN gate in dsa_test(). 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
cbc190f13c wolfcrypt/src/ecc.c: smallstack refactors of wc_ecc_mulmod_ex() and mp_sqrtmod_prime(). 2020-12-10 14:16:21 -06:00
Daniel Pouzzner
ad2cb67047 wolfcrypt/test/test.c: _SMALL_STACK refactors of dsa_test(), srp_test(), openssl_pkey1_test(), and ecc_test_curve_size(); add missing FIPS gates. 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
5286cb1a46 optimize domain check in wolfcrypt/src/integer.c and wolfcrypt/src/tfm.c. 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
53cfa55941 src/ssl.c and wolfssl/openssl/bn.h: refactor _word mp routines to consistently accept/return target-native unsigned long type, for compatibility with sp-math-all. needed because WOLFSSL_BN_ULONG can, surprisingly, be only 16 bits, when sp-math-all in a 32 bit build. 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
7cfe1e2143 sha3.h: rename struct Sha3 to struct wc_Sha3 for consistency, and compatibility with FIPS source. 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
cfc08cc13f configure.ac: remove smallstackcache from linuxkm default options; add several feature exclusions to enable-all and enable-all-crypto to make them compatible with fips=ready; render the FIPS option in the feature summary at end. 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
2a2ba896ec documentation typo: wc_InitSha356() sounds like an interesting algorithm but, alas, we will have to settle for wc_InitSha256(). 2020-12-10 14:16:20 -06:00
Daniel Pouzzner
c5e2ccabb1 fix --enable-stacksize-verbose: relocate declarations for HAVE_STACK_SIZE_VERBOSE global variables from wolfssl/test.h to wolfssl/wolfcrypt/logging.h, matching their location in wolfcrypt/src/logging.c. 2020-12-10 14:16:20 -06:00
toddouska
b93109cf1c
Merge pull request #3540 from SparkiDev/int_toradix_fix
MP integer: fix map string for toradix and read_radix
2020-12-10 12:01:45 -08:00
toddouska
cd3b91a8fe
Merge pull request #3536 from SparkiDev/arm64_rev
ByteReverseWord32 AARCH64: Use proper instruction - REV32
2020-12-10 11:59:00 -08:00