Commit Graph

102 Commits (ed2c20a3b2317f49b51daf54eb537304b0ded9a6)

Author SHA1 Message Date
Anthony Hu f77a5e26b5 semi-colon --> colon and use wolfTLSv1_3_server_method when NO_WOLFSSL_CLIENT. 2021-10-04 18:31:28 -04:00
Anthony Hu 310ab6692a Drop a function brace and WOLFSSL_TLS13. 2021-10-04 13:56:01 -04:00
Anthony Hu 2fa0114d54 Benchmarking the supported groups. 2021-10-01 15:38:07 -04:00
Eric Blankenhorn 2274d0b773 Fix overflow check in ClientMemSend 2021-09-14 11:17:01 -05:00
Anthony Hu 7c75b9836e Changes to make Jenkins happy and reduce verbosity.
- added HAVE_PTHREAD guards
- usleep ---> XSLEEP_MS
- only print polling message if verbose output requested.
2021-08-12 11:13:15 -04:00
Anthony Hu 586317f198 Fix a race condition in the benchmark example and all output goes to stderr. 2021-08-11 17:07:01 -04:00
David Garske 77df7d8630
Merge pull request #3968 from elms/pedantic_cleanup
Fixes for some `-pedantic` errors
2021-06-14 13:46:39 -07:00
Elms 5c01613acb Add GCC extension to bypass select `-pedantic` warnings
Add wrapper macro for `__extension__` to suppress pedantic warnings
2021-06-07 15:38:15 -07:00
David Garske c88afdef87 Fixes for building with `WOLFSSL_USER_IO` (with no built-in socket support). Related to issue #3998. 2021-05-06 11:07:05 -07:00
Jacob Barthelmeh c729318ddd update copyright date 2021-03-11 13:42:46 +07:00
David Garske fe08f23a50 Improved test sleep. Cleanup `sleep` calls. 2020-07-22 13:08:57 -07:00
Tesfa Mael 890500c1b1 Fix Coverity 2020-07-08 08:20:43 -07:00
kaleb-himes 951cb4aaf4 Fix building with one-side only tls13/dtls 2020-04-28 14:33:00 -06:00
Sean Parkinson 411aee6e05 Fixes from cppcheck
Added PRIVATE_D version of rsa private key operation for SP
implementation for specific platforms.
WC_NO_RNG results in warnings when RNG calls don't do anything.
Added ifdef checks for variables not used otherwise.
Remove superfluous if statements like when checking ret == 0.
Change names of globals that are generic and are used locally before
global definition.
Remove definition of variable len that isn't used except as a
replacement for sz which is parameter.
Don't subtract two variables when one has just been assigned the value
of the other.
Fix shifting of signed value.
Fix parameter checking in aes.c and des3.c for platform specific code.
2020-04-08 09:46:22 +10:00
Hideki Miyazaki 99b9f46e58 fixed not working on mac
fixed case of -s or -c
2020-03-27 12:33:51 +09:00
Hideki Miyazaki 9fac21f463 replace the size at bench_embedded 2020-03-25 08:09:42 +09:00
Hideki Miyazaki 75eca61b3e address review comments 2020-03-24 20:35:21 +09:00
Hideki Miyazaki 7d4b4e4994 added dtls benchmark 2020-03-22 17:56:28 +09:00
David Garske ef2c1ae738 Fix for `examples/benchmark/tls_bench.c:114:20: error: unused variable 'kShutdown'` with `WOLFCRYPT_ONLY`. 2020-02-23 19:01:46 -08:00
John Safranek aabdec214e
MinGW uses the Win32 setsockopt() function which uses a char for
SO_REUSEADDR's option. Everything else uses an int.
2020-01-21 10:53:19 -08:00
John Safranek 23427085af
1. Add an indent to a new line in user settings.
2. Remove the execute bit from the changed files.
2020-01-20 12:30:32 -08:00
Takashi Kojo a08ab1fc7a
fix mnGW error 2020-01-20 12:19:18 -08:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
Eric Blankenhorn 774a758f59 Fixes in test and example code 2019-12-17 15:56:40 -06:00
David Garske cb9f16d3cb Fix for proper sizing of in-memory buffer for TLS benchmarking (32 is not always the max digest size). 2019-11-18 10:34:15 -08:00
David Garske 0c2c4fd91b Improvements to tls_bench tool in wolfSSL lib for embedded use. 2019-11-15 12:09:19 -08:00
toddouska d620433d1d
Merge pull request #2209 from tmael/maintenanceDefects
Increased ciphers buffer size for testsuite and ECC API for getting curve from dp
2019-07-15 16:49:13 -07:00
David Garske b2f919ec13 Fix to include errno.h in tls_bench.c 2019-07-01 13:41:17 -07:00
Hideki Miyazaki efcf06ef7c use tlsv1_2 client method when tls13 is enabled 2019-06-07 19:13:46 +09:00
Hideki Miyazaki 292aa196fb minor fix to print stats in tls_bench 2019-06-07 12:05:19 +09:00
Tesfa Mael 3e7a6054a9 Use the macro instead of sizeof() 2019-05-02 14:13:48 -07:00
Tesfa Mael f8c9285b92 Added a WOLFSSL_CIPHER_LIST_MAX_SIZE macro 2019-04-22 16:30:38 -07:00
John Safranek 246c444b93 Updates for v4.0.0
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
David Garske e0b46734d6 Enhnacement to the tls_bench tool to support new `-S` command to indicate total size of data to exchange. Previously was just sending one packet back and forth. Imporved the shutdown handling code. 2019-02-12 16:03:10 -08:00
John Safranek 8edd7d0b17 Fix Checks
1. In the tls_bench, check the return code on wolfSSL_CTX_SetMinDhKey_Sz() as it is checked in the examples.
2019-01-17 10:32:34 -08:00
David Garske 003360237f Fixes for building with `NO_WOLFSSL_SERVER`. Minor test.h cleanups. 2019-01-07 10:08:16 -08:00
David Garske f3c08ae8b9 Better fixes for `ret` unused. 2019-01-03 12:42:31 -08:00
David Garske ff0a4eb69a Fix for float compare warning. Minor cleanups. 2019-01-03 11:40:04 -08:00
David Garske a7251e4158 Fixes for minor Jenkins build warnings. 2019-01-03 11:22:01 -08:00
David Garske ef916f2c55 Enhancements to the TLS benchmark tool:
* Added support for running as only Client (`-c`) or Server (`-s`).
* Added support for using sockets (in addition to in memory mode `-m`).
* Fixed support for 16KB test packet (memory version needed TLS header space). Changed to default to 16KB.
* Fixed so transfer is done on each connection and there is not transfer limit (instead "shutdown" message is used).
* Made pthread support optional and based on HAVE_PTHREAD.
* Tested non-blocking support with sockets or shared memory.

