Commit Graph

138 Commits (master)

Author SHA1 Message Date
David Garske 72a36587c6
Merge pull request #508 from anhu/connfd_to_bytesReceived
recvfrom() returns the bytes received; not a file descriptor.
2025-06-12 12:04:35 -07:00
Anthony Hu dbb4c309e7 recvfrom() returns the bytes received; not a file descriptor. 2025-06-12 13:25:33 -04:00
Sebastian Carpenter 6c50fe71f9 fixed call to wolfSSL_dtls_cid_parse
The server-dtls-demux.c file used the old function call signature. It has been updated to reflect the new signature.
2025-06-04 14:39:19 -06:00
Reda Chouk 7daf133366 Added OS-level timeout support for the DTLS I/O callbacks examples 2025-02-25 15:29:25 +01:00
David Garske 3ec0c4b1a2
Merge pull request #472 from julek-wolfssl/dtls-server-demux
DTLS: Add server single socket demultiplexing example
2025-01-27 07:51:16 -08:00
David Garske 8775b5c06d Minor improvements. Tested with RSA and ECC for both DTLS v1.2 and v1.3. Tested with/without calling accept/connect. Tested with calling `wolfSSL_is_init_finished`. 2025-01-03 11:59:26 -08:00
JacobBarthelmeh 8ec1a5e14a add DTLS bio example 2025-01-03 12:08:05 -07:00
Juliusz Sosinowicz a66444e73e Add docs 2024-11-26 11:50:13 +01:00
Juliusz Sosinowicz 83ede0a41d Add server demux example
Also added CID clients for dtls 1.2 and 1.3. The clients change port after sending each message.
2024-11-26 11:50:13 +01:00
Daniel Pouzzner 6c5b5f4c49
Merge pull request #448 from SparkiDev/dtls_read_write_threaded
DTLS threaded read-write with same SSL object
2024-11-04 23:52:38 -06:00
Sean Parkinson 3bb9656563 DTLS threaded read-write with same SSL object
Add server and client DTLS example that have read and write threads that
use the same SSL objects.
Server also has encryption threads when wolfSSL is compiled for that.
2024-10-29 11:42:20 +10:00
jordan 95105068c6 more cleanup. 2024-09-17 00:07:10 -04:00
jordan 8c57fd34ad cleanup. 2024-09-16 23:52:16 -04:00
jordan aee9f1001d Beginning of cleanup. 2024-09-16 21:10:29 -04:00
David Garske eaa8e8e022 Cleanups for DTLS 1.3 client/server examples. 2024-08-28 08:17:48 -07:00
Sean Parkinson 2326995fb0
Merge pull request #435 from bandi13/ConsolidateNaming
Several fixes in various tests across the repository
2024-05-02 10:42:57 +10:00
Andras Fekete e9ef698710 Don't ignore errors when building executable 2024-04-22 10:42:27 -04:00
Andras Fekete 953b896d86 Fix compile error 2024-04-22 10:12:56 -04:00
Marco Oliverio ae0372d06a dtls: client-threaded: remove 1 sec sleep between wolfSSL_Connect 2024-04-11 14:24:44 +02:00
Andras Fekete 4c2f96ff64 Clean up wolfSSL path variable name 2024-04-04 13:28:23 -04:00
Marco Oliverio dca8dab35c dtls: server threaded: fix: set dtls peer as soon as possible
avoid calling wolfSSL_Accept() on a socket while peer is not set, otherwise the
SSL objects may sends messages to the wrong peer. Also, use a "connected"
udp-socket to allow receiving packets from other peers in another socket bound
to the same local address.
2024-04-04 17:37:21 +02:00
jordan 11509fdf47 dtls threaded examples: fix mac warnings, small cleanup. 2024-01-19 10:13:55 -06:00
jordan fae5acd049 dtls threaded examples: sanity check n_threads. 2024-01-17 00:51:53 -06:00
jordan 2fa54af672 dtls threaded examples: don't do double free. 2024-01-17 00:32:14 -06:00
jordan cea1d0815e Server and client dtls threaded examples. 2024-01-16 23:31:38 -06:00
tim-weller-wolfssl 013a6da63d Phase 1 updates to wolfSSL examples based on testing with wolfSSL
release v5.5.4-stable.  Changes include minor build fixes and README
updates.
2023-03-25 09:15:11 -05:00
Juliusz Sosinowicz 2d5c409540 wolfSSL_send_hrr_cookie is only available with WOLFSSL_SEND_HRR_COOKIE 2022-07-06 10:07:34 +02:00
David Garske 2b52c38fa1 Switch to new name `wolfDTLS_SetChGoodCb` 2022-07-01 12:09:54 -07:00
Juliusz Sosinowicz 6b3baa887b Address code review 2022-07-01 17:59:39 +02:00
Juliusz Sosinowicz ccd205db81 dtls: use USE_DTLS12 to compile some DTLS 1.3 examples to use DTLS 1.2 2022-06-30 17:00:12 +02:00
Juliusz Sosinowicz 656762d313 dtls: Refactor handshake timeout logic and simplify newConn 2022-06-30 16:29:43 +02:00
Juliusz Sosinowicz 88cf4e3e5e Move common definitions to dtls-common.h 2022-06-28 12:19:43 +02:00
Juliusz Sosinowicz 109e07ae4d Ignore compilation errors with server-dtls13-event.c 2022-06-28 12:19:13 +02:00
Juliusz Sosinowicz e10507b31c Revert default CFLAGS 2022-06-28 12:17:55 +02:00
Juliusz Sosinowicz c7898d3195 DTLS 1.3 client and server examples
- Basic client
- Basic single-thread single-connection server
- Basic single-thread multiple-connection server using libevent

