Daniel Pouzzner
c194fb3beb
lkm: add autodetection of kernel stack frame size; reactivate objtool scrutiny since _asm files are indeed not yet kernel-compatible; delete linuxkm/lkm_testcrypto.c and use wolfcrypt/test/test.c.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
535822f4df
wolfcrypt/test/test.c: refactor for stack size and namespace control, allowing embedding of wolfcrypt_test() in kernel module.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
f5975d95db
src/ssl.c: use heap for workspace in wolfSSL_X509_sign(), wolfSSL_d2i_RSAPrivateKey_bio(), and wolfSSL_CTX_use_RSAPrivateKey().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9ca94d6ca7
wolfcrypt/src/ge_448.c: refactor ge448_double_scalarmult_vartime() to use heap for workspace unless WOLFSSL_NO_MALLOC.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
1735bd7430
lkm_testcrypto.c: refactor subtests at end of dh_test() to use ERROR_OUT() with proper codes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
217ec4ebd3
lkm: tweaks to self-test dynamics/messages.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
554879da00
lkm: self-test working now (certain options, which ones TBD, crash kernel).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
34fd53b4fc
linuxkm: WIP support for wolfcrypt_test() at module load time.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0c35998178
linuxkm/module_hooks.c: log "cleanup complete" at unload time.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
92df5692b1
wolfcrypt/src/ecc.c: revert to commit g0fa5af9, which has all the necessary fixes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0cfe9ca5d6
configure.ac: --enable-linuxkm: improved defaults and consistency checking.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
92406e17ca
wolfssl/wolfcrypt/settings.h: for _LINUXKM, set WOLFSSL_SP_DIV_64 to help avoid gcc xdivti3() references.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
5efdee4277
wolfssl/wolfcrypt/types.h: tweak _LINUXKM macros XMALLOC(), XFREE(), and XREALLOC() to dummy-use "heap" and "dynamic type" arguments.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
add78dfba9
wolfcrypt/src/sp_int.c: add _LINUXKM do_div codepaths for a couple more 64 bit divisions, in sp_div_word() and sp_mod_d().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9ab1df690a
wolfcrypt/src/ecc.c: fix uncompilable !WOLFSSL_SP_MATH && WOLFSSL_SMALL_STACK_CACHE implementations of ecc_key_tmp_init() and ecc_key_tmp_free() (the latter misnamed ecc_key_tmp_final()).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
836915d05f
linuxkm: configure.ac more incompatible options: --enable-fastmath, --enable-iopool, and --enable-fips; linuxkm/Makefile: reduce -Wframe-larger-than from 65536 to kernel-compatible 5000; wolfssl/wolfcrypt/settings.h: unset HAVE_THREAD_LS when WOLFSSL_LINUXKM; wolfssl/wolfcrypt/types.h: when NO_INLINE and __GNUC__, #define WC_INLINE __attribute__((unused)) rather than to nothing to avoid -Wunused-function warnings; wolfssl/wolfcrypt/wc_port.h: #undef noinline after Linux kernel header includes (another macro conflict).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
03d5a4eadd
wolfcrypt/src/integer.c: mp_div_d(): refactor another 64 bit division to use do_div() when WOLFSSL_LINUXKM.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2a3fd57b36
linuxkm/Kbuild, linuxkm/module_hooks.c: tweaks for buildability on kernel 4.9 (may also fix build on 3.x).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2591479866
linuxkm: add macros mapping malloc(), free(), and realloc() to the kernel equivalents, don't set WOLFSSL_NO_MALLOC, and reduce -Wframe-larger-than= from 256k to 64k; tweak fix for HAVE_INTEL_RDSEED conflict with WOLFSSL_LINUXKM; add clean rule to linuxkm/Makefile.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
911b23d2b4
configure.ac: check for incompatible combinations, and restore check for non-empty $KROOT when --enable-linuxkm.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2bcdfce6df
wolfcrypt/src/evp.c: tweak to silence gcc -Wmaybe-uninitialized.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
dff5344d82
configure.ac: when --enable-asm (default on), for gcc amd64 target always include -msse4 even if not --enable-intelasm (it's needed for TFM_X86_64 inline asm).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
c0d831ea3a
whoops, can't assert on non-empty "$(AM_CCASFLAGS)$(CCASFLAGS)" in linuxkm/Makefile -- they are often legitimately empty.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
1aa15632ce
initial buildability of full libwolfssl.ko loadable kernel module for Linux via ./configure --enable-linuxkm && make.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0e480d1a14
Linux KM compilability cont'd: conform to C89isms (declarations before statements); iffdef WOLFSSL_LINUXKM use do_div() for long long division rather than C operator (avoids unresolvable compile-time callouts to libgcc function); misc gating and relocations for includes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
603da9e747
fix whitespace.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
14e3da9206
.gitignore: add *~ for emacs backup files.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
bc1c85842d
WIP: autotools support for LKM
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0f783077f8
fix stray whitespace
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
dd825d90c4
more LKM WIP: polish up the struct DRBG refactor ("struct DRBG_internal"), tweaks for buildability on 3.x kernels (now builds on 3.x, 4.x, and 5.x up to 5.8.1), move a slew of #[un]def[ines] from wc_port.h to settings.h where they belong, misc cleanup.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
3c2155f4a9
linuxkm WIP -- update for kernels 4.9.x (LTS representative) and 5.8.x (latest).
2020-09-23 18:32:15 -05:00
David Garske
6425ebb60e
Linux Kernel Module support using "--enable-linuxkm".
2020-09-23 18:32:15 -05:00
toddouska
1c07de883c
Merge pull request #3306 from SparkiDev/tls13_pha_psk
...
TLS 1.3: Post-handshake Authentication and resumption secret
2020-09-23 16:06:55 -07:00
toddouska
2bb8427ab2
Merge pull request #3320 from dgarske/stmcube
...
STM32 Cube Pack and AES GCM improvements
2020-09-23 14:39:53 -07:00
Chris Conlon
b7fb202ad3
Merge pull request #3294 from miyazakh/espidf_win
...
Add setup script for ESP-IDF windows
2020-09-23 14:15:17 -06:00
David Garske
c46301f111
Merge pull request #3328 from ejohnstown/fips-ready-fix
...
FIPS Ready Windows Fix
2020-09-23 12:18:23 -07:00
David Garske
ecd5a015eb
Merge pull request #3317 from ejohnstown/evp-fix
...
EVP Fix
2020-09-23 11:10:07 -07:00
toddouska
b0998fb030
Merge pull request #3327 from SparkiDev/pkcs11_ecc
...
PKCS#11 fix: Generate ECC key for decrypt/sign or derive
2020-09-23 09:28:53 -07:00
toddouska
ad00cf0fc8
Merge pull request #3268 from dr-m/intel-intrinsics
...
Use Intel intrinsic functions for RDSEED and RDRAND
2020-09-23 09:24:47 -07:00
toddouska
2f74817e32
Merge pull request #3288 from embhorn/zd10901
...
Fix mp_radix_size off by 1 error
2020-09-23 09:19:02 -07:00
toddouska
cee99de6e1
Merge pull request #3324 from JacobBarthelmeh/Testing
...
fix WOLFSSL_X509_NAME parse of empty field and add test case
2020-09-23 09:15:24 -07:00
Sean Parkinson
4ed3438be0
TLS 1.3: Post-handshake Authentication and resumption secret
...
The master secret in arrays is not available post-handshake.
Use the master secret in the session when calculating resumption secret.
2020-09-23 17:09:06 +10:00
John Safranek
07e1baadc9
EVP Fix
...
Change a few missed strings to use the constant names.
2020-09-22 15:55:46 -07:00
David Garske
f1effea638
Improve the IDE/WIN10 readme to clarify the difference between this and IDE/WIN.
2020-09-22 15:55:08 -07:00
Sean Parkinson
e539322a88
PKCS#11 fix: Generate ECC key for decrypt/sign or derive
...
Add debugging information to PKCS#11.
2020-09-23 08:30:22 +10:00
John Safranek
54c4258c4b
FIPS Ready Windows Fix
...
1. Modify the WIN10 FIPS solution user_settings.h to check for a
FIPS Ready flag and to override HAVE_FIPS_VERSION to 3 if set.
2. Removed some redundant constants from the EVP file.
2020-09-22 15:23:36 -07:00
David Garske
41ebc9161a
Fix include.am for the renamed configuration example wolfSSL_conf.h
2020-09-22 15:18:11 -07:00
David Garske
99d96246bd
Fix for STM32 issue with some Cube HAL versions (such as F777) which could modify non-block aligned bytes in the output buffer during decrypt. For TLS these bytes are the authentication tag. Workaround is to save off the incoming expected authentication tag. ZD 10961.
2020-09-22 15:04:30 -07:00
John Safranek
87d042e37d
EVP Fix
...
Clean up a bad guard check for AES-CTR.
2020-09-22 09:46:27 -07:00
Chris Conlon
8816577824
Merge pull request #3319 from kojo1/no_dh
...
fix NO_DH guard
2020-09-22 10:33:01 -06:00