Commit Graph

13 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
efb9dc203e dtls-client.c: fix "buf" size error in "handle_stdin".
Replace the "sizeof(buf)" with passed in size.
Drop received messages exceeding the buffer size.
Introduced "buf_ready", true, if last character in "buf" is a newline.
Use "strstr" to detect command.
Add "client:exit" command.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2023-01-24 13:08:18 +01:00
Achim Kraus
5aca36f9c5 dtls-client.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
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
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
Olaf Bergmann
3b24a701ed dtls-client.c: fix address resolution
1. Need to pass NULL to service name parameter for getaddrinfo().
2. Ensure that freeaddrinfo() is called after successful address
   resolution.

Change-Id: Ie2e96eeb4bba3c20df6d83884d9d5cc03be244da
2018-05-16 13:45:15 +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