Compile wolfSSL with `./configure --enable-dtls --enable-dtls13 --enable-hrrcookie`.
Statelessness of server-dtls13-event tested by sending packets found in `dtls/bin-msgs` (`cat dtls/bin-msgs/CH1.bin | nc -u 127.0.0.1 11111 > /dev/null`)
2022-06-24 13:11:09 +02:00
Juliusz Sosinowicz 3235a2d475 Init DTLS 1.3 examples 2022-06-22 20:53:26 +02:00
Lealem Amedie be264f0511 Adding documentation where needed. Made changes to code to assure files build and implement good coding practices 2021-06-29 16:02:52 -06:00
Lealem Amedie 9f8cdeb9d5 fix non-blocking tls server/client and adding bidirectional shutdown 2021-06-21 19:43:05 -06:00
David Garske 5ba15f1426 Spelling fixes. 2021-06-09 09:07:40 -07:00
kaleb-himes 5195bdbd31 Address other examples also based on peer feedback 2020-07-07 11:57:38 -06:00
kaleb-himes f45184fc4a remove unnecessary nonblock calls and update to _dtls_ on relevant calls 2020-07-07 09:33:17 -06:00
kojo1 6db497ba71 wolfSSL_dtls_set_peer sample coding on server side 2020-05-04 10:42:17 +09:00
kojo1 1d5c4f6a15 refactor flags 2020-04-15 07:04:09 +09:00
kojo1 95f2ab6865 fix socket close, client iteration 2020-04-15 06:42:02 +09:00
Chris Conlon 9237d307b5 update copyright to 2020 2020-01-03 16:08:42 -08:00
Liu Qun c08ba4464d Fix up libpthread linking error with dtls/server-dtls-threaded
Signed-off-by: Liu Qun <517067180@qq.com>
2019-05-06 02:28:01 -07:00
David Garske d8c08a00a5 Fixes for nightly Jenkins reports (pass 2). 2019-03-27 21:04:21 -07:00
David Garske d6ff3a1724 Fixes to resolve issues with DTLS server and client with various edge cases. Updated the tutorial to correct several typos and spelling errors. 2019-02-20 10:22:56 -08:00
David Garske a8d65a574a Cleanups to to the DTLS examples. 2019-02-20 09:04:29 -08:00
David Garske abc83e84fb First pass at creating a DTLS example using custom IO callbacks. 2019-02-20 09:04:29 -08:00