Commit Graph

5434 Commits

Author SHA1 Message Date
Michael Shihrer
9269298034 Merge branch 'hexiwear_pr' of https://github.com/shihrer/wolfssl into hexiwear_pr 2017-05-01 12:04:35 -06:00
Michael Shihrer
abe5a318f2 Added hexiwear to include.am and removed dev environment specific variable 2017-05-01 10:44:09 -06:00
Michael
b08e5f3b82 Merge branch 'master' into hexiwear_pr 2017-04-14 12:03:42 -06:00
Michael Shihrer
21d2becd6b Modified settings.h to allow building on KSDK 1.3, modified test.c and benchmark.c to work with KSDK, added KDS project for building wolfSSL for Hexiwear 2017-04-14 12:02:28 -06:00
toddouska
f2ac410f1e Merge pull request #858 from dgarske/fix_bench_count
Fix build/test error with `--enable-scrypt` and build error for ARMv8 AES init
2017-04-13 21:14:44 -07:00
Jacob Barthelmeh
ebde18af59 silence static analysis tool warning about null parameter after sanity check 2017-04-13 15:32:31 -06:00
Jacob Barthelmeh
620d21c850 fix scrypt test with no password 2017-04-13 15:06:26 -06:00
David Garske
3df47d57ab Fix error with armv8-aes wc_AesInit function using h instead of heap variable. (moved from PR #852). 2017-04-13 14:50:55 -06:00
David Garske
4c6a70861b Fix build errors with --enable-scrypt. 2017-04-13 09:37:48 -07:00
JacobBarthelmeh
3ac35ce3b3 Merge pull request #838 from SparkiDev/curve25519_51-bit
Curve25519 51-bit Implementation
2017-04-12 16:06:37 -06:00
dgarske
8ee9e4ff8b Merge pull request #851 from toddouska/nosessid
don't send session ID on server side if session cache is off unless w…
2017-04-12 14:50:43 -07:00
toddouska
3abcff4db5 Merge pull request #850 from JacobBarthelmeh/Testing
fix invalid check on unsigned type
2017-04-12 13:56:44 -07:00
toddouska
27d009475c Merge pull request #847 from dgarske/distro_options
Fixes for --enable-distro to include more features by default
2017-04-12 13:56:24 -07:00
toddouska
e1a53a6c36 Merge pull request #845 from SparkiDev/cert_file
Rename caCertFile
2017-04-12 13:55:56 -07:00
toddouska
4f7b27fc88 Merge pull request #844 from SparkiDev/size_t-printf
32-bit size_t and printf fix
2017-04-12 13:54:52 -07:00
toddouska
3810571e0d Merge pull request #715 from dgarske/async_intelqa
Intel QuickAssist (QAT) support and async enhancements/fixes
2017-04-12 13:54:19 -07:00
toddouska
b1d59a2334 don't send session ID on server side if session cache is off unless we're echoing session ID as part of session tickets 2017-04-12 10:54:19 -07:00
David Garske
11133e578d Fixes and cleanups based on feedback from Sean. Added ifdef checks around WC_PENDING_E code to reduce code size for non-async builds. Cleanup accumulative result code checking in SSL_hmac. Cleanup of the RSA async state advancement. 2017-04-12 10:07:38 -07:00
Jacob Barthelmeh
b510c8199e fix invalid check on unsigned type 2017-04-12 10:41:35 -06:00
David Garske
d0f31d4a30 Fix issue with wc_ecc_make_key where state failure can occur if the wc_ecc_init hasn’t been called on key prior. Now wc_ecc_make_key and wc_ecc_import_private_key (and _ex versions) can be called without having to call wc_ecc_init first. This keeps backwards compatibility. If async or static memory is desired then wc_ecc_init_ex must be called first. 2017-04-11 15:57:09 -07:00
David Garske
85bef98331 Fix wc_ecc_alloc_rs memset logic. Fix error handling in hmac.c for SHA224. Cleanup of the wc_DhGenerateKeyPair_Async function. Added comment about the “BuildTlsFinished” allocation for hash buffer. Fixed issue with example server that caused the benchmark script to fail in throughput mode. 2017-04-11 14:13:08 -07:00
dgarske
213afe18c3 Merge pull request #842 from JacobBarthelmeh/Testing
fix c32toa needed with --enable-session-ticket
2017-04-10 19:10:35 -07:00
David Garske
eb1a191fd2 Refactor to add the wc_HmacInit and wc_HmacFree calls. 2017-04-10 14:47:08 -07:00
David Garske
e419a6f899 Fixes and cleanups based on feedback from Sean. 2017-04-10 14:47:07 -07:00
David Garske
62e7dc87c3 Fix merge error with verify callback and totalCerts. 2017-04-10 14:45:05 -07:00
David Garske
56a1618ba0 Fixes to a few things based on peer review. 2017-04-10 14:45:05 -07:00
David Garske
c1640e8a3d Intel QuickAssist (QAT) support and async enhancements/fixes:
* Adds ./configure "--with-intelqa=../QAT1.6”, port files, memory management and README.md (see wolfcrypt/src/port/intel/).
* Added Intel QAT support for RSA public/private (CRT/non-CRT), AES CBC/GCM, ECDH/ECDSA, DH, DES3, SHA, SHA224, SHA256, SHA384, SHA512, MD5 and HMAC.
* wolfSSL async enabled all client and server: PKI, Encrypt/Decrypt, Hashing/HMAC and Certificate Sign/Verify.
* wolfSSL async support in functions: Encrypt, Decrypt, VerifyMAC, BuildMessage, ConfirmSignature, DoCertificate, ParseCertRelative, and MakeSignature.
* wolfCrypt test and benchmark async support added for all HW acceleration.
* wolfCrypt benchmark multi-threading support.
* Added QuickAssist memory overrides for XMALLOC, XFREE and XREALLOC. XREALLOC determines if existing pointer needs reallocated for NUMA.
* Refactor to make sure “heap” is available for async dev init.
* Added async support for all examples for connect, accept, read and write.
* Added new WC_BIGINT (in wolfmath.c) for async hardware support.
* Added async simulator tests for DES3 CBC, AES CBC/GCM.
* Added QAT standalone build for unit testing.
* Added int return code to SHA and MD5 functions.
* Refactor of the async stack variable handling, so async operations have generic args buffer area and cleanup function pointer.
* Combined duplicate code for async push/pop handling.
* Refactor internal.c to add AllocKey / FreeKey.
* Refactor of hash init/free in TLS to use InitHashes and FreeHashes.
* Refactor of the async event->context to use WOLF_EVENT_TYPE_ASYNC_WOLFSSL for WOLFSSL* and WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT for WC_ASYNC_DEV*.
* Suppress error message for WC_PENDING_E.
* Implemented "wolfSSL_EVP_MD_CTX_init" to do memset.
* Cleanup of the openssl compat CTX sizes when async is enabled.
* Cleanup of AES, DES3, DH, SHA, MD5, DES3, DH, HMAC, MD5 for consistency and readability.
* Cleanup of the OPAQUE_LEN.
* Cleanup to use ENCRYPT_LEN instead of sizeof(ssl->arrays.preMasterSecret).
* Changed ssl->arrays.preMasterSecret to use XMALLOC (accelerates HW operations)
* Reduce verbosity with debug enabled for "GetMyVersion", "wolfSSL Using RSA OAEP padding" and "wolfSSL Using RSA PKCSV15 padding".
* Updated RSA un-padding error message so its different than one above it for better debugging.
* Added QAT async enables for each algorithm.
* Refactor of the async init to use _ex.
* Added WC_ASYNC_THRESH_NONE to allow bypass of the async thresholds for testing.
* Reformatted the benchmark results:
PKI: "RSA 2048 private HW 18522 ops took 1.003 sec, avg 0.054 ms, 18467.763 ops/sec"
Crypto/Hashing: SHA-256 SW 350 megs took 1.009 seconds, 346.946 MB/s Cycles per byte = 9.87
* Added min execution time for all benchmarks.
* Moved wc_*GetHash and wc_*RestorePos to appropriate files so use of isCopy flag is local.
* Fix for ECC sign status sometimes being invalid due to uninitialized ECC digest in benchmark.
* Added new DECLARE_VAR/FREE_VAR and DECLARE_ARRAY/FREE_ARRAY macros for helping setup test/benchmark variables to accelerate async.
* Added NO_SW_BENCH option to only run HW bench.
* Added support for PRNG to use hardware SHA256 if _wc devId provided.
* Fix to prevent curve tests from running against wrong curve sizes. Changed wc_ecc_set_curve to match on exact size.
* Added the wc_*GetHash calls to the wolfCrypt tests.
* Added async hardware start/stop to wolfSSL init/cleanup.
* Refactor to add wc_*Copy for hashing context (for async), which replaces wc_*RestorePos.
* Fixes for building with TI hashing (including: SHA224, missing new API’s and building with dummy build for non hw testing). Note: We need to add build test for this `./configure CFLAGS="-DWOLFSSL_TI_HASH -DTI_DUMMY_BUILD”`.
* Added arg checks on wc_*GetHash and wc_*Copy.
* Cleanup of the BuildMD5, BuildSHA, BuildMD5_CertVerify and BuildSHA_CertVerify functions.
* Added new ./configure --enable-asyncthreads, to allow enable/disable of the async threading support. If --enable-asynccrypt set this will be enabled by default if pthread is supported. Allows multi-threaded benchmarks with async simulator.
* Added checks for all hashing to verify valid ->buffLen.
* Fix for SHA512 scan-build warning about un-initialized “W_X”.
* Fix for valgrind un-initialized use of buffer in AllocDer (der->buffer) and BuildTlsFinished handshake_hash.
* Refactor of the benchmarking to use common function for start, check and finish of the stats.
* Fixed issue with ECC cache loading in multi-threading.
* Fix bug with AESNI not aligned code that assumes XMALLOC is 16-byte aligned.
* Added new WC_ASYNC_NO_… options to allow disabling of individual async algorithms. New defines are: WC_ASYNC_NO_CRYPT, WC_ASYNC_NO_PKI and WC_ASYNC_NO_HASH. Additionally each algorithm has a WC_ASYNC_NO_[ALGO] define.
* Added “wolfSSL_GetAllocators” API and fixed the wolfCrypt memcb_test so it restores callback pointers after test is complete (fixes issue with using custom allocators and test breaking it).
2017-04-10 14:45:05 -07:00
David Garske
dc65a9a277 Distro fix to enable SHA224 by default. Was causing Debian build error since SHA224 is enabled by default only for the x86_64 architecture. Updated --enable-distro option to include new features for aeskeywrap, x963kdf and scrypt. Changed the ECC custom curve option to enable all curve types when used with distro. 2017-04-10 11:45:26 -07:00
Sean Parkinson
5edcf685ca Rename caCertFile 2017-04-10 10:38:16 +10:00
Sean Parkinson
335b6d41c1 32-bit size_t and printf fix 2017-04-10 10:26:36 +10:00
Sean Parkinson
cbe46f8d74 Include new file in dist 2017-04-10 08:30:44 +10:00
toddouska
e8971c361a Merge pull request #830 from kaleb-himes/suite-typo
Fixes for using default ciphers
2017-04-07 17:20:54 -07:00
Jacob Barthelmeh
80d88b9421 fix c32toa needed with --enable-session-ticket 2017-04-07 11:46:27 -06:00
David Garske
4ff2903b55 Fix to allow anonymous ciphers to work with the new default suite testing. 2017-04-07 10:20:41 -07:00
David Garske
eb40175cc6 Fix to calc BuildSHA_CertVerify if WOLFSSL_ALLOW_TLS_SHA1. Fix to add check for DTLS to not allow stream ciphers. Removed the RC4 tests from the test-dtls.conf. Added support for using default suites on client side. Switched the arg to “-H”. Cleanup of the example server/client args list. Fixes for build with “--disable-sha”. 2017-04-07 10:20:41 -07:00
David Garske
6a1ae7ee5b Fix on server side to make sure SHA hash is setup even with NO_OLD_TLS. Fix to initialize hsHashes to zero. Fix in PickHashSigAlgo to not default to SHA if NO_OLD_TLS is defined (unless WOLFSSL_ALLOW_TLS_SHA1 is set). Fix to allow pre TLS 1.2 for “AES128-SHA256” and “AES256-SHA256”. 2017-04-07 10:20:18 -07:00
David Garske
b14da2622e Fix InitSuites to allow old TLS for DHE_RSA with AES 128/256 for SHA256. Reverted changes to test.conf and test-dtls.conf. 2017-04-07 10:20:18 -07:00
David Garske
4dcad96f97 Added test for server to use the default cipher suite list using new “-U” option. This allows the InitSuites logic to be used for determining cipher suites instead of always overriding using the “-l” option. Now both versions are used, so tests are done with wolfSSL_CTX_set_cipher_list and InitSuites. Removed a few cipher suite tests from test.conf that are not valid with old TLS. These were not picked up as failures before because wolfSSL_CTX_set_cipher_list matched on name only, allowing older versions to use the suite. 2017-04-07 10:20:18 -07:00
kaleb-himes
b827380baf Typo in cipher suite pre-processor macro 2017-04-07 10:19:24 -07:00
toddouska
4e703b6805 Merge pull request #839 from JacobBarthelmeh/Testing
build with session tickets and without client
2017-04-07 09:39:47 -07:00
toddouska
2b443a79f2 Merge pull request #836 from dgarske/stack_check_free
Fix leak in StackSizeCheck and build error with debug enabled
2017-04-07 09:35:01 -07:00
toddouska
ecaaf19ebf Merge pull request #835 from dgarske/fix_name_conflict
Fix name conflicts in wolfCrypt test with --enable-stacksize
2017-04-07 09:33:00 -07:00
David Garske
2c13ea9a67 Cleanup name conflicts with test.h cert files (by adding “File” to end). Fix memory leak in ecc_test_buffers function. 2017-04-06 15:54:59 -07:00
Jacob Barthelmeh
b49a2561bc build with session tickets and without client 2017-04-06 16:19:21 -06:00
dgarske
9ef26679df Merge pull request #833 from SparkiDev/asn_func
ASN Code Rework
2017-04-06 12:47:40 -07:00
JacobBarthelmeh
bb8e67b79c Merge pull request #837 from cconlon/release-3.10.4
3.10.4 release
2017-04-06 11:39:31 -06:00
toddouska
c8400e9ff1 Merge pull request #824 from dgarske/fix_asn_confirm_sig
Fix for return code checking on ConfirmSignature
2017-04-05 16:58:47 -07:00
Sean Parkinson
b11bb5325a Implementation of 51-bit curve25519 2017-04-06 09:48:01 +10:00
Chris Conlon
c9bb75c0f3 3.10.4 release 2017-04-05 16:37:35 -06:00
David Garske
d648d4f6c7 Fix leak in StackSizeCheck. Fix build error with debug enabled and stack size check. 2017-04-05 14:24:55 -07:00