959 Commits

Author SHA1 Message Date
Marco Oliverio
060dfe1a69 server: fix wrong minVersion setting when non in dtls 2022-06-28 12:10:18 +02:00
Hideki Miyazaki
c34c32f621
translated Japanese messages 2022-06-24 08:09:28 +09: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
Marco Oliverio
fdc4cdf5ec examples: update usage() with DTLSv1.3 version 2022-06-22 18:50:18 +02: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
aa8df1af78 Fixes for building without DTLS v1.2 and TLS v1.2. Fixes for explicit cast warnings. 2022-06-15 10:49:18 -07:00
Marco Oliverio
12a3efeca8 client/server: tolerate WANT_WRITE errors 2022-06-15 10:46:43 -07:00
Marco Oliverio
4e112419f5 examples: client/server: support DTLSv1.3 (-u -v4)
This commits add some new options to examples/[server,client] to support testing
of DTLS v1.3.

client: add waitTicket option

If this option is used, the client will wait until it receives a sessionTicket
from the server. This is useful when testing DTLS retransmission.

client: add waitKeyUpdate option

When this option is set, the client waits until the UpdateKey message is
acknowledged by the server. This is useful to test DTLS retransmission logic
2022-06-15 10:46:43 -07:00
Marco Oliverio
c1dc90d9b0 server: request cert only once if doing post-handshake auth 2022-06-15 10:46:43 -07:00
Anthony Hu
22eee3206d Fixups from review by dgarske 2022-06-14 11:13:28 -04:00
Anthony Hu
4d4ee3b2db Support psk ciphersuites in benchmarks.
Also fixed some small errors during shutdown in benchmarks.

Tested with:

./configure --enable-psk CFLAGS=-DWOLFSSL_STATIC_PSK
make all check
./examples/benchmark/tls_bench
2022-06-13 13:33:51 -04:00
David Garske
d5791d5c74 Fixes for TLS benchmarking app (tls_bench) for shutdown and formatting brace cleanups. 2022-06-10 13:48:46 -07:00
kaleb-himes
96d5814bfe Implement peer review feedback 2022-06-03 11:06:46 -06:00
kaleb-himes
3bcdef1972 Fix various warnings and an uninitialized XFILE 2022-06-03 09:52:53 -06:00
David Garske
9cfcdfc7aa
Merge pull request #5149 from julek-wolfssl/store-frags-v2
Re-use async to support WANT_WRITE while sending fragments
2022-06-01 10:52:54 -07:00
Sean Parkinson
be743b2204 TLS 1.3: send ticket
Can send a new session ticket any time after handshake is complete with
TLS v1.3.
Added API for server application to do this.
Added tests.
2022-06-01 10:36:01 +10:00
Juliusz Sosinowicz
6245395f34 Simulate WANT_WRITE only with async I/O support 2022-05-27 23:23:18 +02:00
Juliusz Sosinowicz
50c0b3d2a2 Add testing/docs for blocking write
- Fix case where message grouping can make CheckAvailableSize return a WANT_WRITE
- CheckAvailableSize in tls13.c will not return a WANT_WRITE since it only does so for DTLS <=1.2
2022-05-27 21:26:55 +02:00
Daniel Pouzzner
c4920021d8 print errors to stderr, not stdout;
fix whitespace in internal.c;

add missing error handling in examples/server/server.c around recvfrom().
2022-05-12 13:07:32 -05:00
Juliusz Sosinowicz
44be4e1cc8 Reset ret in client and server after wolfSSL_dtls_got_timeout()
- Do UDP connect only with simulateWantWrite to accommodate macOS that doesn't like sendto being called on connected UDP sockets
- Call wolfSSL_dtls_get_current_timeout only on a DTLS connection
2022-05-12 16:48:04 +02:00
Juliusz Sosinowicz
9914da3046 Fix resumption failure and use range in connect state logic 2022-05-12 15:46:08 +02:00
Juliusz Sosinowicz
a31b76878f DTLS fixes with WANT_WRITE simulations
- WANT_WRITE could be returned in unexpected places. This patch takes care of that.
- Change state after SendBuffered only if in a sending state to begin with.
- Adapt client and server to simulate WANT_WRITE with DTLS
2022-05-12 15:46:08 +02:00
John Safranek
798d81723b
Merge pull request #5128 from rizlik/dtls_bidrectional_shutdown
Support DTLS bidirectional shutdown in the examples
2022-05-11 17:00:44 -07:00
Juliusz Sosinowicz
257c55a311 examples: allow bidirectional shutdown in UDP
This commit allows the examples to perform a bidirectional shutdown also when
using UDP. It is useful to test DTLS retransmission.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
2022-05-11 13:27:24 +02:00
Daniel Pouzzner
26673a0f28 where appropriate, use strcmp/strcasecmp, not strncmp/strncasecmp;
add macro XSTRCASECMP();

