Commit Graph

16 Commits

Author SHA1 Message Date
Achim Kraus
90ca321f0e Add cipher suite selection to test applications.
Introduce new cli argument -c.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2023-04-17 14:07:10 +02:00
Achim Kraus
86f23c65ff dtls-server.c: drop messages exceeding the buffer size.
Add function "is_command" and command "server:exit".

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2023-01-24 13:08:18 +01:00
Achim Kraus
0c4ddd0e1c dtls-server.c: apply source code formating.
Add license header.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2023-01-24 13:08:18 +01:00
Achim Kraus
fb1e746513 dtls.c: remove renegotiation.
Remove renegotiation also from test applications.
Complies with RFC7925, 17.  Renegotiation Attacks.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2022-12-07 16:16:51 +01:00
Jan Romann
9320251212 Add Windows support 2022-09-27 14:31:54 +02:00
Achim Kraus
5e40624ec0 dtls_time.h: conditionally include time header files.
Include time.h and sys/time.h based on HAVE_TIME_H and HAVE_SYS_TIME_H.

Signed-off-by: Achim Kraus <achim.kraus@bosch.io>
2022-01-07 11:47:49 +01:00
obgm
8124810ed2 Merge pull request #83 from mrdeep1/tests_ip
tests: Handle IPv4/IPv6 selection better
2021-06-22 16:22:42 +02:00
Jon Shallow
5f53bca0e5 tests: Handle IPv4/IPv6 selection better
tests/dtls-client.c:

Fix ALERT generated when communicating with an IPv4 host.

tests/dtls-server.c:

Support binding to an IPv4 address.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2021-06-04 15:55:18 +01:00
Jon Shallow
f06e787335 compile warnings: Include WARNING_CFLAGS in all Makefile.in
Fix all the compile warnings generated following adding WARNING_CFLAGS
to all the Makefile.in files.

Fix tests/unit-tests/testdriver failures caused by dtls_prng() return value.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2021-06-01 20:08:13 +01:00
Jon Shallow
a7f4c7498e dtls-server.c: Trap SIGINT to help with valgrind
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2021-05-20 19:39:31 +01:00
Jon Shallow
c362934fc3 Correct printf formatting errors when using dsrv_log()
tests/dtls-client.c:
tests/dtls-server.c:

Correct parameters when calling dtls_debug() or dtls_warn().

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2019-04-01 15:49:29 +01:00
Sören Tempel
8812c19eac dtls-server.c: directly write the chunk of received data to stdout
Instead of iterating over it and writing it byte-wise to stdout. This
also fixes a bug where output wasn't written to stdout if it wasn't
suffixed by a newline due to the fact that stdout is not flushed after
the loop.

Change-Id: I2ba03d95c4154cbd2298acdf858a74c7e0ed8c71
Signed-off-by: Sören Tempel <tempel@uni-bremen.de>
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
2018-07-18 14:22:59 +02:00
Sören Tempel
a09354ba69 dtls-server.c: fix address resolution
We need to pass a NULL pointer instead of an empty string to
getaddrinfo(3) if we don't want to specify a service name.

This was fixed in dtls-client.c in 3b24a701ed

Change-Id: I0cdcfc6b5ffba813814352753c7150f93eb01a17
Signed-off-by: Sören Tempel <tempel@uni-bremen.de>
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
2018-07-18 14:22:48 +02:00
Olaf Bergmann
794e7e3185 dtls-{client,server}.c: cleanup, fix compiler warnings
Exclude static objects for ECC when configured without ECC support
to remove compiler warnings.

Change-Id: I780408124b717598c4f10151ad0cf92a1a1edbe8
2017-02-28 15:03:48 +01:00
Olaf Bergmann
f623c23ba4 renamed debug.[hc] to dtls_debug.[hc] to avoid naming conflicts 2016-03-08 12:47:11 +01:00
Olaf Bergmann
e1388b3980 New initial commit 2016-02-02 18:39:21 +01:00