To use with localhost sockets and threading use `./examples/benchmark/tls_bench`
To use with threading and in-memory use `./examples/benchmark/tls_bench -m`
To use as separate server client applications with localhost sockets use: `./examples/benchmark/tls_bench -s` and `./examples/benchmark/tls_bench -c` in separate terminals.

```
./examples/benchmark/tls_bench -?
tls_bench 3.15.7 NOTE: All files relative to wolfSSL home dir
-?          Help, print this usage
-c          Run as client only, no threading and uses sockets
-s          Run as server only, no threading and uses sockets
-h          Host (default localhost)
-P          Port (default 11112)
-e          List Every cipher suite available
-i          Show peer info
-l <str>    Cipher suite list (: delimited)
-t <num>    Time <num> (seconds) to run each test (default 1)
-p <num>    The packet size <num> in bytes [1-16kB] (default 16384)
-v          Show verbose output
-d          Enable debug messages
-T <num>    Number of threaded server/client pairs (default 1)
-m          Use local memory, not socket
```
2019-01-03 10:57:39 -08:00
David Garske bbdb17975c Adds build option `WOLFSSL_EITHER_SIDE` for deferring the "side" of the TLS session until first connect or accept. Added the DTLS generic v1.0 and v1.2 methods for "either" side. Added "either" methods unit tests. Added "either" -v e support to example client/server. Fix to expose `wolfSSL_use_certificate_file` and `wolfSSL_use_PrivateKey_file` without `OPENSSL_EXTRA`. Cleanup of the methods for (void)heap and log messages. Spelling fixes. 2018-10-04 15:47:50 -07:00
David Garske 2c3475c1d6 Added new build option `--enable-memtest` or `WOLFSSL_FORCE_MALLOC_FAIL_TEST` which enables random malloc failures for testing. This test supresses the `abort()` calls to detect seg faults. A new script `./scripts/memtest.sh` starts the test. If an issue is found it can be reviewed with the `./scripts/memtest.txt` log and reproduced using the seed printed at top of unit test as `--- RNG MALLOC FAIL AT 295---` and rerun using `./tests/unit.test 295`. 2018-07-30 13:53:35 -07:00
Sean Parkinson abaa5daf43 Fix non-blocking and buffered I/O
Fix states in TLS 1.3 connect and accept to be monotonically increasing
by 1.
Always have a new state after a buffer is constructed to be sent.
Add non-blocking support into TLS benchmark and support TLS 1.3.
2018-06-28 08:49:32 +10:00
Sean Parkinson a03c15e598 Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests 2018-06-13 11:42:16 +10:00
Sean Parkinson ba8e441e53 Allow TLS 1.2 to be compiled out. 2018-05-25 11:00:00 +10:00
Eric Blankenhorn a0d8327320 Coverity fixes 2 (#1493)
* Coverity fixes for wolfcrypt folder
* Fixes for remaining issues
* Fixes for test files
2018-04-13 05:35:18 -07:00
Eric Blankenhorn 5439402c1d Refactor for max record size (#1475)
* Added new internal function `wolfSSL_GetMaxRecordSize`.
* Modified tls_bench to use dynamic buffer based on max record size.
* Added comment for DTLS maxFragment calculation.
2018-04-05 09:11:58 -07:00
Eric Blankenhorn adb817e8d2 Feature update for tls_bench test that will allow passing in arguments (#1466)
* Feature update for tls_bench test that will allow passing in command line arguments that enable test features.
* Fix type conversion errors.
* Fixed use of uninitialized data. Declare DH arrays as const.
2018-04-02 14:00:34 -07:00
David Garske e564c973b6 Refactor IO callback function names to use `_CTX_` to eliminate confusion about the first parameter. 2018-03-21 16:08:55 -07:00
Chris Conlon 306600cba6 resolve variable shadow warnings on older compilers in tls_bench example 2018-02-26 16:14:15 -07:00
David Garske 3e05118995 * Added the `tls_bench` example to the build output when threading is supported.
* Fixed some `tls_bench` build issues with various configure options.
* Moved the `WOLFSSL_PACK` and `WC_NORETURN` macros into types.h.
* Added support for `__builtin_bswap32` and `__builtin_bswap64`. Since the performance of the builtins varries by platform its off by default, but can be enabled by customer using `WOLF_ALLOW_BUILTIN`. Quick check on x86 showed the 32-bit swap performance matched, but 64-bit swap was slower.
2018-02-07 11:13:13 -08:00
David Garske bababf115a Moved to IDE/XCODE. Fixed build warnings with xcode. Updated the `user_settings.h` to support fast math, ECC, timing resistance, single precision math, ARMv8, SHA3, ChaCha20/Poly1305, Ed/Curve25519 and ensure default disables are defined. Added Xcode iOS benchmark example. Runs wolfCrypt test, wolfCrypt benchmark and the new TLS benchmark by cipher suite. 2017-12-07 11:02:19 +01:00