update XSTRNCASECMP() for XC32 >= 1.00 to use strncasecmp.
2022-05-10 12:20:12 -05:00
Marco Oliverio
d133fa6143 server: check that the first packet of udp connection is clientHello
Used to allow for bi-directional shutdown tests with UDP and DTLS
2022-05-09 13:45:27 +02:00
David Garske
84a33183a6 Various scan-build fixes. 2022-04-22 16:02:54 -07:00
elms
29392ac6b3 spell fix: OSCP -> OCSP 2022-04-19 15:11:08 -07:00
David Garske
c905c613e9 Support for Intel QuickAssist ECC KeyGen acceleration. 2022-03-30 13:07:47 -07:00
Juliusz Sosinowicz
1fd090d094 Update wolfSSL_get_session docs
Recommend using `wolfSSL_get1_session` and `NO_SESSION_CACHE_REF` for session resumption purposes. `wolfSSL_get_session` should not be used unless to inspect the current session object.
2022-03-17 12:56:28 +01:00
Daniel Pouzzner
d531e21f34
Merge pull request #4946 from dgarske/async_earlydata
Fixes for TLS v1.3 early data with async
2022-03-15 12:12:09 -05:00
Sean Parkinson
2c1ecacbfc TLS 1.3 script test: wait for server to write file
Also fixes for:
./configure --enable-psk --disable-rsa --disable-ecc --disable-dh
C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
./configure --disable-shared --enable-curve448 --enable-ed448
--disable-rsa --disable-dh --enable-tls13 --disable-ecc --enable-certgen
--enable-keygen
2022-03-14 14:42:47 +10:00
David Garske
dd8fb41f66 Fixes for TLS v1.3 early data with async. 2022-03-11 14:03:46 -08:00
Juliusz Sosinowicz
3c64731c4f Don't force a ECC CA when a custom CA is passed with -A
The following config would fail `../configure --enable-opensslall CFLAGS="-DOPENSSL_COMPATIBLE_DEFAULTS" && make -j check`. This is because `test-fails.conf` `ECC no signer error` test expects a failure while the ECC CA was being added as a trusted cert due to  `OPENSSL_COMPATIBLE_DEFAULTS`.
2022-03-08 15:02:43 +01:00
Hayden Roche
a9cc1ca877
Merge pull request #4924 from dgarske/coexist_fixes 2022-03-07 13:00:22 -08:00
Daniel Pouzzner
9be0633ce3
Merge pull request #4824 from dgarske/fips_ready_user
User settings template for FIPS v5 ready
2022-03-05 07:52:03 -06:00
David Garske
3839b0e675 Fixes for building wolfSSL along side openssl. 2022-03-04 12:06:24 -08:00
David Garske
6dd7a289e7 Fix for "set but not used". 2022-02-24 13:43:56 -08:00
Sean Parkinson
b13826a3a5
Merge pull request #4840 from haydenroche5/visual_studio_cleanup
Clean up Visual Studio output and intermediate directories.
2022-02-24 15:07:13 +10:00
Juliusz Sosinowicz
ceff401269 Fixes for Jenkins tests
- Move test to `HAVE_IO_TESTS_DEPENDENCIES`
- Implement `wolfSSL_trust_peer_cert`
- have{cipher} options weren't being set with only RSA enabled
2022-02-23 09:47:34 +01:00
David Garske
194466c35a Peer review fixes. 2022-02-22 15:22:27 -08:00
David Garske
40b171124f Fixes to resolve a few make check issues. 2022-02-11 15:20:25 -08:00
David Garske
7ec1e69dba Fixes for supporting the openssl compatibility layer. Adds ChaCha/Poly, DH extra and verify callbacks. 2022-02-08 10:18:41 -08:00
Hayden Roche
6930cc0b21 Clean up Visual Studio output and intermediate directories.
Currently, wolfssl.vcxproj and IDE/WIN10/wolfssl-fips.vcxproj do not use the
same scheme for their output and intermediate directories. Further, across
configuration/platform combinations, wolfssl.vcxproj isn't consistent, either.
For example:

```
Release|x64
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Platform)\$(Configuration)\obj\

Release|Win32
OutDir: $(SolutionDir)$(Configuration)\
IntDir: $(Configuration)\obj\
```

This commit makes every configuration/platform combo for all Visual Studio
projects follow the same pattern:

```
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Configuration)\$(Platform)\$(ProjectName)_obj\
```

The `$(ProjectName)_obj` piece gets rid of a Visual Studio warning about not
mingling the intermediate objects of disparate builds.
2022-02-08 09:23:27 -08:00
David Garske
5169a3cf89 Improve header comments and logic. Remove NO_PWDBASED and added CRL. 2022-02-07 15:58:10 -08:00
David Garske
50700c3c28 Make sure Rabbit and HC128 are disabled when building FIPS against older wolfSSL. 2022-02-03 14:53:11 -08:00
David Garske
db6d924d4b User settings template for FIPS v5. 2022-02-03 13:35:13 -08:00
Anthony Hu
9ea40f3a9c Purge IDEA cipher 2022-01-31 15:29:25 -05:00
Anthony Hu
b957a6e872 Purge Rabbit cipher 2022-01-28 13:13:53 -05:00
Daniel Pouzzner
2955d7339e remove a debugging printf, fix whitespace/indentation, and add a comment re gethostbyname_r buffer size. 2022-01-21 13:00:22 -06:00